|
1 | 1 | <!DOCTYPE HTML>
|
2 |
| -<html lang="{{ language }}" class="sidebar-visible no-js {{ default_theme }}"> |
| 2 | +<html lang="{{ language }}" class="{{ default_theme }}" dir="{{ text_direction }}"> |
3 | 3 | <head>
|
4 | 4 | <!-- Book generated using mdBook -->
|
5 | 5 | <meta charset="UTF-8">
|
6 | 6 | <title>{{ title }}</title>
|
7 | 7 | {{#if is_print }}
|
8 |
| - <meta name="robots" content="noindex" /> |
| 8 | + <meta name="robots" content="noindex"> |
9 | 9 | {{/if}}
|
10 | 10 | {{#if base_url}}
|
11 | 11 | <base href="{{ base_url }}">
|
|
17 | 17 |
|
18 | 18 | <meta name="description" content="{{ description }}">
|
19 | 19 | <meta name="viewport" content="width=device-width, initial-scale=1">
|
20 |
| - <meta name="theme-color" content="#ffffff" /> |
| 20 | + <meta name="theme-color" content="#ffffff"> |
21 | 21 |
|
22 | 22 | {{#if favicon_svg}}
|
23 | 23 | <link rel="icon" href="{{ path_to_root }}favicon.svg">
|
|
34 | 34 |
|
35 | 35 | <!-- Fonts -->
|
36 | 36 | <link rel="stylesheet" href="{{ path_to_root }}FontAwesome/css/font-awesome.css">
|
37 |
| - <link rel="preconnect" href="https://fonts.gstatic.com"> |
38 |
| - <link href="https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;700&display=swap" rel="stylesheet"> |
39 | 37 | {{#if copy_fonts}}
|
40 | 38 | <link rel="stylesheet" href="{{ path_to_root }}fonts/fonts.css">
|
41 | 39 | {{/if}}
|
|
55 | 53 | <script async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
56 | 54 | {{/if}}
|
57 | 55 | </head>
|
58 |
| - <body> |
| 56 | + <body class="sidebar-visible no-js"> |
59 | 57 | <div id="body-container">
|
60 | 58 | <!-- Provide site root to javascript -->
|
61 | 59 | <script>
|
|
85 | 83 | try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
|
86 | 84 | if (theme === null || theme === undefined) { theme = default_theme; }
|
87 | 85 | var html = document.querySelector('html');
|
88 |
| - html.classList.remove('no-js') |
89 | 86 | html.classList.remove('{{ default_theme }}')
|
90 | 87 | html.classList.add(theme);
|
91 |
| - html.classList.add('js'); |
| 88 | + var body = document.querySelector('body'); |
| 89 | + body.classList.remove('no-js') |
| 90 | + body.classList.add('js'); |
92 | 91 | </script>
|
93 | 92 |
|
| 93 | + <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> |
| 94 | + |
94 | 95 | <!-- Hide / unhide sidebar before it is displayed -->
|
95 | 96 | <script>
|
96 |
| - var html = document.querySelector('html'); |
| 97 | + var body = document.querySelector('body'); |
97 | 98 | var sidebar = null;
|
| 99 | + var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); |
98 | 100 | if (document.body.clientWidth >= 1080) {
|
99 | 101 | try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
|
100 | 102 | sidebar = sidebar || 'visible';
|
101 | 103 | } else {
|
102 | 104 | sidebar = 'hidden';
|
103 | 105 | }
|
104 |
| - html.classList.remove('sidebar-visible'); |
105 |
| - html.classList.add("sidebar-" + sidebar); |
| 106 | + sidebar_toggle.checked = sidebar === 'visible'; |
| 107 | + body.classList.remove('sidebar-visible'); |
| 108 | + body.classList.add("sidebar-" + sidebar); |
106 | 109 | </script>
|
107 | 110 |
|
108 | 111 | <nav id="sidebar" class="sidebar" aria-label="Table of contents">
|
|
141 | 144 | <div id="menu-bar-hover-placeholder"></div>
|
142 | 145 | <div id="menu-bar" class="menu-bar sticky">
|
143 | 146 | <div class="left-buttons">
|
144 |
| - <button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> |
| 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"> |
145 | 148 | <i class="fa fa-bars"></i>
|
146 |
| - </button> |
| 149 | + </label> |
147 | 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">
|
148 | 151 | <i class="fa fa-paint-brush"></i>
|
149 | 152 | </button>
|
|
220 | 223 | {{/previous}}
|
221 | 224 |
|
222 | 225 | {{#next}}
|
223 |
| - <a rel="next" href="{{ path_to_root }}{{link}}" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right"> |
| 226 | + <a rel="next prefetch" href="{{ path_to_root }}{{link}}" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right"> |
224 | 227 | <i class="fa fa-angle-right"></i>
|
225 | 228 | </a>
|
226 | 229 | {{/next}}
|
|
238 | 241 | {{/previous}}
|
239 | 242 |
|
240 | 243 | {{#next}}
|
241 |
| - <a rel="next" href="{{ path_to_root }}{{link}}" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right"> |
| 244 | + <a rel="next prefetch" href="{{ path_to_root }}{{link}}" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right"> |
242 | 245 | <i class="fa fa-angle-right"></i>
|
243 | 246 | </a>
|
244 | 247 | {{/next}}
|
|
0 commit comments