layout.html 7.7 KB

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