Html程序  |  55行  |  2.69 KB

{% extends "!layout.html" %}
{% block rootrellink %}
        <li><img src="{{ pathto('_static/py.png', 1) }}" alt=""
                 style="vertical-align: middle; margin-top: -1px"/></li>
        <li><a href="https://www.python.org/">Python</a>{{ reldelim1 }}</li>
        <li>
          {%- if switchers is defined %}
          <span class="language_switcher_placeholder">{{ language or 'en' }}</span>
          <span class="version_switcher_placeholder">{{ release }}</span>
          <a href="{{ pathto('index') }}">{% trans %}Documentation{% endtrans %}</a>{{ reldelim1 }}
          {%- else %}
          <a href="{{ pathto('index') }}">{{ shorttitle }}</a>{{ reldelim1 }}
          {%- endif %}
        </li>
{% endblock %}
{% block relbar1 %} {% if builder != 'qthelp' %} {{ relbar() }} {% endif %} {% endblock %}
{% block relbar2 %} {% if builder != 'qthelp' %} {{ relbar() }} {% endif %} {% endblock %}
{% block extrahead %}
    <link rel="shortcut icon" type="image/png" href="{{ pathto('_static/py.png', 1) }}" />
    <link rel="canonical" href="https://docs.python.org/2/{{pagename}}.html" />
    {% if not embedded %}<script type="text/javascript" src="{{ pathto('_static/copybutton.js', 1) }}"></script>{% endif %}
    {% if switchers is defined and not embedded %}<script type="text/javascript" src="{{ pathto('_static/switchers.js', 1) }}"></script>{% endif %}
{{ super() }}
    {% if builder == 'qthelp' %}
    <style type="text/css">
    body { background-color: white; }
    div.document { background-color: white; }
    </style>
    {% endif %}
{% endblock %}
{% block footer %}
    <div class="footer">
    &copy; <a href="{{ pathto('copyright') }}">{% trans %}Copyright{% endtrans %}</a> {{ copyright|e }}.
    <br />
    {% trans %}The Python Software Foundation is a non-profit corporation.{% endtrans %}
    <a href="https://www.python.org/psf/donations/">{% trans %}Please donate.{% endtrans %}</a>
    <br />
    {% trans last_update=last_updated|e %}Last updated on {{ last_update }}.{% endtrans %}
    {% trans pathto_bugs=pathto('bugs') %}<a href="{{ pathto_bugs }}">Found a bug</a>?{% endtrans %}
    <br />
    {% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
    </div>
{% endblock %}
{% block sidebarsourcelink %}
{%- if show_source and has_source and sourcename %}
<h3>{{ _('This Page') }}</h3>
<ul class="this-page-menu">
  <li><a href="{{ pathto('bugs') }}">{% trans %}Report a Bug{% endtrans %}</a></li>
  <li><a href="https://github.com/python/cpython/blob/{{ version }}/Doc/{{ sourcename|replace('.rst.txt', '.rst') }}"
         rel="nofollow">{% trans %}Show Source{% endtrans %}</a>
  </li>
</ul>
{%- endif %}
{% endblock %}