You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

312 lines
14 KiB

  1. <!DOCTYPE HTML>
  2. <html lang="{{ language }}" class="sidebar-visible no-js {{ default_theme }}">
  3. <head>
  4. <!-- Book generated using mdBook -->
  5. <meta charset="UTF-8">
  6. <title>{{ title }}</title>
  7. {{#if is_print }}
  8. <meta name="robots" content="noindex" />
  9. {{/if}}
  10. {{#if base_url}}
  11. <base href="{{ base_url }}">
  12. {{/if}}
  13. <!-- Custom HTML head -->
  14. {{> head}}
  15. <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  16. <meta name="description" content="{{ description }}">
  17. <meta name="viewport" content="width=device-width, initial-scale=1">
  18. <meta name="theme-color" content="#ffffff" />
  19. {{#if favicon_svg}}
  20. <link rel="icon" href="{{ path_to_root }}favicon.svg">
  21. {{/if}}
  22. {{#if favicon_png}}
  23. <link rel="shortcut icon" href="{{ path_to_root }}favicon.png">
  24. {{/if}}
  25. <link rel="stylesheet" href="{{ path_to_root }}css/variables.css">
  26. <link rel="stylesheet" href="{{ path_to_root }}css/general.css">
  27. <link rel="stylesheet" href="{{ path_to_root }}css/chrome.css">
  28. {{#if print_enable}}
  29. <link rel="stylesheet" href="{{ path_to_root }}css/print.css" media="print">
  30. {{/if}}
  31. <!-- Fonts -->
  32. <link rel="stylesheet" href="{{ path_to_root }}FontAwesome/css/font-awesome.css">
  33. {{#if copy_fonts}}
  34. <link rel="stylesheet" href="{{ path_to_root }}fonts/fonts.css">
  35. {{/if}}
  36. <!-- Highlight.js Stylesheets -->
  37. <link rel="stylesheet" href="{{ path_to_root }}highlight.css">
  38. <link rel="stylesheet" href="{{ path_to_root }}tomorrow-night.css">
  39. <link rel="stylesheet" href="{{ path_to_root }}ayu-highlight.css">
  40. <!-- Custom theme stylesheets -->
  41. {{#each additional_css}}
  42. <link rel="stylesheet" href="{{ ../path_to_root }}{{ this }}">
  43. {{/each}}
  44. {{#if mathjax_support}}
  45. <!-- MathJax -->
  46. <script async type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
  47. {{/if}}
  48. </head>
  49. <body>
  50. <!-- Provide site root to javascript -->
  51. <script type="text/javascript">
  52. var path_to_root = "{{ path_to_root }}";
  53. var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "{{ preferred_dark_theme }}" : "{{ default_theme }}";
  54. </script>
  55. <!-- Work around some values being stored in localStorage wrapped in quotes -->
  56. <script type="text/javascript">
  57. try {
  58. var theme = localStorage.getItem('mdbook-theme');
  59. var sidebar = localStorage.getItem('mdbook-sidebar');
  60. if (theme.startsWith('"') && theme.endsWith('"')) {
  61. localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
  62. }
  63. if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
  64. localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
  65. }
  66. } catch (e) { }
  67. </script>
  68. <!-- Set the theme before any content is loaded, prevents flash -->
  69. <script type="text/javascript">
  70. var theme;
  71. try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
  72. if (theme === null || theme === undefined) { theme = default_theme; }
  73. var html = document.querySelector('html');
  74. html.classList.remove('no-js')
  75. html.classList.remove('{{ default_theme }}')
  76. html.classList.add(theme);
  77. html.classList.add('js');
  78. </script>
  79. <!-- Hide / unhide sidebar before it is displayed -->
  80. <script type="text/javascript">
  81. var html = document.querySelector('html');
  82. var sidebar = 'hidden';
  83. if (document.body.clientWidth >= 1080) {
  84. try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
  85. sidebar = sidebar || 'visible';
  86. }
  87. html.classList.remove('sidebar-visible');
  88. html.classList.add("sidebar-" + sidebar);
  89. </script>
  90. <nav id="sidebar" class="sidebar" aria-label="Table of contents">
  91. <div class="sidebar-scrollbox">
  92. {{#toc}}{{/toc}}
  93. </div>
  94. <div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
  95. </nav>
  96. <div id="page-wrapper" class="page-wrapper">
  97. <div class="page">
  98. {{> header}}
  99. <div id="menu-bar-hover-placeholder"></div>
  100. <div id="menu-bar" class="menu-bar sticky bordered">
  101. <div class="left-buttons">
  102. <button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
  103. <i class="fa fa-bars"></i>
  104. </button>
  105. <button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
  106. <i class="fa fa-paint-brush"></i>
  107. </button>
  108. <ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
  109. <li role="none"><button role="menuitem" class="theme" id="light">{{ theme_option "Light" }}</button></li>
  110. <li role="none"><button role="menuitem" class="theme" id="rust">{{ theme_option "Rust" }}</button></li>
  111. <li role="none"><button role="menuitem" class="theme" id="coal">{{ theme_option "Coal" }}</button></li>
  112. <li role="none"><button role="menuitem" class="theme" id="navy">{{ theme_option "Navy" }}</button></li>
  113. <li role="none"><button role="menuitem" class="theme" id="ayu">{{ theme_option "Ayu" }}</button></li>
  114. </ul>
  115. {{#if search_enabled}}
  116. <button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
  117. <i class="fa fa-search"></i>
  118. </button>
  119. {{/if}}
  120. </div>
  121. <h1 class="menu-title">{{ book_title }}</h1>
  122. <div class="right-buttons">
  123. {{#if print_enable}}
  124. <a href="{{ path_to_root }}print.html" title="Print this book" aria-label="Print this book">
  125. <i id="print-button" class="fa fa-print"></i>
  126. </a>
  127. {{/if}}
  128. {{#if git_repository_url}}
  129. <a href="{{git_repository_url}}" title="Git repository" aria-label="Git repository">
  130. <i id="git-repository-button" class="fa {{git_repository_icon}}"></i>
  131. </a>
  132. {{/if}}
  133. {{#if git_repository_edit_url}}
  134. <a href="{{git_repository_edit_url}}" title="Suggest an edit" aria-label="Suggest an edit">
  135. <i id="git-edit-button" class="fa fa-edit"></i>
  136. </a>
  137. {{/if}}
  138. </div>
  139. </div>
  140. {{#if search_enabled}}
  141. <div id="search-wrapper" class="hidden">
  142. <form id="searchbar-outer" class="searchbar-outer">
  143. <input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
  144. </form>
  145. <div id="searchresults-outer" class="searchresults-outer hidden">
  146. <div id="searchresults-header" class="searchresults-header"></div>
  147. <ul id="searchresults">
  148. </ul>
  149. </div>
  150. </div>
  151. {{/if}}
  152. <!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
  153. <script type="text/javascript">
  154. document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
  155. document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
  156. Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
  157. link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
  158. });
  159. </script>
  160. <div id="content" class="content">
  161. <main>
  162. <!-- Page table of contents -->
  163. <div class="sidetoc">
  164. <nav class="pagetoc"></nav>
  165. </div>
  166. {{{ content }}}
  167. </main>
  168. <nav class="nav-wrapper" aria-label="Page navigation">
  169. <!-- Mobile navigation buttons -->
  170. {{#previous}}
  171. <a rel="prev" href="{{ path_to_root }}{{link}}" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
  172. <i class="fa fa-angle-left"></i>
  173. </a>
  174. {{/previous}}
  175. {{#next}}
  176. <a rel="next" href="{{ path_to_root }}{{link}}" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
  177. <i class="fa fa-angle-right"></i>
  178. </a>
  179. {{/next}}
  180. <div style="clear: both"></div>
  181. </nav>
  182. </div>
  183. </div>
  184. <nav class="nav-wide-wrapper" aria-label="Page navigation">
  185. {{#previous}}
  186. <a rel="prev" href="{{ path_to_root }}{{link}}" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
  187. <i class="fa fa-angle-left"></i>
  188. </a>
  189. {{/previous}}
  190. {{#next}}
  191. <a rel="next" href="{{ path_to_root }}{{link}}" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
  192. <i class="fa fa-angle-right"></i>
  193. </a>
  194. {{/next}}
  195. </nav>
  196. </div>
  197. {{#if livereload}}
  198. <!-- Livereload script (if served using the cli tool) -->
  199. <script type="text/javascript">
  200. var socket = new WebSocket("{{{livereload}}}");
  201. socket.onmessage = function (event) {
  202. if (event.data === "reload") {
  203. socket.close();
  204. location.reload();
  205. }
  206. };
  207. window.onbeforeunload = function() {
  208. socket.close();
  209. }
  210. </script>
  211. {{/if}}
  212. {{#if google_analytics}}
  213. <!-- Google Analytics Tag -->
  214. <script type="text/javascript">
  215. var localAddrs = ["localhost", "127.0.0.1", ""];
  216. // make sure we don't activate google analytics if the developer is
  217. // inspecting the book locally...
  218. if (localAddrs.indexOf(document.location.hostname) === -1) {
  219. (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  220. (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  221. m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  222. })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
  223. ga('create', '{{google_analytics}}', 'auto');
  224. ga('send', 'pageview');
  225. }
  226. </script>
  227. {{/if}}
  228. {{#if playground_line_numbers}}
  229. <script type="text/javascript">
  230. window.playground_line_numbers = true;
  231. </script>
  232. {{/if}}
  233. {{#if playground_copyable}}
  234. <script type="text/javascript">
  235. window.playground_copyable = true;
  236. </script>
  237. {{/if}}
  238. {{#if playground_js}}
  239. <script src="{{ path_to_root }}ace.js" type="text/javascript" charset="utf-8"></script>
  240. <script src="{{ path_to_root }}editor.js" type="text/javascript" charset="utf-8"></script>
  241. <script src="{{ path_to_root }}mode-rust.js" type="text/javascript" charset="utf-8"></script>
  242. <script src="{{ path_to_root }}theme-dawn.js" type="text/javascript" charset="utf-8"></script>
  243. <script src="{{ path_to_root }}theme-tomorrow_night.js" type="text/javascript" charset="utf-8"></script>
  244. {{/if}}
  245. {{#if search_js}}
  246. <script src="{{ path_to_root }}elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
  247. <script src="{{ path_to_root }}mark.min.js" type="text/javascript" charset="utf-8"></script>
  248. <script src="{{ path_to_root }}searcher.js" type="text/javascript" charset="utf-8"></script>
  249. {{/if}}
  250. <script src="{{ path_to_root }}clipboard.min.js" type="text/javascript" charset="utf-8"></script>
  251. <script src="{{ path_to_root }}highlight.js" type="text/javascript" charset="utf-8"></script>
  252. <script src="{{ path_to_root }}book.js" type="text/javascript" charset="utf-8"></script>
  253. <!-- Custom JS scripts -->
  254. {{#each additional_js}}
  255. <script type="text/javascript" src="{{ ../path_to_root }}{{this}}"></script>
  256. {{/each}}
  257. {{#if is_print}}
  258. {{#if mathjax_support}}
  259. <script type="text/javascript">
  260. window.addEventListener('load', function() {
  261. MathJax.Hub.Register.StartupHook('End', function() {
  262. window.setTimeout(window.print, 100);
  263. });
  264. });
  265. </script>
  266. {{else}}
  267. <script type="text/javascript">
  268. window.addEventListener('load', function() {
  269. window.setTimeout(window.print, 100);
  270. });
  271. </script>
  272. {{/if}}
  273. {{/if}}
  274. </body>
  275. </html>