index.hbs 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  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="内容目录" 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="切换主题" 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="all">{{ theme_option "全部" }}</button></li>
  110. <li role="none"><button role="menuitem" class="theme" id="tai">{{ theme_option "傣" }}</button></li>
  111. <li role="none"><button role="menuitem" class="theme" id="roman">{{ theme_option "罗马" }}</button></li>
  112. <li role="none"><button role="menuitem" class="theme" id="han">{{ theme_option "汉字注音" }}</button></li>
  113. </ul>
  114. {{#if search_enabled}}
  115. <button id="search-toggle" class="icon-button" type="button" title="搜索 快捷键:S" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
  116. <i class="fa fa-search" ></i>
  117. </button>
  118. {{/if}}
  119. </div>
  120. <h1 class="menu-title">{{ book_title }}</h1>
  121. <div class="right-buttons">
  122. <a href="https://gitee.com/jinghong-dajin-pagoda/fofazhishi" target="_blank"><i class="fa">
  123. <svg id="gitee_logo" class="icon" style="height: 16px;width: 16px;" viewBox="0 0 56 56" fill="#747474" xmlns="http://www.w3.org/2000/svg">
  124. <path d="M27.9094271,0 C43.323378,0 55.8188541,12.4954761 55.8188541,27.9094271 C55.8188541,43.323378 43.323378,55.8188541 27.9094271,55.8188541 C12.4954761,55.8188541 0,43.323378 0,27.9094271 C0,12.4954761 12.4954761,0 27.9094271,0 Z M42.0372834,12.40419 C42.0369985,12.4041899 42.0367135,12.4041898 42.0364286,12.4050443 L22.7409577,12.4050443 C17.0321184,12.4050443 12.4041898,17.0329729 12.4041898,22.7418122 L12.4041898,42.0364286 C12.4041898,42.7976072 13.021247,43.4146643 13.7824255,43.4146643 L34.1117768,43.4146643 C39.2496197,43.4146643 43.4146643,39.2496197 43.4146643,34.1117768 L43.4146643,26.187125 C43.4146643,25.4259464 42.7976072,24.8088893 42.0364286,24.8088893 L26.1867179,24.8088893 C25.4256803,24.8092503 24.8086815,25.4260875 24.8081213,26.187125 L24.807219,29.6325761 C24.8066809,30.3489793 25.3531034,30.9378612 26.0519898,31.0048287 L26.1847213,31.0111726 C26.1848455,31.0111726 26.1849696,31.0111726 26.1850937,31.0108003 L35.8343679,31.0107199 C36.5507712,31.0107031 37.1395145,31.5572949 37.2063048,32.2561994 L37.2126036,32.3889441 L37.2126036,32.3889441 L37.2126036,33.0780271 C37.2126036,35.3615628 35.3614322,37.2127342 33.0778965,37.2127342 L19.9836314,37.2127342 C19.2225621,37.2126963 18.6055876,36.5957388 18.6055287,35.8346695 L18.6051677,22.7416739 C18.6049962,20.5273363 20.3456221,18.7195081 22.5332835,18.6119187 L22.7397609,18.6069668 L22.7397609,18.6069668 L42.0325819,18.6069668 C42.7934267,18.6061117 43.4103455,17.9895754 43.4116725,17.2287314 L43.4138095,13.7832798 C43.4151362,13.0221019 42.7984619,12.4046621 42.0372834,12.40419 Z" id="Combined-Shape" />
  125. </svg>
  126. </i></a>
  127. {{#if print_enable}}
  128. <a href="{{ path_to_root }}print.html" title="Print this book" aria-label="Print this book">
  129. <i id="print-button" class="fa fa-print"></i>
  130. </a>
  131. {{/if}}
  132. {{#if git_repository_url}}
  133. <a href="{{git_repository_url}}" title="Git repository" aria-label="Git repository">
  134. <i id="git-repository-button" class="fa {{git_repository_icon}}"></i>
  135. </a>
  136. {{/if}}
  137. {{#if git_repository_edit_url}}
  138. <a href="{{git_repository_edit_url}}" title="Suggest an edit" aria-label="Suggest an edit">
  139. <i id="git-edit-button" class="fa fa-edit"></i>
  140. </a>
  141. {{/if}}
  142. <a href="javascript:openQrcode()" ><i class="fa fa-qrcode" aria-hidden="true"></i></a>
  143. </div>
  144. </div>
  145. {{#if search_enabled}}
  146. <div id="search-wrapper" class="hidden">
  147. <form id="searchbar-outer" class="searchbar-outer">
  148. <input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
  149. </form>
  150. <div id="searchresults-outer" class="searchresults-outer hidden">
  151. <div id="searchresults-header" class="searchresults-header"></div>
  152. <ul id="searchresults">
  153. </ul>
  154. </div>
  155. </div>
  156. {{/if}}
  157. <!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
  158. <script type="text/javascript">
  159. document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
  160. document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
  161. Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
  162. link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
  163. });
  164. </script>
  165. <div id="content" class="content">
  166. <main>
  167. {{{ content }}}
  168. </main>
  169. <nav class="nav-wrapper" aria-label="Page navigation">
  170. <!-- Mobile navigation buttons -->
  171. {{#previous}}
  172. <a rel="prev" href="{{ path_to_root }}{{link}}" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
  173. <i class="fa fa-angle-left"></i>
  174. </a>
  175. {{/previous}}
  176. {{#next}}
  177. <a rel="next" href="{{ path_to_root }}{{link}}" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
  178. <i class="fa fa-angle-right"></i>
  179. </a>
  180. {{/next}}
  181. <div style="clear: both"></div>
  182. </nav>
  183. </div>
  184. </div>
  185. <nav class="nav-wide-wrapper" aria-label="Page navigation">
  186. {{#previous}}
  187. <a rel="prev" href="{{ path_to_root }}{{link}}" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
  188. <i class="fa fa-angle-left"></i>
  189. </a>
  190. {{/previous}}
  191. {{#next}}
  192. <a rel="next" href="{{ path_to_root }}{{link}}" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
  193. <i class="fa fa-angle-right"></i>
  194. </a>
  195. {{/next}}
  196. </nav>
  197. </div>
  198. {{#if livereload}}
  199. <!-- Livereload script (if served using the cli tool) -->
  200. <script type="text/javascript">
  201. var socket = new WebSocket("{{{livereload}}}");
  202. socket.onmessage = function (event) {
  203. if (event.data === "reload") {
  204. socket.close();
  205. location.reload();
  206. }
  207. };
  208. window.onbeforeunload = function() {
  209. socket.close();
  210. }
  211. </script>
  212. {{/if}}
  213. {{#if google_analytics}}
  214. <!-- Google Analytics Tag -->
  215. <script type="text/javascript">
  216. var localAddrs = ["localhost", "127.0.0.1", ""];
  217. // make sure we don't activate google analytics if the developer is
  218. // inspecting the book locally...
  219. if (localAddrs.indexOf(document.location.hostname) === -1) {
  220. (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  221. (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  222. m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  223. })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
  224. ga('create', '{{google_analytics}}', 'auto');
  225. ga('send', 'pageview');
  226. }
  227. </script>
  228. {{/if}}
  229. {{#if playground_line_numbers}}
  230. <script type="text/javascript">
  231. window.playground_line_numbers = true;
  232. </script>
  233. {{/if}}
  234. {{#if playground_copyable}}
  235. <script type="text/javascript">
  236. window.playground_copyable = true;
  237. </script>
  238. {{/if}}
  239. {{#if playground_js}}
  240. <script src="{{ path_to_root }}ace.js" type="text/javascript" charset="utf-8"></script>
  241. <script src="{{ path_to_root }}editor.js" type="text/javascript" charset="utf-8"></script>
  242. <script src="{{ path_to_root }}mode-rust.js" type="text/javascript" charset="utf-8"></script>
  243. <script src="{{ path_to_root }}theme-dawn.js" type="text/javascript" charset="utf-8"></script>
  244. <script src="{{ path_to_root }}theme-tomorrow_night.js" type="text/javascript" charset="utf-8"></script>
  245. {{/if}}
  246. {{#if search_js}}
  247. <script src="{{ path_to_root }}elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
  248. <script src="{{ path_to_root }}mark.min.js" type="text/javascript" charset="utf-8"></script>
  249. <script src="{{ path_to_root }}searcher.js" type="text/javascript" charset="utf-8"></script>
  250. {{/if}}
  251. <script src="{{ path_to_root }}clipboard.min.js" type="text/javascript" charset="utf-8"></script>
  252. <script src="{{ path_to_root }}highlight.js" type="text/javascript" charset="utf-8"></script>
  253. <script src="{{ path_to_root }}book.js" type="text/javascript" charset="utf-8"></script>
  254. <!-- Custom JS scripts -->
  255. {{#each additional_js}}
  256. <script type="text/javascript" src="{{ ../path_to_root }}{{this}}"></script>
  257. {{/each}}
  258. {{#if is_print}}
  259. {{#if mathjax_support}}
  260. <script type="text/javascript">
  261. window.addEventListener('load', function() {
  262. MathJax.Hub.Register.StartupHook('End', function() {
  263. window.setTimeout(window.print, 100);
  264. });
  265. });
  266. </script>
  267. {{else}}
  268. <script type="text/javascript">
  269. window.addEventListener('load', function() {
  270. window.setTimeout(window.print, 100);
  271. });
  272. </script>
  273. {{/if}}
  274. {{/if}}
  275. <div id="qrcode" style="margin:1rem;display:none;"></div>
  276. <script>
  277. new QRCode($('#qrcode')[0], location.href); // 设置要生成二维码的链接
  278. function openQrcode(){
  279. layer.open({
  280. type: 1,
  281. title: false,
  282. content: $('#qrcode') //这里content是一个DOM,注意:最好该元素要存放在body最外层,否则可能被其它的相对元素所影响
  283. });
  284. }
  285. </script>
  286. </body>
  287. </html>