1{#
2    basic/layout.html
3    ~~~~~~~~~~~~~~~~~
4
5    Master layout template for Sphinx themes.
6
7    :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
8    :license: BSD, see LICENSE for details.
9#}
10{%- block doctype -%}{%- if html5_doctype %}
11<!DOCTYPE html>
12{%- else %}
13<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
14  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
15{%- endif %}{%- endblock %}
16{%- set reldelim1 = reldelim1 is not defined and ' &#187;' or reldelim1 %}
17{%- set reldelim2 = reldelim2 is not defined and ' |' or reldelim2 %}
18{%- set render_sidebar = (not embedded) and (not theme_nosidebar|tobool) and
19                         (sidebars != []) %}
20{%- set url_root = pathto('', 1) %}
21{# URL root should never be #, then all links are fragments #}
22{%- if url_root == '#' %}{% set url_root = '' %}{% endif %}
23{%- if not embedded and docstitle %}
24  {%- set titlesuffix = " &#8212; "|safe + docstitle|e %}
25{%- else %}
26  {%- set titlesuffix = "" %}
27{%- endif %}
28
29{%- macro relbar() %}
30    <div class="related" role="navigation" aria-label="related navigation">
31      <h3>{{ _('Navigation') }}</h3>
32      <ul>
33        {%- for rellink in rellinks %}
34        <li class="right" {% if loop.first %}style="margin-right: 10px"{% endif %}>
35          <a href="{{ pathto(rellink[0])|e }}" title="{{ rellink[1]|striptags|e }}"
36             {{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a>
37          {%- if not loop.first %}{{ reldelim2 }}{% endif %}</li>
38        {%- endfor %}
39        {%- block rootrellink %}
40        <li class="nav-item nav-item-0"><a href="{{ pathto(master_doc)|e }}">{{ shorttitle|e }}</a>{{ reldelim1 }}</li>
41        {%- endblock %}
42        {%- for parent in parents %}
43          <li class="nav-item nav-item-{{ loop.index }}"><a href="{{ parent.link|e }}" {% if loop.last %}{{ accesskey("U") }}{% endif %}>{{ parent.title }}</a>{{ reldelim1 }}</li>
44        {%- endfor %}
45        <li class="nav-item nav-item-this"><a href="{{ link|e }}">{{ title }}</a></li>
46        {%- block relbaritems %} {% endblock %}
47      </ul>
48    </div>
49{%- endmacro %}
50
51{%- macro sidebar() %}
52      {%- if render_sidebar %}
53      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
54        <div class="sphinxsidebarwrapper">
55          {%- block sidebarlogo %}
56          {%- if logo %}
57            <p class="logo"><a href="{{ pathto(master_doc)|e }}">
58              <img class="logo" src="{{ pathto('_static/' + logo, 1)|e }}" alt="Logo"/>
59            </a></p>
60          {%- endif %}
61          {%- endblock %}
62          {%- if sidebars != None %}
63            {#- new style sidebar: explicitly include/exclude templates #}
64            {%- for sidebartemplate in sidebars %}
65            {%- include sidebartemplate %}
66            {%- endfor %}
67          {%- else %}
68            {#- old style sidebars: using blocks -- should be deprecated #}
69            {%- block sidebartoc %}
70            {%- include "localtoc.html" %}
71            {%- endblock %}
72            {%- block sidebarrel %}
73            {%- include "relations.html" %}
74            {%- endblock %}
75            {%- block sidebarsourcelink %}
76            {%- include "sourcelink.html" %}
77            {%- endblock %}
78            {%- if customsidebar %}
79            {%- include customsidebar %}
80            {%- endif %}
81            {%- block sidebarsearch %}
82            {%- include "searchbox.html" %}
83            {%- endblock %}
84          {%- endif %}
85        </div>
86      </div>
87      {%- endif %}
88{%- endmacro %}
89
90{%- macro script() %}
91    <script id="documentation_options" data-url_root="{{ url_root }}" src="{{ pathto('_static/documentation_options.js', 1) }}"></script>
92    {%- for js in script_files %}
93    {{ js_tag(js) }}
94    {%- endfor %}
95{%- endmacro %}
96
97{%- macro css() %}
98    <link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
99    <link rel="stylesheet" href="{{ pathto('_static/' + style, 1)|e }}" type="text/css" />
100    {%- for css in css_files %}
101      {%- if css|attr("filename") %}
102    {{ css_tag(css) }}
103      {%- else %}
104    <link rel="stylesheet" href="{{ pathto(css, 1)|e }}" type="text/css" />
105      {%- endif %}
106    {%- endfor %}
107{%- endmacro %}
108
109{%- if html_tag %}
110{{ html_tag }}
111{%- else %}
112<html{% if not html5_doctype %} xmlns="http://www.w3.org/1999/xhtml"{% endif %}{% if language is not none %} lang="{{ language }}"{% endif %}>
113{%- endif %}
114  <head>
115    {%- if not html5_doctype and not skip_ua_compatible %}
116    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
117    {%- endif %}
118    {%- if use_meta_charset or html5_doctype %}
119    <meta charset="{{ encoding }}" />
120    {%- else %}
121    <meta http-equiv="Content-Type" content="text/html; charset={{ encoding }}" />
122    {%- endif %}
123    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
124    {{- metatags }}
125    {%- block htmltitle %}
126    <title>{{ title|striptags|e }}{{ titlesuffix }}</title>
127    {%- endblock %}
128    {%- block css %}
129    {{- css() }}
130    {%- endblock %}
131    {%- if not embedded %}
132    {%- block scripts %}
133    {{- script() }}
134    {%- endblock %}
135    {%- if pageurl %}
136    <link rel="canonical" href="{{ pageurl|e }}" />
137    {%- endif %}
138    {%- if use_opensearch %}
139    <link rel="search" type="application/opensearchdescription+xml"
140          title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}"
141          href="{{ pathto('_static/opensearch.xml', 1) }}"/>
142    {%- endif %}
143    {%- if favicon %}
144    <link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1)|e }}"/>
145    {%- endif %}
146    {%- endif %}
147{%- block linktags %}
148    {%- if hasdoc('about') %}
149    <link rel="author" title="{{ _('About these documents') }}" href="{{ pathto('about') }}" />
150    {%- endif %}
151    {%- if hasdoc('genindex') %}
152    <link rel="index" title="{{ _('Index') }}" href="{{ pathto('genindex') }}" />
153    {%- endif %}
154    {%- if hasdoc('search') %}
155    <link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}" />
156    {%- endif %}
157    {%- if hasdoc('copyright') %}
158    <link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}" />
159    {%- endif %}
160    {%- if next %}
161    <link rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}" />
162    {%- endif %}
163    {%- if prev %}
164    <link rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}" />
165    {%- endif %}
166{%- endblock %}
167{%- block extrahead %} {% endblock %}
168  </head>
169  {%- block body_tag %}<body>{% endblock %}
170{%- block header %}{% endblock %}
171
172{%- block relbar1 %}{{ relbar() }}{% endblock %}
173
174{%- block content %}
175  {%- block sidebar1 %} {# possible location for sidebar #} {% endblock %}
176
177    <div class="document">
178  {%- block document %}
179      <div class="documentwrapper">
180      {%- if render_sidebar %}
181        <div class="bodywrapper">
182      {%- endif %}
183          <div class="body" role="main">
184            {% block body %} {% endblock %}
185            <div class="clearer"></div>
186          </div>
187      {%- if render_sidebar %}
188        </div>
189      {%- endif %}
190      </div>
191  {%- endblock %}
192
193  {%- block sidebar2 %}{{ sidebar() }}{% endblock %}
194      <div class="clearer"></div>
195    </div>
196{%- endblock %}
197
198{%- block relbar2 %}{{ relbar() }}{% endblock %}
199
200{%- block footer %}
201    <div class="footer" role="contentinfo">
202    {%- if show_copyright %}
203      {%- if hasdoc('copyright') %}
204        {% trans path=pathto('copyright'), copyright=copyright|e %}&#169; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
205      {%- else %}
206        {% trans copyright=copyright|e %}&#169; Copyright {{ copyright }}.{% endtrans %}
207      {%- endif %}
208    {%- endif %}
209    {%- if last_updated %}
210      {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
211    {%- endif %}
212    {%- if show_sphinx %}
213      {% trans sphinx_version=sphinx_version|e %}Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
214    {%- endif %}
215    </div>
216{%- endblock %}
217  </body>
218</html>
219