layout.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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="_static/js/theme.js"></script>
  46. {% endif %}
  47. {% for cssfile in css_files %}
  48. <link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
  49. {% endfor %}
  50. {%- block linktags %}
  51. {%- if hasdoc('about') %}
  52. <link rel="author" title="{{ _('About these documents') }}"
  53. href="{{ pathto('about') }}"/>
  54. {%- endif %}
  55. {%- if hasdoc('genindex') %}
  56. <link rel="index" title="{{ _('Index') }}"
  57. href="{{ pathto('genindex') }}"/>
  58. {%- endif %}
  59. {%- if hasdoc('search') %}
  60. <link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}"/>
  61. {%- endif %}
  62. {%- if hasdoc('copyright') %}
  63. <link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}"/>
  64. {%- endif %}
  65. <link rel="top" title="{{ docstitle|e }}" href="{{ pathto('index') }}"/>
  66. {%- if parents %}
  67. <link rel="up" title="{{ parents[-1].title|striptags|e }}" href="{{ parents[-1].link|e }}"/>
  68. {%- endif %}
  69. {%- if next %}
  70. <link rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}"/>
  71. {%- endif %}
  72. {%- if prev %}
  73. <link rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}"/>
  74. {%- endif %}
  75. {%- endblock %}
  76. {%- block extrahead %} {% endblock %}
  77. <script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
  78. </head>
  79. <body class="wy-body-for-nav">
  80. <div class="wy-grid-for-nav">
  81. {# SIDE NAV, TOGGLES ON MOBILE #}
  82. <nav data-toggle="wy-nav-shift" class="wy-nav-side">
  83. <div class="wy-side-nav-search">
  84. <a href="{{ pathto(master_doc) }}" class="icon icon-home"> {{ project }}</a>
  85. {% include "searchbox.html" %}
  86. </div>
  87. <div class="wy-menu wy-menu-vertical" data-spy="affix">
  88. {% set toctree = toctree(maxdepth=2, collapse=False, includehidden=True) %}
  89. {% if toctree %}
  90. {{ toctree }}
  91. {% else %}
  92. <!-- Local TOC -->
  93. <div class="local-toc">{{ toc }}</div>
  94. {% endif %}
  95. </div>
  96. &nbsp;
  97. </nav>
  98. <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
  99. {# MOBILE NAV, TRIGGLES SIDE NAV ON TOGGLE #}
  100. <nav class="wy-nav-top">
  101. <i data-toggle="wy-nav-top" class="icon icon-reorder"></i>
  102. <a href="{{ pathto(master_doc) }}">{{ project }}</a>
  103. </nav>
  104. {# PAGE CONTENT #}
  105. <div class="wy-nav-content">
  106. <div class="rst-content">
  107. {% include "breadcrumbs.html" %}
  108. {% block body %}{% endblock %}
  109. {% include "footer.html" %}
  110. </div>
  111. </div>
  112. </section>
  113. </div>
  114. {% include "versions.html" %}
  115. </body>
  116. </html>