1
+ <!DOCTYPE HTML>
2
+ <html lang =" {{ language }} " class =" {{ default_theme }} " dir =" {{ text_direction }} " >
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
+
14
+
15
+ <!-- Custom HTML head -->
16
+ {{> head }}
17
+
18
+ <meta name =" description" content =" {{ description }} " >
19
+ <meta name =" viewport" content =" width=device-width, initial-scale=1" >
20
+ <meta name =" theme-color" content =" #ffffff" >
21
+
22
+ {{ #if favicon_svg }}
23
+ <link rel =" icon" href =" {{ path_to_root }} favicon.svg" >
24
+ {{ /if }}
25
+ {{ #if favicon_png }}
26
+ <link rel =" shortcut icon" href =" {{ path_to_root }} favicon.png" >
27
+ {{ /if }}
28
+ <link rel =" stylesheet" href =" {{ path_to_root }} css/variables.css" >
29
+ <link rel =" stylesheet" href =" {{ path_to_root }} css/general.css" >
30
+ <link rel =" stylesheet" href =" {{ path_to_root }} css/chrome.css" >
31
+ {{ #if print_enable }}
32
+ <link rel =" stylesheet" href =" {{ path_to_root }} css/print.css" media =" print" >
33
+ {{ /if }}
34
+
35
+ <!-- Fonts -->
36
+ <link rel =" stylesheet" href =" {{ path_to_root }} FontAwesome/css/font-awesome.css" >
37
+ {{ #if copy_fonts }}
38
+ <link rel =" stylesheet" href =" {{ path_to_root }} fonts/fonts.css" >
39
+ {{ /if }}
40
+
41
+ <!-- Highlight.js Stylesheets -->
42
+ <link rel =" stylesheet" href =" {{ path_to_root }} highlight.css" >
43
+ <link rel =" stylesheet" href =" {{ path_to_root }} tomorrow-night.css" >
44
+ <link rel =" stylesheet" href =" {{ path_to_root }} ayu-highlight.css" >
45
+
46
+ <!-- Custom theme stylesheets -->
47
+ {{ #each additional_css }}
48
+ <link rel =" stylesheet" href =" {{ ../path_to_root }}{{ this }} " >
49
+ {{ /each }}
50
+
51
+ {{ #if mathjax_support }}
52
+ <!-- MathJax -->
53
+ <script async src =" https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML" ></script >
54
+ {{ /if }}
55
+ </head >
56
+ <body class =" sidebar-visible no-js" >
57
+ <div id =" body-container" >
58
+ <!-- Provide site root to javascript -->
59
+ <script >
60
+ var path_to_root = " {{ path_to_root }}" ;
61
+ var default_theme = window .matchMedia (" (prefers-color-scheme: dark)" ).matches ? " {{ preferred_dark_theme }}" : " {{ default_theme }}" ;
62
+ </script >
63
+
64
+ <!-- Work around some values being stored in localStorage wrapped in quotes -->
65
+ <script >
66
+ try {
67
+ var theme = localStorage .getItem (' mdbook-theme' );
68
+ var sidebar = localStorage .getItem (' mdbook-sidebar' );
69
+
70
+ if (theme .startsWith (' "' ) && theme .endsWith (' "' )) {
71
+ localStorage .setItem (' mdbook-theme' , theme .slice (1 , theme .length - 1 ));
72
+ }
73
+
74
+ if (sidebar .startsWith (' "' ) && sidebar .endsWith (' "' )) {
75
+ localStorage .setItem (' mdbook-sidebar' , sidebar .slice (1 , sidebar .length - 1 ));
76
+ }
77
+ } catch (e) { }
78
+ </script >
79
+
80
+ <!-- Set the theme before any content is loaded, prevents flash -->
81
+ <script >
82
+ var theme;
83
+ try { theme = localStorage .getItem (' mdbook-theme' ); } catch (e) { }
84
+ if (theme === null || theme === undefined ) { theme = default_theme; }
85
+ var html = document .querySelector (' html' );
86
+ html .classList .remove (' {{ default_theme }}' )
87
+ html .classList .add (theme);
88
+ var body = document .querySelector (' body' );
89
+ body .classList .remove (' no-js' )
90
+ body .classList .add (' js' );
91
+ </script >
92
+
93
+ <input type =" checkbox" id =" sidebar-toggle-anchor" class =" hidden" >
94
+
95
+ <!-- Hide / unhide sidebar before it is displayed -->
96
+ <script >
97
+ var body = document .querySelector (' body' );
98
+ var sidebar = null ;
99
+ var sidebar_toggle = document .getElementById (" sidebar-toggle-anchor" );
100
+ if (document .body .clientWidth >= 1080 ) {
101
+ try { sidebar = localStorage .getItem (' mdbook-sidebar' ); } catch (e) { }
102
+ sidebar = sidebar || ' visible' ;
103
+ } else {
104
+ sidebar = ' hidden' ;
105
+ }
106
+ sidebar_toggle .checked = sidebar === ' visible' ;
107
+ body .classList .remove (' sidebar-visible' );
108
+ body .classList .add (" sidebar-" + sidebar);
109
+ </script >
110
+
111
+ <nav id =" sidebar" class =" sidebar" aria-label =" Table of contents" >
112
+ <div class =" sidebar-scrollbox" >
113
+ {{ #toc }} {{ /toc }}
114
+ </div >
115
+ <div id =" sidebar-resize-handle" class =" sidebar-resize-handle" ></div >
116
+ </nav >
117
+
118
+ <!-- Track and set sidebar scroll position -->
119
+ <script >
120
+ var sidebarScrollbox = document .querySelector (' #sidebar .sidebar-scrollbox' );
121
+ sidebarScrollbox .addEventListener (' click' , function (e ) {
122
+ if (e .target .tagName === ' A' ) {
123
+ sessionStorage .setItem (' sidebar-scroll' , sidebarScrollbox .scrollTop );
124
+ }
125
+ }, { passive: true });
126
+ var sidebarScrollTop = sessionStorage .getItem (' sidebar-scroll' );
127
+ sessionStorage .removeItem (' sidebar-scroll' );
128
+ if (sidebarScrollTop) {
129
+ // preserve sidebar scroll position when navigating via links within sidebar
130
+ sidebarScrollbox .scrollTop = sidebarScrollTop;
131
+ } else {
132
+ // scroll sidebar to current active section when navigating via "next/previous chapter" buttons
133
+ var activeSection = document .querySelector (' #sidebar .active' );
134
+ if (activeSection) {
135
+ activeSection .scrollIntoView ({ block: ' center' });
136
+ }
137
+ }
138
+ </script >
139
+
140
+ <div id =" page-wrapper" class =" page-wrapper" >
141
+
142
+ <div class =" page" >
143
+ {{> header }}
144
+ <div id =" menu-bar-hover-placeholder" ></div >
145
+ <div id =" menu-bar" class =" menu-bar sticky" >
146
+ <div class =" left-buttons" >
147
+ <label id =" sidebar-toggle" class =" icon-button" for =" sidebar-toggle-anchor" title =" Toggle Table of Contents" aria-label =" Toggle Table of Contents" aria-controls =" sidebar" >
148
+ <i class =" fa fa-bars" ></i >
149
+ </label >
150
+ <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" >
151
+ <i class =" fa fa-paint-brush" ></i >
152
+ </button >
153
+ <ul id =" theme-list" class =" theme-popup" aria-label =" Themes" role =" menu" >
154
+ <li role =" none" ><button role =" menuitem" class =" theme" id =" light" >Light</button ></li >
155
+ <li role =" none" ><button role =" menuitem" class =" theme" id =" rust" >Rust</button ></li >
156
+ <li role =" none" ><button role =" menuitem" class =" theme" id =" coal" >Coal</button ></li >
157
+ <li role =" none" ><button role =" menuitem" class =" theme" id =" navy" >Navy</button ></li >
158
+ <li role =" none" ><button role =" menuitem" class =" theme" id =" ayu" >Ayu</button ></li >
159
+ <li role =" none" ><button role =" menuitem" class =" theme" id =" latte" >Latte</button ></li >
160
+ <li role =" none" ><button role =" menuitem" class =" theme" id =" frappe" >Frappé</button ></li >
161
+ <li role =" none" ><button role =" menuitem" class =" theme" id =" macchiato" >Macchiato</button ></li >
162
+ <li role =" none" ><button role =" menuitem" class =" theme" id =" mocha" >Mocha</button ></li >
163
+ </ul >
164
+ {{ #if search_enabled }}
165
+ <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" >
166
+ <i class =" fa fa-search" ></i >
167
+ </button >
168
+ {{ /if }}
169
+ </div >
170
+
171
+ <h1 class =" menu-title" >{{ book_title }} </h1 >
172
+
173
+ <div class =" right-buttons" >
174
+ {{ #if print_enable }}
175
+ <a href =" {{ path_to_root }} print.html" title =" Print this book" aria-label =" Print this book" >
176
+ <i id =" print-button" class =" fa fa-print" ></i >
177
+ </a >
178
+ {{ /if }}
179
+ {{ #if git_repository_url }}
180
+ <a href =" {{ git_repository_url }} " title =" Git repository" aria-label =" Git repository" >
181
+ <i id =" git-repository-button" class =" fa {{ git_repository_icon }} " ></i >
182
+ </a >
183
+ {{ /if }}
184
+ {{ #if git_repository_edit_url }}
185
+ <a href =" {{ git_repository_edit_url }} " title =" Suggest an edit" aria-label =" Suggest an edit" >
186
+ <i id =" git-edit-button" class =" fa fa-edit" ></i >
187
+ </a >
188
+ {{ /if }}
189
+
190
+ </div >
191
+ </div >
192
+
193
+ {{ #if search_enabled }}
194
+ <div id =" search-wrapper" class =" hidden" >
195
+ <form id =" searchbar-outer" class =" searchbar-outer" >
196
+ <input type =" search" id =" searchbar" name =" searchbar" placeholder =" Search this book ..." aria-controls =" searchresults-outer" aria-describedby =" searchresults-header" >
197
+ </form >
198
+ <div id =" searchresults-outer" class =" searchresults-outer hidden" >
199
+ <div id =" searchresults-header" class =" searchresults-header" ></div >
200
+ <ul id =" searchresults" >
201
+ </ul >
202
+ </div >
203
+ </div >
204
+ {{ /if }}
205
+
206
+ <!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
207
+ <script >
208
+ document .getElementById (' sidebar-toggle' ).setAttribute (' aria-expanded' , sidebar === ' visible' );
209
+ document .getElementById (' sidebar' ).setAttribute (' aria-hidden' , sidebar !== ' visible' );
210
+ Array .from (document .querySelectorAll (' #sidebar a' )).forEach (function (link ) {
211
+ link .setAttribute (' tabIndex' , sidebar === ' visible' ? 0 : - 1 );
212
+ });
213
+ </script >
214
+
215
+ <div id =" content" class =" content" >
216
+ <main >
217
+ {{{ content }}}
218
+ </main >
219
+
220
+ <nav class =" nav-wrapper" aria-label =" Page navigation" >
221
+ <!-- Mobile navigation buttons -->
222
+ {{ #previous }}
223
+ <a rel =" prev" href =" {{ path_to_root }}{{ link }} " class =" mobile-nav-chapters previous" title =" Previous chapter" aria-label =" Previous chapter" aria-keyshortcuts =" Left" >
224
+ <i class =" fa fa-angle-left" ></i >
225
+ </a >
226
+ {{ /previous }}
227
+
228
+ {{ #next }}
229
+ <a rel =" next prefetch" href =" {{ path_to_root }}{{ link }} " class =" mobile-nav-chapters next" title =" Next chapter" aria-label =" Next chapter" aria-keyshortcuts =" Right" >
230
+ <i class =" fa fa-angle-right" ></i >
231
+ </a >
232
+ {{ /next }}
233
+
234
+ <div style =" clear: both" ></div >
235
+ </nav >
236
+ </div >
237
+ </div >
238
+
239
+ <nav class =" nav-wide-wrapper" aria-label =" Page navigation" >
240
+ {{ #previous }}
241
+ <a rel =" prev" href =" {{ path_to_root }}{{ link }} " class =" nav-chapters previous" title =" Previous chapter" aria-label =" Previous chapter" aria-keyshortcuts =" Left" >
242
+ <i class =" fa fa-angle-left" ></i >
243
+ </a >
244
+ {{ /previous }}
245
+
246
+ {{ #next }}
247
+ <a rel =" next prefetch" href =" {{ path_to_root }}{{ link }} " class =" nav-chapters next" title =" Next chapter" aria-label =" Next chapter" aria-keyshortcuts =" Right" >
248
+ <i class =" fa fa-angle-right" ></i >
249
+ </a >
250
+ {{ /next }}
251
+ </nav >
252
+
253
+ </div >
254
+
255
+ {{ #if live_reload_endpoint }}
256
+ <!-- Livereload script (if served using the cli tool) -->
257
+ <script >
258
+ const wsProtocol = location .protocol === ' https:' ? ' wss:' : ' ws:' ;
259
+ const wsAddress = wsProtocol + " //" + location .host + " /" + " {{{live_reload_endpoint}}}" ;
260
+ const socket = new WebSocket (wsAddress);
261
+ socket .onmessage = function (event ) {
262
+ if (event .data === " reload" ) {
263
+ socket .close ();
264
+ location .reload ();
265
+ }
266
+ };
267
+
268
+ window .onbeforeunload = function () {
269
+ socket .close ();
270
+ }
271
+ </script >
272
+ {{ /if }}
273
+
274
+ {{ #if google_analytics }}
275
+ <!-- Google Analytics Tag -->
276
+ <script >
277
+ var localAddrs = [" localhost" , " 127.0.0.1" , " " ];
278
+
279
+ // make sure we don't activate google analytics if the developer is
280
+ // inspecting the book locally...
281
+ if (localAddrs .indexOf (document .location .hostname ) === - 1 ) {
282
+ (function (i ,s ,o ,g ,r ,a ,m ){i[' GoogleAnalyticsObject' ]= r;i[r]= i[r]|| function (){
283
+ (i[r].q = i[r].q || []).push (arguments )},i[r].l = 1 * new Date ();a= s .createElement (o),
284
+ m= s .getElementsByTagName (o)[0 ];a .async = 1 ;a .src = g;m .parentNode .insertBefore (a,m)
285
+ })(window ,document ,' script' ,' https://www.google-analytics.com/analytics.js' ,' ga' );
286
+
287
+ ga (' create' , ' {{google_analytics}}' , ' auto' );
288
+ ga (' send' , ' pageview' );
289
+ }
290
+ </script >
291
+ {{ /if }}
292
+
293
+ {{ #if playground_line_numbers }}
294
+ <script >
295
+ window .playground_line_numbers = true ;
296
+ </script >
297
+ {{ /if }}
298
+
299
+ {{ #if playground_copyable }}
300
+ <script >
301
+ window .playground_copyable = true ;
302
+ </script >
303
+ {{ /if }}
304
+
305
+ {{ #if playground_js }}
306
+ <script src =" {{ path_to_root }} ace.js" ></script >
307
+ <script src =" {{ path_to_root }} editor.js" ></script >
308
+ <script src =" {{ path_to_root }} mode-rust.js" ></script >
309
+ <script src =" {{ path_to_root }} theme-dawn.js" ></script >
310
+ <script src =" {{ path_to_root }} theme-tomorrow_night.js" ></script >
311
+ {{ /if }}
312
+
313
+ {{ #if search_js }}
314
+ <script src =" {{ path_to_root }} elasticlunr.min.js" ></script >
315
+ <script src =" {{ path_to_root }} mark.min.js" ></script >
316
+ <script src =" {{ path_to_root }} searcher.js" ></script >
317
+ {{ /if }}
318
+
319
+ <script src =" {{ path_to_root }} clipboard.min.js" ></script >
320
+ <script src =" {{ path_to_root }} highlight.js" ></script >
321
+ <script src =" {{ path_to_root }} book.js" ></script >
322
+
323
+ <!-- Custom JS scripts -->
324
+ {{ #each additional_js }}
325
+ <script src =" {{ ../path_to_root }}{{ this }} " ></script >
326
+ {{ /each }}
327
+
328
+ {{ #if is_print }}
329
+ {{ #if mathjax_support }}
330
+ <script >
331
+ window .addEventListener (' load' , function () {
332
+ MathJax .Hub .Register .StartupHook (' End' , function () {
333
+ window .setTimeout (window .print , 100 );
334
+ });
335
+ });
336
+ </script >
337
+ {{ else }}
338
+ <script >
339
+ window .addEventListener (' load' , function () {
340
+ window .setTimeout (window .print , 100 );
341
+ });
342
+ </script >
343
+ {{ /if }}
344
+ {{ /if }}
345
+
346
+ </div >
347
+ </body >
348
+ </html >
0 commit comments