base.html 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. {#-
  2. This file was automatically generated - do not edit
  3. -#}
  4. {% import "partials/language.html" as lang with context %}
  5. {% set palette = config.theme.palette %}
  6. {% set font = config.theme.font %}
  7. <!doctype html>
  8. <html lang="{{ lang.t('language') }}" class="no-js">
  9. <head>
  10. {% block site_meta %}
  11. <meta charset="utf-8">
  12. <meta name="viewport" content="width=device-width,initial-scale=1">
  13. {% if page and page.meta and page.meta.description %}
  14. <meta name="description" content="{{ page.meta.description }}">
  15. {% elif config.site_description %}
  16. <meta name="description" content="{{ config.site_description }}">
  17. {% endif %}
  18. {% if page and page.meta and page.meta.redirect %}
  19. <script>var anchor=window.location.hash.substr(1);location.href="{{ page.meta.redirect }}"+(anchor?"#"+anchor:"")</script>
  20. <meta http-equiv="refresh" content="0; url={{ page.meta.redirect }}">
  21. <meta name="robots" content="noindex">
  22. <link rel="canonical" href="{{ page.meta.redirect }}">
  23. {% elif page.canonical_url %}
  24. <link rel="canonical" href="{{ page.canonical_url }}">
  25. {% endif %}
  26. {% if page and page.meta and page.meta.author %}
  27. <meta name="author" content="{{ page.meta.author }}">
  28. {% elif config.site_author %}
  29. <meta name="author" content="{{ config.site_author }}">
  30. {% endif %}
  31. <link rel="shortcut icon" href="{{ config.theme.favicon | url }}">
  32. <meta name="generator" content="mkdocs-{{ mkdocs_version }}, mkdocs-material-5.5.2">
  33. {% endblock %}
  34. {% block htmltitle %}
  35. {% if page and page.meta and page.meta.title %}
  36. <title>{{ page.meta.title }} - {{ config.site_name }}</title>
  37. {% elif page and page.title and not page.is_homepage %}
  38. <title>{{ page.title | striptags }} - {{ config.site_name }}</title>
  39. {% else %}
  40. <title>{{ config.site_name }}</title>
  41. {% endif %}
  42. {% endblock %}
  43. {% block styles %}
  44. <link rel="stylesheet" href="{{ 'assets/stylesheets/main.25b81cc6.min.css' | url }}">
  45. {% if palette.scheme or palette.primary or palette.accent %}
  46. <link rel="stylesheet" href="{{ 'assets/stylesheets/palette.80a78273.min.css' | url }}">
  47. {% endif %}
  48. {% if palette.primary %}
  49. {% import "partials/palette.html" as map %}
  50. {% set primary = map.primary(
  51. palette.primary | replace(" ", "-") | lower
  52. ) %}
  53. <meta name="theme-color" content="{{ primary }}">
  54. {% endif %}
  55. {% endblock %}
  56. {% block libs %}{% endblock %}
  57. {% block fonts %}
  58. {% if font != false %}
  59. <link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
  60. <link rel="stylesheet" href="https://fonts.googleapis.com/css?family={{
  61. font.text | replace(' ', '+') + ':300,400,400i,700%7C' +
  62. font.code | replace(' ', '+')
  63. }}&display=fallback">
  64. <style>body,input{font-family:"{{ font.text }}",-apple-system,BlinkMacSystemFont,Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"{{ font.code }}",SFMono-Regular,Consolas,Menlo,monospace}</style>
  65. {% endif %}
  66. {% endblock %}
  67. {% if config.extra.manifest %}
  68. <link rel="manifest" href="{{ config.extra.manifest | url }}" crossorigin="use-credentials">
  69. {% endif %}
  70. {% for path in config["extra_css"] %}
  71. <link rel="stylesheet" href="{{ path | url }}">
  72. {% endfor %}
  73. {% block analytics %}
  74. {% if config.google_analytics %}
  75. {% include "partials/integrations/analytics.html" %}
  76. {% endif %}
  77. {% endblock %}
  78. {% block extrahead %}{% endblock %}
  79. </head>
  80. {% set direction = config.theme.direction or lang.t('direction') %}
  81. {% if palette.scheme or palette.primary or palette.accent %}
  82. {% set scheme = palette.scheme | lower %}
  83. {% set primary = palette.primary | replace(" ", "-") | lower %}
  84. {% set accent = palette.accent | replace(" ", "-") | lower %}
  85. <body dir="{{ direction }}" data-md-color-scheme="{{ scheme }}" data-md-color-primary="{{ primary }}" data-md-color-accent="{{ accent }}">
  86. {% else %}
  87. <body dir="{{ direction }}">
  88. {% endif %}
  89. {% if "preference" == palette.scheme %}
  90. <script>matchMedia("(prefers-color-scheme: dark)").matches&&document.body.setAttribute("data-md-color-scheme","slate")</script>
  91. {% endif %}
  92. <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
  93. <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
  94. <label class="md-overlay" for="__drawer"></label>
  95. <div data-md-component="skip">
  96. {% if page.toc | first is defined %}
  97. {% set skip = page.toc | first %}
  98. <a href="{{ skip.url | url }}" class="md-skip">
  99. {{ lang.t('skip.link.title') }}
  100. </a>
  101. {% endif %}
  102. </div>
  103. <div data-md-component="announce">
  104. {% if self.announce() %}
  105. <aside class="md-announce">
  106. <div class="md-announce__inner md-grid md-typeset">
  107. {% block announce %}{% endblock %}
  108. </div>
  109. </aside>
  110. {% endif %}
  111. </div>
  112. {% block header %}
  113. {% include "partials/header.html" %}
  114. {% endblock %}
  115. <div class="md-container" data-md-component="container">
  116. {% block hero %}
  117. {% if page and page.meta and page.meta.hero %}
  118. {% include "partials/hero.html" with context %}
  119. {% endif %}
  120. {% endblock %}
  121. {% block tabs %}
  122. {% if "tabs" in config.theme.features %}
  123. {% include "partials/tabs.html" %}
  124. {% endif %}
  125. {% endblock %}
  126. <main class="md-main" data-md-component="main">
  127. <div class="md-main__inner md-grid">
  128. {% block site_nav %}
  129. {% if nav %}
  130. <div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
  131. <div class="md-sidebar__scrollwrap">
  132. <div class="md-sidebar__inner">
  133. {% include "partials/nav.html" %}
  134. </div>
  135. </div>
  136. </div>
  137. {% endif %}
  138. {% if page.toc %}
  139. <div class="md-sidebar md-sidebar--secondary" data-md-component="toc">
  140. <div class="md-sidebar__scrollwrap">
  141. <div class="md-sidebar__inner">
  142. {% include "partials/toc.html" %}
  143. </div>
  144. </div>
  145. </div>
  146. {% endif %}
  147. {% endblock %}
  148. <div class="md-content">
  149. <article class="md-content__inner md-typeset">
  150. {% block content %}
  151. {% if page.edit_url %}
  152. <a href="{{ page.edit_url }}" title="{{ lang.t('edit.link.title') }}" class="md-content__button md-icon">
  153. {% include ".icons/material/pencil.svg" %}
  154. </a>
  155. {% endif %}
  156. {% block source %}
  157. {% if page and page.meta and page.meta.source %}
  158. {% include "partials/source-link.html" %}
  159. {% endif %}
  160. {% endblock %}
  161. {% if not "\x3ch1" in page.content %}
  162. <h1>{{ page.title | default(config.site_name, true)}}</h1>
  163. {% endif %}
  164. {{ page.content }}
  165. {% if page and page.meta %}
  166. {% if page.meta.git_revision_date_localized or
  167. page.meta.revision_date
  168. %}
  169. {% include "partials/source-date.html" %}
  170. {% endif %}
  171. {% endif %}
  172. {% endblock %}
  173. {% block disqus %}
  174. {% include "partials/integrations/disqus.html" %}
  175. {% endblock %}
  176. </article>
  177. </div>
  178. </div>
  179. </main>
  180. {% block footer %}
  181. {% include "partials/footer.html" %}
  182. {% endblock %}
  183. </div>
  184. {% block scripts %}
  185. <script src="{{ 'assets/javascripts/vendor.592d4e23.min.js' | url }}"></script>
  186. <script src="{{ 'assets/javascripts/bundle.806ca5c4.min.js' | url }}"></script>
  187. {%- set translations = {} -%}
  188. {%- for key in [
  189. "clipboard.copy",
  190. "clipboard.copied",
  191. "search.config.lang",
  192. "search.config.pipeline",
  193. "search.config.separator",
  194. "search.result.placeholder",
  195. "search.result.none",
  196. "search.result.one",
  197. "search.result.other"
  198. ] -%}
  199. {%- set _ = translations.update({ key: lang.t(key) }) -%}
  200. {%- endfor -%}
  201. <script id="__lang" type="application/json">
  202. {{- translations | tojson -}}
  203. </script>
  204. {% block config %}{% endblock %}
  205. <script>
  206. app = initialize({
  207. base: "{{ base_url }}",
  208. features: {{ config.theme.features | tojson }},
  209. search: Object.assign({
  210. worker: "{{ 'assets/javascripts/worker/search.01088dc6.min.js' | url }}"
  211. }, typeof search !== "undefined" && search)
  212. })
  213. </script>
  214. {% for path in config["extra_javascript"] %}
  215. <script src="{{ path | url }}"></script>
  216. {% endfor %}
  217. {% endblock %}
  218. </body>
  219. </html>