layout.html 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. {%- block doctype -%}
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. {%- endblock %}
  5. {%- set reldelim1 = reldelim1 is not defined and ' &raquo;' or reldelim1 %}
  6. {%- set reldelim2 = reldelim2 is not defined and ' |' or reldelim2 %}
  7. {%- macro relbar() %}
  8. <div class="related">
  9. <h3>{{ _('Navigation') }}</h3>
  10. <ul>
  11. {%- for rellink in rellinks %}
  12. <li class="right" {% if loop.first %}style="margin-right: 10px"{% endif %}>
  13. <a href="{{ pathto(rellink[0]) }}" title="{{ rellink[1]|striptags }}"
  14. {{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a>
  15. {%- if not loop.first %}{{ reldelim2 }}{% endif %}</li>
  16. {%- endfor %}
  17. {%- block rootrellink %}
  18. <li><a href="{{ pathto(master_doc) }}">{{ shorttitle|e }}</a>{{ reldelim1 }}</li>
  19. {%- endblock %}
  20. {%- for parent in parents %}
  21. <li><a href="{{ parent.link|e }}" {% if loop.last %}{{ accesskey("U") }}{% endif %}>{{ parent.title }}</a>{{ reldelim1 }}</li>
  22. {%- endfor %}
  23. {%- block relbaritems %} {% endblock %}
  24. </ul>
  25. </div>
  26. {%- endmacro %}
  27. {%- macro sidebar() %}
  28. {%- if not embedded %}{% if not theme_nosidebar|tobool %}
  29. <div class="sphinxsidebar">
  30. <div class="sphinxsidebarwrapper">
  31. {%- block sidebarlogo %}
  32. {%- if logo %}
  33. <p class="logo"><a href="{{ pathto(master_doc) }}">
  34. <img class="logo" src="{{ pathto('_static/' + logo, 1) }}" alt="Logo"/>
  35. </a></p>
  36. {%- endif %}
  37. {%- endblock %}
  38. {%- block sidebartoc %}
  39. {%- if display_toc %}
  40. <h3><a href="{{ pathto(master_doc) }}">{{ _('Table Of Contents') }}</a></h3>
  41. {{ toc }}
  42. {%- endif %}
  43. {%- endblock %}
  44. {%- block sidebarrel %}
  45. {%- if prev %}
  46. <h4>{{ _('Previous topic') }}</h4>
  47. <p class="topless"><a href="{{ prev.link|e }}"
  48. title="{{ _('previous chapter') }}">{{ prev.title }}</a></p>
  49. {%- endif %}
  50. {%- if next %}
  51. <h4>{{ _('Next topic') }}</h4>
  52. <p class="topless"><a href="{{ next.link|e }}"
  53. title="{{ _('next chapter') }}">{{ next.title }}</a></p>
  54. {%- endif %}
  55. {%- endblock %}
  56. {%- block sidebarsourcelink %}
  57. {%- if show_source and has_source and sourcename %}
  58. <h3>{{ _('This Page') }}</h3>
  59. <ul class="this-page-menu">
  60. <li><a href="{{ pathto('_sources/' + sourcename, true)|e }}"
  61. rel="nofollow">{{ _('Show Source') }}</a></li>
  62. </ul>
  63. {%- endif %}
  64. {%- endblock %}
  65. {%- if customsidebar %}
  66. {% include customsidebar %}
  67. {%- endif %}
  68. {%- block sidebarsearch %}
  69. {%- if pagename != "search" %}
  70. <div id="searchbox" style="display: none">
  71. <h3>{{ _('Quick search') }}</h3>
  72. <form class="search" action="{{ pathto('search') }}" method="get">
  73. <input type="text" name="q" size="18" />
  74. <input type="submit" value="{{ _('Go') }}" />
  75. <input type="hidden" name="check_keywords" value="yes" />
  76. <input type="hidden" name="area" value="default" />
  77. </form>
  78. <p class="searchtip" style="font-size: 90%">
  79. {{ _('Enter search terms or a module, class or function name.') }}
  80. </p>
  81. </div>
  82. <script type="text/javascript">$('#searchbox').show(0);</script>
  83. {%- endif %}
  84. {%- endblock %}
  85. </div>
  86. </div>
  87. {%- endif %}{% endif %}
  88. {%- endmacro %}
  89. <html xmlns="http://www.w3.org/1999/xhtml">
  90. <head>
  91. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  92. {{ metatags }}
  93. {%- if not embedded %}
  94. {%- set titlesuffix = " &mdash; "|safe + docstitle|e %}
  95. {%- else %}
  96. {%- set titlesuffix = "" %}
  97. {%- endif %}
  98. <title>{{ title|striptags }}{{ titlesuffix }}</title>
  99. <link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
  100. <link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
  101. {%- if not embedded %}
  102. <script type="text/javascript">
  103. var DOCUMENTATION_OPTIONS = {
  104. URL_ROOT: '{{ pathto("", 1) }}',
  105. VERSION: '{{ release|e }}',
  106. COLLAPSE_MODINDEX: false,
  107. FILE_SUFFIX: '{{ file_suffix }}',
  108. HAS_SOURCE: {{ has_source|lower }}
  109. };
  110. </script>
  111. {%- for scriptfile in script_files %}
  112. <script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
  113. {%- endfor %}
  114. {%- if use_opensearch %}
  115. <link rel="search" type="application/opensearchdescription+xml"
  116. title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}"
  117. href="{{ pathto('_static/opensearch.xml', 1) }}"/>
  118. {%- endif %}
  119. {%- if favicon %}
  120. <link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1) }}"/>
  121. {%- endif %}
  122. {%- endif %}
  123. {%- block linktags %}
  124. {%- if hasdoc('about') %}
  125. <link rel="author" title="{{ _('About these documents') }}" href="{{ pathto('about') }}" />
  126. {%- endif %}
  127. {%- if hasdoc('genindex') %}
  128. <link rel="index" title="{{ _('Index') }}" href="{{ pathto('genindex') }}" />
  129. {%- endif %}
  130. {%- if hasdoc('search') %}
  131. <link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}" />
  132. {%- endif %}
  133. {%- if hasdoc('copyright') %}
  134. <link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}" />
  135. {%- endif %}
  136. <link rel="top" title="{{ docstitle|e }}" href="{{ pathto('index') }}" />
  137. {%- if parents %}
  138. <link rel="up" title="{{ parents[-1].title|striptags }}" href="{{ parents[-1].link|e }}" />
  139. {%- endif %}
  140. {%- if next %}
  141. <link rel="next" title="{{ next.title|striptags }}" href="{{ next.link|e }}" />
  142. {%- endif %}
  143. {%- if prev %}
  144. <link rel="prev" title="{{ prev.title|striptags }}" href="{{ prev.link|e }}" />
  145. {%- endif %}
  146. {%- endblock %}
  147. {%- block extrahead %} {% endblock %}
  148. </head>
  149. <body>
  150. <div class="header-wrapper">
  151. <div class="header">
  152. <h1><a href="{{ pathto(master_doc) }}">{{ shorttitle|e }}</a></h1>
  153. <div class="rel">
  154. {%- for rellink in rellinks %}
  155. <a href="{{ pathto(rellink[0]) }}" title="{{ rellink[1]|striptags }}"
  156. {{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a>
  157. {%- if not loop.last %}{{ reldelim2 }}{% endif %}
  158. {%- endfor %}
  159. </div>
  160. </div>
  161. </div>
  162. <div class="content-wrapper">
  163. <div class="content">
  164. <div class="document">
  165. {%- block document %}
  166. <div class="documentwrapper">
  167. {%- if not embedded %}{% if not theme_nosidebar|tobool %}
  168. <div class="bodywrapper">
  169. {%- endif %}{% endif %}
  170. <div class="body">
  171. {% block body %} {% endblock %}
  172. </div>
  173. {%- if not embedded %}{% if not theme_nosidebar|tobool %}
  174. </div>
  175. {%- endif %}{% endif %}
  176. </div>
  177. {%- endblock %}
  178. </div>
  179. <div class="sidebar">
  180. <h3>{{ _('Contents') }}</h3>
  181. {{ toctree() }}
  182. <h3 style="margin-top: 1.5em;">{{ _('Search') }}</h3>
  183. <form class="search" action="{{ pathto('search') }}" method="get">
  184. <input type="text" name="q" size="18" />
  185. <input type="submit" value="{{ _('Go') }}" />
  186. <input type="hidden" name="check_keywords" value="yes" />
  187. <input type="hidden" name="area" value="default" />
  188. </form>
  189. <p class="searchtip" style="font-size: 90%">
  190. {{ _('Enter search terms or a module, class or function name.') }}
  191. </p>
  192. </div>
  193. <div class="clearer"></div>
  194. </div>
  195. </div>
  196. <div class="footer-wrapper">
  197. {%- block footer %}
  198. <div class="footer">
  199. <div class="left">
  200. {%- for rellink in rellinks %}
  201. <a href="{{ pathto(rellink[0]) }}" title="{{ rellink[1]|striptags }}"
  202. {{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a>
  203. {%- if not loop.last %}{{ reldelim2 }}{% endif %}
  204. {%- endfor %}
  205. {%- if show_source and has_source and sourcename %}
  206. <br/>
  207. <a href="{{ pathto('_sources/' + sourcename, true)|e }}"
  208. rel="nofollow">{{ _('Show Source') }}</a>
  209. {%- endif %}
  210. </div>
  211. <div class="right">
  212. {%- if hasdoc('copyright') %}
  213. {% trans path=pathto('copyright'), copyright=copyright|e %}&copy; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
  214. {%- else %}
  215. {% trans copyright=copyright|e %}&copy; Copyright {{ copyright }}.{% endtrans %}
  216. {%- endif %}
  217. {%- if last_updated %}
  218. {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
  219. {%- endif %}
  220. {%- if show_sphinx %}<br/>
  221. {% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
  222. {%- endif %}
  223. </div>
  224. <div class="clearer"></div>
  225. </div>
  226. {%- endblock %}
  227. </div>
  228. </body>
  229. </html>