Upgrade to 1.46.0
[platform/upstream/nghttp2.git] / doc / _themes / sphinx_rtd_theme / layout.html
1 {# TEMPLATE VAR SETTINGS #}
2 {%- set url_root = pathto('', 1) %}
3 {%- if url_root == '#' %}{% set url_root = '' %}{% endif %}
4 {%- if not embedded and docstitle %}
5   {%- set titlesuffix = " — "|safe + docstitle|e %}
6 {%- else %}
7   {%- set titlesuffix = "" %}
8 {%- endif %}
9 {%- set lang_attr = 'en' if language == None else (language | replace('_', '-')) %}
10 {%- set sphinx_writer = 'writer-html5' if html5_doctype else 'writer-html4' %}
11
12 <!DOCTYPE html>
13 <html class="{{ sphinx_writer }}" lang="{{ lang_attr }}" >
14 <head>
15   <meta charset="utf-8">
16   {{ metatags }}
17   <meta name="viewport" content="width=device-width, initial-scale=1.0">
18   {% block htmltitle %}
19   <title>{{ title|striptags|e }}{{ titlesuffix }}</title>
20   {% endblock %}
21
22   {# CSS #}
23   <link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
24   <link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
25   {%- for css in css_files %}
26     {%- if css|attr("rel") %}
27   <link rel="{{ css.rel }}" href="{{ pathto(css.filename, 1) }}" type="text/css"{% if css.title is not none %} title="{{ css.title }}"{% endif %} />
28     {%- else %}
29   <link rel="stylesheet" href="{{ pathto(css, 1) }}" type="text/css" />
30     {%- endif %}
31   {%- endfor %}
32
33   {%- for cssfile in extra_css_files %}
34     <link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
35   {%- endfor %}
36
37   {# FAVICON #}
38   {% if favicon %}
39     <link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1) }}"/>
40   {% endif %}
41   {# CANONICAL URL #}
42   {% if theme_canonical_url %}
43     <link rel="canonical" href="{{ theme_canonical_url }}{{ pagename }}.html"/>
44   {% endif %}
45
46   {# JAVASCRIPTS #}
47   {%- block scripts %}
48   <!--[if lt IE 9]>
49     <script src="{{ pathto('_static/js/html5shiv.min.js', 1) }}"></script>
50   <![endif]-->
51   {%- if not embedded %}
52   {# XXX Sphinx 1.8.0 made this an external js-file, quick fix until we refactor the template to inherert more blocks directly from sphinx #}
53     {% if sphinx_version >= "1.8.0" %}
54       <script type="text/javascript" id="documentation_options" data-url_root="{{ pathto('', 1) }}" src="{{ pathto('_static/documentation_options.js', 1) }}"></script>
55       {%- for scriptfile in script_files %}
56         {{ js_tag(scriptfile) }}
57       {%- endfor %}
58     {% else %}
59       <script type="text/javascript">
60           var DOCUMENTATION_OPTIONS = {
61               URL_ROOT:'{{ url_root }}',
62               VERSION:'{{ release|e }}',
63               LANGUAGE:'{{ language }}',
64               COLLAPSE_INDEX:false,
65               FILE_SUFFIX:'{{ '' if no_search_suffix else file_suffix }}',
66               HAS_SOURCE:  {{ has_source|lower }},
67               SOURCELINK_SUFFIX: '{{ sourcelink_suffix }}'
68           };
69       </script>
70       {%- for scriptfile in script_files %}
71         <script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
72       {%- endfor %}
73     {% endif %}
74     <script type="text/javascript" src="{{ pathto('_static/js/theme.js', 1) }}"></script>
75
76     {# OPENSEARCH #}
77     {%- if use_opensearch %}
78     <link rel="search" type="application/opensearchdescription+xml"
79           title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}"
80           href="{{ pathto('_static/opensearch.xml', 1) }}"/>
81     {%- endif %}
82   {%- endif %}
83   {%- endblock %}
84
85   {%- block linktags %}
86     {%- if hasdoc('about') %}
87     <link rel="author" title="{{ _('About these documents') }}" href="{{ pathto('about') }}" />
88     {%- endif %}
89     {%- if hasdoc('genindex') %}
90     <link rel="index" title="{{ _('Index') }}" href="{{ pathto('genindex') }}" />
91     {%- endif %}
92     {%- if hasdoc('search') %}
93     <link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}" />
94     {%- endif %}
95     {%- if hasdoc('copyright') %}
96     <link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}" />
97     {%- endif %}
98     {%- if next %}
99     <link rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}" />
100     {%- endif %}
101     {%- if prev %}
102     <link rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}" />
103     {%- endif %}
104   {%- endblock %}
105   {%- block extrahead %} {% endblock %}
106 </head>
107
108 <body class="wy-body-for-nav">
109
110   {% block extrabody %} {% endblock %}
111   <div class="wy-grid-for-nav">
112     {# SIDE NAV, TOGGLES ON MOBILE #}
113     <nav data-toggle="wy-nav-shift" class="wy-nav-side">
114       <div class="wy-side-scroll">
115         <div class="wy-side-nav-search" {% if theme_style_nav_header_background %} style="background: {{theme_style_nav_header_background}}" {% endif %}>
116           {% block sidebartitle %}
117
118           {% if logo and theme_logo_only %}
119             <a href="{{ pathto(master_doc) }}">
120           {% else %}
121             <a href="{{ pathto(master_doc) }}" class="icon icon-home"> {{ project }}
122           {% endif %}
123
124           {% if logo %}
125             {# Not strictly valid HTML, but it's the only way to display/scale
126                it properly, without weird scripting or heaps of work
127             #}
128             <img src="{{ pathto('_static/' + logo, 1) }}" class="logo" alt="{{ _('Logo') }}"/>
129           {% endif %}
130           </a>
131
132           {% if theme_display_version %}
133             {%- set nav_version = version %}
134             {% if READTHEDOCS and current_version %}
135               {%- set nav_version = current_version %}
136             {% endif %}
137             {% if nav_version %}
138               <div class="version">
139                 {{ nav_version }}
140               </div>
141             {% endif %}
142           {% endif %}
143
144           {% include "searchbox.html" %}
145
146           {% endblock %}
147         </div>
148
149         {% block navigation %}
150         <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
151           {% block menu %}
152             {#
153               The singlehtml builder doesn't handle this toctree call when the
154               toctree is empty. Skip building this for now.
155             #}
156             {% if 'singlehtml' not in builder %}
157               {% set global_toc = toctree(maxdepth=theme_navigation_depth|int,
158                                           collapse=theme_collapse_navigation|tobool,
159                                           includehidden=theme_includehidden|tobool,
160                                           titles_only=theme_titles_only|tobool) %}
161             {% endif %}
162             {% if global_toc %}
163               {{ global_toc }}
164             {% else %}
165               <!-- Local TOC -->
166               <div class="local-toc">{{ toc }}</div>
167             {% endif %}
168           {% endblock %}
169         </div>
170         {% endblock %}
171       </div>
172     </nav>
173
174     <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
175
176       {# MOBILE NAV, TRIGGLES SIDE NAV ON TOGGLE #}
177       <nav class="wy-nav-top" aria-label="top navigation">
178         {% block mobile_nav %}
179           <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
180           <a href="{{ pathto(master_doc) }}">{{ project }}</a>
181         {% endblock %}
182       </nav>
183
184
185       <div class="wy-nav-content">
186       {%- block content %}
187         {% if theme_style_external_links|tobool %}
188         <div class="rst-content style-external-links">
189         {% else %}
190         <div class="rst-content">
191         {% endif %}
192           {% include "breadcrumbs.html" %}
193           <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
194           {%- block document %}
195            <div itemprop="articleBody">
196             {% block body %}{% endblock %}
197            </div>
198            {% if self.comments()|trim %}
199            <div class="articleComments">
200             {% block comments %}{% endblock %}
201            </div>
202            {% endif%}
203           </div>
204           {%- endblock %}
205           {% include "footer.html" %}
206         </div>
207       {%- endblock %}
208       </div>
209
210     </section>
211
212   </div>
213   {% include "versions.html" %}
214
215   <script type="text/javascript">
216       jQuery(function () {
217           SphinxRtdTheme.Navigation.enable({{ 'true' if theme_sticky_navigation|tobool else 'false' }});
218       });
219   </script>
220
221   {# Do not conflict with RTD insertion of analytics script #}
222   {% if not READTHEDOCS %}
223     {% if theme_analytics_id %}
224     <!-- Theme Analytics -->
225     <script>
226     (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
227       (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
228       m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
229     })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
230
231     ga('create', '{{ theme_analytics_id }}', 'auto');
232     ga('send', 'pageview');
233     </script>
234
235     {% endif %}
236   {% endif %}
237
238   {%- block footer %} {% endblock %}
239
240 </body>
241 </html>