layout_old.html 7.2 KB

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