layout.html 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  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. <!DOCTYPE html>
  10. <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
  11. <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
  12. <head>
  13. <meta charset="utf-8">
  14. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  15. {% block htmltitle %}
  16. <title>{{ title|striptags|e }}{{ titlesuffix }}</title>
  17. {% endblock %}
  18. {# FAVICON #}
  19. {% if favicon %}
  20. <link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1) }}"/>
  21. {% endif %}
  22. {# CSS #}
  23. <link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
  24. {# JS #}
  25. {% if not embedded %}
  26. <script type="text/javascript">
  27. var DOCUMENTATION_OPTIONS = {
  28. URL_ROOT:'{{ url_root }}',
  29. VERSION:'{{ release|e }}',
  30. COLLAPSE_INDEX:false,
  31. FILE_SUFFIX:'{{ '' if no_search_suffix else file_suffix }}',
  32. HAS_SOURCE: {{ has_source|lower }}
  33. };
  34. </script>
  35. {%- for scriptfile in script_files %}
  36. <script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
  37. {%- endfor %}
  38. {% if use_opensearch %}
  39. <link rel="search" type="application/opensearchdescription+xml" title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}" href="{{ pathto('_static/opensearch.xml', 1) }}"/>
  40. {% endif %}
  41. {% endif %}
  42. {# RTD hosts these file themselves, so just load on non RTD builds #}
  43. {% if not READTHEDOCS %}
  44. <link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
  45. <script type="text/javascript" src="{{ pathto('_static/js/theme.js', 1) }}"></script>
  46. {% endif %}
  47. {# STICKY NAVIGATION #}
  48. {% if theme_sticky_navigation %}
  49. <script type="text/javascript">
  50. jQuery(function () {
  51. SphinxRtdTheme.StickyNav.enable();
  52. });
  53. </script>
  54. {% endif %}
  55. {% for cssfile in css_files %}
  56. <link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
  57. {% endfor %}
  58. {%- block linktags %}
  59. {%- if hasdoc('about') %}
  60. <link rel="author" title="{{ _('About these documents') }}"
  61. href="{{ pathto('about') }}"/>
  62. {%- endif %}
  63. {%- if hasdoc('genindex') %}
  64. <link rel="index" title="{{ _('Index') }}"
  65. href="{{ pathto('genindex') }}"/>
  66. {%- endif %}
  67. {%- if hasdoc('search') %}
  68. <link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}"/>
  69. {%- endif %}
  70. {%- if hasdoc('copyright') %}
  71. <link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}"/>
  72. {%- endif %}
  73. <link rel="top" title="{{ docstitle|e }}" href="{{ pathto('index') }}"/>
  74. {%- if parents %}
  75. <link rel="up" title="{{ parents[-1].title|striptags|e }}" href="{{ parents[-1].link|e }}"/>
  76. {%- endif %}
  77. {%- if next %}
  78. <link rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}"/>
  79. {%- endif %}
  80. {%- if prev %}
  81. <link rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}"/>
  82. {%- endif %}
  83. {%- endblock %}
  84. {%- block extrahead %} {% endblock %}
  85. <script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
  86. </head>
  87. <body class="wy-body-for-nav" role="document">
  88. <div class="wy-grid-for-nav">
  89. {# SIDE NAV, TOGGLES ON MOBILE #}
  90. <nav data-toggle="wy-nav-shift" class="wy-nav-side">
  91. <div class="wy-side-nav-search">
  92. <a href="{{ pathto(master_doc) }}" class="icon icon-home"> {{ project }}</a>
  93. {% include "searchbox.html" %}
  94. </div>
  95. <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
  96. {% set toctree = toctree(maxdepth=2, collapse=False, includehidden=True) %}
  97. {% if toctree %}
  98. {{ toctree }}
  99. {% else %}
  100. <!-- Local TOC -->
  101. <div class="local-toc">{{ toc }}</div>
  102. {% endif %}
  103. </div>
  104. &nbsp;
  105. </nav>
  106. <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
  107. {# MOBILE NAV, TRIGGLES SIDE NAV ON TOGGLE #}
  108. <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
  109. <i data-toggle="wy-nav-top" class="icon icon-reorder"></i>
  110. <a href="{{ pathto(master_doc) }}">{{ project }}</a>
  111. </nav>
  112. {# PAGE CONTENT #}
  113. <div class="wy-nav-content">
  114. <div class="rst-content">
  115. {% include "breadcrumbs.html" %}
  116. <div role="main">
  117. {% block body %}{% endblock %}
  118. </div>
  119. {% include "footer.html" %}
  120. </div>
  121. </div>
  122. </section>
  123. </div>
  124. {% include "versions.html" %}
  125. </body>
  126. </html>