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