|
| 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 | + |
| 11 | +<!DOCTYPE html> |
| 12 | +<!--[if IE 8]><html class="no-js lt-ie9" lang="{{ lang_attr }}" > <![endif]--> |
| 13 | +<!--[if gt IE 8]><!--> <html class="no-js" lang="{{ lang_attr }}" > <!--<![endif]--> |
| 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 | + {# FAVICON #} |
| 23 | + {% if favicon %} |
| 24 | + <link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1) }}"/> |
| 25 | + {% endif %} |
| 26 | + {# CANONICAL URL #} |
| 27 | + {% if theme_canonical_url %} |
| 28 | + <link rel="canonical" href="{{ theme_canonical_url }}{{ pagename }}.html"/> |
| 29 | + {% endif %} |
| 30 | + |
| 31 | + {# CSS #} |
| 32 | + |
| 33 | + {# OPENSEARCH #} |
| 34 | + {% if not embedded %} |
| 35 | + {% if use_opensearch %} |
| 36 | + <link rel="search" type="application/opensearchdescription+xml" |
| 37 | + title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}" |
| 38 | + href="{{ pathto('_static/opensearch.xml', 1) }}"/> |
| 39 | + {% endif %} |
| 40 | + |
| 41 | + {% endif %} |
| 42 | + |
| 43 | + {# RTD hosts this file, so just load on non RTD builds #} |
| 44 | + {%- if not READTHEDOCS %} |
| 45 | + <link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" /> |
| 46 | + {%- endif %} |
| 47 | + <link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" /> |
| 48 | + {%- for css in css_files %} |
| 49 | + {%- if css|attr("rel") %} |
| 50 | + <link rel="{{ css.rel }}" href="{{ pathto(css.filename, 1) }}" type="text/css"{% if css.title is not none %} title="{{ css.title }}"{% endif %} /> |
| 51 | + {%- else %} |
| 52 | + <link rel="stylesheet" href="{{ pathto(css, 1) }}" type="text/css" /> |
| 53 | + {%- endif %} |
| 54 | + {%- endfor %} |
| 55 | + {%- for cssfile in extra_css_files %} |
| 56 | + <link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" /> |
| 57 | + {%- endfor %} |
| 58 | + |
| 59 | + {%- block linktags %} |
| 60 | + {%- if hasdoc('about') %} |
| 61 | + <link rel="author" title="{{ _('About these documents') }}" href="{{ pathto('about') }}" /> |
| 62 | + {%- endif %} |
| 63 | + {%- if hasdoc('genindex') %} |
| 64 | + <link rel="index" title="{{ _('Index') }}" href="{{ pathto('genindex') }}" /> |
| 65 | + {%- endif %} |
| 66 | + {%- if hasdoc('search') %} |
| 67 | + <link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}" /> |
| 68 | + {%- endif %} |
| 69 | + {%- if hasdoc('copyright') %} |
| 70 | + <link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}" /> |
| 71 | + {%- endif %} |
| 72 | + {%- if next %} |
| 73 | + <link rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}" /> |
| 74 | + {%- endif %} |
| 75 | + {%- if prev %} |
| 76 | + <link rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}" /> |
| 77 | + {%- endif %} |
| 78 | + {%- endblock %} |
| 79 | + {%- block extrahead %} {% endblock %} |
| 80 | + |
| 81 | + {# Keep modernizr in head - http://modernizr.com/docs/#installing #} |
| 82 | + <script src="{{ pathto('_static/js/modernizr.min.js', 1) }}"></script> |
| 83 | + |
| 84 | +</head> |
| 85 | + |
| 86 | +<body class="wy-body-for-nav"> |
| 87 | + |
| 88 | + {% block extrabody %} {% endblock %} |
| 89 | + <div class="wy-grid-for-nav"> |
| 90 | + |
| 91 | + {# SIDE NAV, TOGGLES ON MOBILE #} |
| 92 | + <nav data-toggle="wy-nav-shift" class="wy-nav-side"> |
| 93 | + <div class="wy-side-scroll"> |
| 94 | + <div class="wy-side-nav-search"> |
| 95 | + {% block sidebartitle %} |
| 96 | + |
| 97 | + {% if logo and theme_logo_only %} |
| 98 | + <a href="{{ pathto(master_doc) }}"> |
| 99 | + {% else %} |
| 100 | + <a href="{{ pathto(master_doc) }}" class="icon icon-home"> {{ project }} |
| 101 | + {% endif %} |
| 102 | + |
| 103 | + {% if logo %} |
| 104 | + {# Not strictly valid HTML, but it's the only way to display/scale |
| 105 | + it properly, without weird scripting or heaps of work |
| 106 | + #} |
| 107 | + <img src="{{ pathto('_static/' + logo, 1) }}" class="logo" alt="Logo"/> |
| 108 | + {% endif %} |
| 109 | + </a> |
| 110 | + |
| 111 | + {% if theme_display_version %} |
| 112 | + {%- set nav_version = release %} |
| 113 | + {% if READTHEDOCS and current_version %} |
| 114 | + {%- set nav_version = current_version %} |
| 115 | + {% endif %} |
| 116 | + {% if nav_version %} |
| 117 | + <div class="version"> |
| 118 | + {{ nav_version }} |
| 119 | + </div> |
| 120 | + {% endif %} |
| 121 | + {% endif %} |
| 122 | + |
| 123 | + {% include "searchbox.html" %} |
| 124 | + |
| 125 | + {% endblock %} |
| 126 | + </div> |
| 127 | + |
| 128 | + <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> |
| 129 | + {% block menu %} |
| 130 | + {# |
| 131 | + The singlehtml builder doesn't handle this toctree call when the |
| 132 | + toctree is empty. Skip building this for now. |
| 133 | + #} |
| 134 | + {% if 'singlehtml' not in builder %} |
| 135 | + {% set global_toc = toctree(maxdepth=theme_navigation_depth|int, |
| 136 | + collapse=theme_collapse_navigation|tobool, |
| 137 | + includehidden=theme_includehidden|tobool, |
| 138 | + titles_only=theme_titles_only|tobool) %} |
| 139 | + {% endif %} |
| 140 | + {% if global_toc %} |
| 141 | + {{ global_toc }} |
| 142 | + {% else %} |
| 143 | + <!-- Local TOC --> |
| 144 | + <div class="local-toc">{{ toc }}</div> |
| 145 | + {% endif %} |
| 146 | + {% endblock %} |
| 147 | + </div> |
| 148 | + </div> |
| 149 | + </nav> |
| 150 | + |
| 151 | + <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> |
| 152 | + |
| 153 | + {# MOBILE NAV, TRIGGLES SIDE NAV ON TOGGLE #} |
| 154 | + <nav class="wy-nav-top" aria-label="top navigation"> |
| 155 | + {% block mobile_nav %} |
| 156 | + <i data-toggle="wy-nav-top" class="fa fa-bars"></i> |
| 157 | + <a href="{{ pathto(master_doc) }}">{{ project }}</a> |
| 158 | + {% endblock %} |
| 159 | + </nav> |
| 160 | + |
| 161 | + |
| 162 | + <div class="wy-nav-content"> |
| 163 | + {%- block content %} |
| 164 | + {% if theme_style_external_links|tobool %} |
| 165 | + <div class="rst-content style-external-links"> |
| 166 | + {% else %} |
| 167 | + <div class="rst-content"> |
| 168 | + {% endif %} |
| 169 | + {% include "breadcrumbs.html" %} |
| 170 | + <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> |
| 171 | + {%- block document %} |
| 172 | + <div itemprop="articleBody"> |
| 173 | + {% block body %}{% endblock %} |
| 174 | + </div> |
| 175 | + {% if self.comments()|trim %} |
| 176 | + <div class="articleComments"> |
| 177 | + {% block comments %}{% endblock %} |
| 178 | + </div> |
| 179 | + {% endif%} |
| 180 | + </div> |
| 181 | + {%- endblock %} |
| 182 | + {% include "footer.html" %} |
| 183 | + </div> |
| 184 | + {%- endblock %} |
| 185 | + </div> |
| 186 | + |
| 187 | + </section> |
| 188 | + |
| 189 | + </div> |
| 190 | + {% include "versions.html" %} |
| 191 | + |
| 192 | + {% if not embedded %} |
| 193 | + |
| 194 | + <script type="text/javascript"> |
| 195 | + var DOCUMENTATION_OPTIONS = { |
| 196 | + URL_ROOT:'{{ url_root }}', |
| 197 | + VERSION:'{{ release|e }}', |
| 198 | + LANGUAGE:'{{ language }}', |
| 199 | + COLLAPSE_INDEX:false, |
| 200 | + FILE_SUFFIX:'{{ '' if no_search_suffix else file_suffix }}', |
| 201 | + HAS_SOURCE: {{ has_source|lower }}, |
| 202 | + SOURCELINK_SUFFIX: '{{ sourcelink_suffix }}' |
| 203 | + }; |
| 204 | + </script> |
| 205 | + {%- for scriptfile in script_files %} |
| 206 | + <script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script> |
| 207 | + {%- endfor %} |
| 208 | + |
| 209 | + {% endif %} |
| 210 | + |
| 211 | + {# RTD hosts this file, so just load on non RTD builds #} |
| 212 | + {% if not READTHEDOCS %} |
| 213 | + <script type="text/javascript" src="{{ pathto('_static/js/theme.js', 1) }}"></script> |
| 214 | + {% endif %} |
| 215 | + |
| 216 | + <script type="text/javascript"> |
| 217 | + jQuery(function () { |
| 218 | + SphinxRtdTheme.Navigation.enable({{ 'true' if theme_sticky_navigation|tobool else 'false' }}); |
| 219 | + }); |
| 220 | + </script> |
| 221 | + |
| 222 | + {%- block footer %} {% endblock %} |
| 223 | + |
| 224 | +</body> |
| 225 | +</html> |
0 commit comments