sphinx/themes/basic/layout.html
{# Master layout template for Sphinx themes. #} {%- block doctype -%} {%- endblock %} {%- set reldelim1 = reldelim1 is not defined and ' »' or reldelim1 %} {%- set reldelim2 = reldelim2 is not defined and ' |' or reldelim2 %} {%- set render_sidebar = (not embedded) and (not theme_nosidebar|tobool) and (sidebars != []) %} {# URL root should never be #, then all links are fragments #} {%- if not embedded and docstitle %} {%- set titlesuffix = " — "|safe + docstitle|e %} {%- else %} {%- set titlesuffix = "" %} {%- endif %} {%- macro relbar() %}
{%- endmacro %} {%- macro sidebar() %} {%- if render_sidebar %} {%- endif %} {%- endmacro %} {%- macro script() %} {%- for js in script_files %} {{ js_tag(js) }} {%- endfor %} {%- endmacro %} {%- macro css() %} {%- for css in css_files %} {%- if css|attr("filename") %} {{ css_tag(css) }} {%- else %} {%- endif %} {%- endfor %} {%- endmacro %} {%- if html_tag %} {{ html_tag }} {%- else %} {%- endif %} {{- metatags }} {%- block htmltitle %} {{ title|striptags|e }}{{ titlesuffix }} {%- endblock %} {%- block css %} {{- css() }} {%- endblock %} {%- if not embedded %} {%- block scripts %} {{- script() }} {%- endblock %} {%- if pageurl %} {%- endif %} {%- if use_opensearch %} {%- endif %} {%- if favicon_url %} {%- endif %} {%- endif %} {%- block linktags %} {%- if hasdoc('about') %} {%- endif %} {%- if hasdoc('genindex') %} {%- endif %} {%- if hasdoc('search') %} {%- endif %} {%- if hasdoc('copyright') %} {%- endif %} {%- if next %} {%- endif %} {%- if prev %} {%- endif %} {%- endblock %} {%- block extrahead %} {% endblock %} {%- block body_tag %}{% endblock %} {%- block header %}{% endblock %} {%- block relbar1 %}{{ relbar() }}{% endblock %} {%- block content %} {%- block sidebar1 %} {# possible location for sidebar #} {% endblock %} {%- block document %} {%- if render_sidebar %} {%- endif %} {% block body %} {% endblock %}
{%- if render_sidebar %} {%- endif %} {%- endblock %} {%- block sidebar2 %}{{ sidebar() }}{% endblock %}
{%- endblock %} {%- block relbar2 %}{{ relbar() }}{% endblock %} {%- macro copyright_block() %} {%- if hasdoc('copyright') %} {%- set copyright_prefix = '' + _('Copyright') + '' -%} {%- else %} {%- set copyright_prefix = _('Copyright') %} {%- endif %} {%- if copyright is iterable and copyright is not string %} {% for copyright_line in copyright %} {% trans trimmed copyright_prefix=copyright_prefix, copyright=copyright_line|e %} © {{ copyright_prefix }} {{ copyright }}. {% endtrans %} {%- if not loop.last %}
{%- endif %} {% endfor %} {%- else %} {% trans trimmed copyright_prefix=copyright_prefix, copyright=copyright|e %} © {{ copyright_prefix }} {{ copyright }}. {% endtrans %} {%- endif %} {%- endmacro %} {%- block footer %} {%- endblock %}