layout.html 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  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,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700&subset=latin,cyrillic' rel='stylesheet' type='text/css'>
  24. {# OPENSEARCH #}
  25. {% if not embedded %}
  26. {% if use_opensearch %}
  27. <link rel="search" type="application/opensearchdescription+xml" title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}" href="{{ pathto('_static/opensearch.xml', 1) }}"/>
  28. {% endif %}
  29. {% endif %}
  30. {# RTD hosts this file, so just load on non RTD builds #}
  31. {% if not READTHEDOCS %}
  32. <link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
  33. {% endif %}
  34. {% for cssfile in css_files %}
  35. <link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
  36. {% endfor %}
  37. {%- block linktags %}
  38. {%- if hasdoc('about') %}
  39. <link rel="author" title="{{ _('About these documents') }}"
  40. href="{{ pathto('about') }}"/>
  41. {%- endif %}
  42. {%- if hasdoc('genindex') %}
  43. <link rel="index" title="{{ _('Index') }}"
  44. href="{{ pathto('genindex') }}"/>
  45. {%- endif %}
  46. {%- if hasdoc('search') %}
  47. <link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}"/>
  48. {%- endif %}
  49. {%- if hasdoc('copyright') %}
  50. <link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}"/>
  51. {%- endif %}
  52. <link rel="top" title="{{ docstitle|e }}" href="{{ pathto('index') }}"/>
  53. {%- if parents %}
  54. <link rel="up" title="{{ parents[-1].title|striptags|e }}" href="{{ parents[-1].link|e }}"/>
  55. {%- endif %}
  56. {%- if next %}
  57. <link rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}"/>
  58. {%- endif %}
  59. {%- if prev %}
  60. <link rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}"/>
  61. {%- endif %}
  62. {%- endblock %}
  63. {%- block extrahead %} {% endblock %}
  64. {# Keep modernizr in head - http://modernizr.com/docs/#installing #}
  65. <script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
  66. </head>
  67. <body class="wy-body-for-nav" role="document">
  68. <div class="wy-grid-for-nav">
  69. {# SIDE NAV, TOGGLES ON MOBILE #}
  70. <nav data-toggle="wy-nav-shift" class="wy-nav-side">
  71. <div class="wy-side-nav-search">
  72. {% block sidebartitle %}
  73. <a href="{{ pathto(master_doc) }}"><img src="{{ pathto('_static/elgg_logo.png', 1) }}" alt="{{ project }}" /></a>
  74. {% endblock %}
  75. {% include "searchbox.html" %}
  76. </div>
  77. <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
  78. {% block menu %}
  79. {% set toctree = toctree(maxdepth=2, collapse=False, includehidden=True) %}
  80. {% if toctree %}
  81. {{ toctree }}
  82. {% else %}
  83. <!-- Local TOC -->
  84. <div class="local-toc">{{ toc }}</div>
  85. {% endif %}
  86. {% endblock %}
  87. </div>
  88. &nbsp;
  89. </nav>
  90. <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
  91. {# MOBILE NAV, TRIGGLES SIDE NAV ON TOGGLE #}
  92. <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
  93. <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
  94. <a href="{{ pathto(master_doc) }}">{{ project }}</a>
  95. </nav>
  96. {# PAGE CONTENT #}
  97. <div class="wy-nav-content">
  98. <div class="rst-content">
  99. {% include "breadcrumbs.html" %}
  100. <div role="main" class="document">
  101. {% block body %}{% endblock %}
  102. </div>
  103. {% include "footer.html" %}
  104. </div>
  105. </div>
  106. </section>
  107. </div>
  108. {% include "versions.html" %}
  109. {% if not embedded %}
  110. <script type="text/javascript">
  111. var DOCUMENTATION_OPTIONS = {
  112. URL_ROOT:'{{ url_root }}',
  113. VERSION:'{{ release|e }}',
  114. COLLAPSE_INDEX:false,
  115. FILE_SUFFIX:'{{ '' if no_search_suffix else file_suffix }}',
  116. HAS_SOURCE: {{ has_source|lower }}
  117. };
  118. </script>
  119. {%- for scriptfile in script_files %}
  120. <script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
  121. {%- endfor %}
  122. {% endif %}
  123. {# RTD hosts this file, so just load on non RTD builds #}
  124. {% if not READTHEDOCS %}
  125. <script type="text/javascript" src="{{ pathto('_static/js/theme.js', 1) }}"></script>
  126. {% endif %}
  127. {# STICKY NAVIGATION #}
  128. {% if theme_sticky_navigation %}
  129. <script type="text/javascript">
  130. jQuery(function () {
  131. ElggRtdTheme.StickyNav.enable();
  132. });
  133. </script>
  134. {% endif %}
  135. {%- block footer %} {% endblock %}
  136. </body>
  137. </html>