fork/helix

git clone https://git.julia.blue/fork/helix

Michael Davisbook: Copy over index.hbs from mdbook 0.4.43436855ad

25.01.1
14.2 KiB326 linesraw
1<!DOCTYPE HTML>
2<html lang="{{ language }}" class="{{ default_theme }} sidebar-visible" 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
56        <!-- Provide site root to javascript -->
57        <script>
58            var path_to_root = "{{ path_to_root }}";
59            var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "{{ preferred_dark_theme }}" : "{{ default_theme }}";
60        </script>
61        <!-- Start loading toc.js asap -->
62        <script src="{{ path_to_root }}toc.js"></script>
63    </head>
64    <body>
65    <div id="body-container">
66        <!-- Work around some values being stored in localStorage wrapped in quotes -->
67        <script>
68            try {
69                var theme = localStorage.getItem('mdbook-theme');
70                var sidebar = localStorage.getItem('mdbook-sidebar');
71
72                if (theme.startsWith('"') && theme.endsWith('"')) {
73                    localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
74                }
75
76                if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
77                    localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
78                }
79            } catch (e) { }
80        </script>
81
82        <!-- Set the theme before any content is loaded, prevents flash -->
83        <script>
84            var theme;
85            try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
86            if (theme === null || theme === undefined) { theme = default_theme; }
87            const html = document.documentElement;
88            html.classList.remove('{{ default_theme }}')
89            html.classList.add(theme);
90            html.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 sidebar = null;
98            var sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
99            if (document.body.clientWidth >= 1080) {
100                try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
101                sidebar = sidebar || 'visible';
102            } else {
103                sidebar = 'hidden';
104            }
105            sidebar_toggle.checked = sidebar === 'visible';
106            html.classList.remove('sidebar-visible');
107            html.classList.add("sidebar-" + sidebar);
108        </script>
109
110        <nav id="sidebar" class="sidebar" aria-label="Table of contents">
111            <!-- populated by js -->
112            <mdbook-sidebar-scrollbox class="sidebar-scrollbox"></mdbook-sidebar-scrollbox>
113            <noscript>
114                <iframe class="sidebar-iframe-outer" src="{{ path_to_root }}toc.html"></iframe>
115            </noscript>
116            <div id="sidebar-resize-handle" class="sidebar-resize-handle">
117                <div class="sidebar-resize-indicator"></div>
118            </div>
119        </nav>
120
121        <div id="page-wrapper" class="page-wrapper">
122
123            <div class="page">
124                {{> header}}
125                <div id="menu-bar-hover-placeholder"></div>
126                <div id="menu-bar" class="menu-bar sticky">
127                    <div class="left-buttons">
128                        <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">
129                            <i class="fa fa-bars"></i>
130                        </label>
131                        <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">
132                            <i class="fa fa-paint-brush"></i>
133                        </button>
134                        <ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
135                            <li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
136                            <li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
137                            <li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
138                            <li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
139                            <li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
140                            <li role="none"><button role="menuitem" class="theme" id="colibri">Colibri</button></li>
141                        </ul>
142                        {{#if search_enabled}}
143                        <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">
144                            <i class="fa fa-search"></i>
145                        </button>
146                        {{/if}}
147                    </div>
148
149                    <h1 class="menu-title">{{ book_title }}</h1>
150
151                    <div class="right-buttons">
152                        {{#if print_enable}}
153                        <a href="{{ path_to_root }}print.html" title="Print this book" aria-label="Print this book">
154                            <i id="print-button" class="fa fa-print"></i>
155                        </a>
156                        {{/if}}
157                        {{#if git_repository_url}}
158                        <a href="{{git_repository_url}}" title="Git repository" aria-label="Git repository">
159                            <i id="git-repository-button" class="fa {{git_repository_icon}}"></i>
160                        </a>
161                        {{/if}}
162                        {{#if git_repository_edit_url}}
163                        <a href="{{git_repository_edit_url}}" title="Suggest an edit" aria-label="Suggest an edit">
164                            <i id="git-edit-button" class="fa fa-edit"></i>
165                        </a>
166                        {{/if}}
167
168                    </div>
169                </div>
170
171                {{#if search_enabled}}
172                <div id="search-wrapper" class="hidden">
173                    <form id="searchbar-outer" class="searchbar-outer">
174                        <input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
175                    </form>
176                    <div id="searchresults-outer" class="searchresults-outer hidden">
177                        <div id="searchresults-header" class="searchresults-header"></div>
178                        <ul id="searchresults">
179                        </ul>
180                    </div>
181                </div>
182                {{/if}}
183
184                <!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
185                <script>
186                    document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
187                    document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
188                    Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
189                        link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
190                    });
191                </script>
192
193                <div id="content" class="content">
194                    <main>
195                        {{{ content }}}
196                    </main>
197
198                    <nav class="nav-wrapper" aria-label="Page navigation">
199                        <!-- Mobile navigation buttons -->
200                        {{#previous}}
201                            <a rel="prev" href="{{ path_to_root }}{{link}}" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
202                                <i class="fa fa-angle-left"></i>
203                            </a>
204                        {{/previous}}
205
206                        {{#next}}
207                            <a rel="next prefetch" href="{{ path_to_root }}{{link}}" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
208                                <i class="fa fa-angle-right"></i>
209                            </a>
210                        {{/next}}
211
212                        <div style="clear: both"></div>
213                    </nav>
214                </div>
215            </div>
216
217            <nav class="nav-wide-wrapper" aria-label="Page navigation">
218                {{#previous}}
219                    <a rel="prev" href="{{ path_to_root }}{{link}}" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
220                        <i class="fa fa-angle-left"></i>
221                    </a>
222                {{/previous}}
223
224                {{#next}}
225                    <a rel="next prefetch" href="{{ path_to_root }}{{link}}" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
226                        <i class="fa fa-angle-right"></i>
227                    </a>
228                {{/next}}
229            </nav>
230
231        </div>
232
233        {{#if live_reload_endpoint}}
234        <!-- Livereload script (if served using the cli tool) -->
235        <script>
236            const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
237            const wsAddress = wsProtocol + "//" + location.host + "/" + "{{{live_reload_endpoint}}}";
238            const socket = new WebSocket(wsAddress);
239            socket.onmessage = function (event) {
240                if (event.data === "reload") {
241                    socket.close();
242                    location.reload();
243                }
244            };
245
246            window.onbeforeunload = function() {
247                socket.close();
248            }
249        </script>
250        {{/if}}
251
252        {{#if google_analytics}}
253        <!-- Google Analytics Tag -->
254        <script>
255            var localAddrs = ["localhost", "127.0.0.1", ""];
256
257            // make sure we don't activate google analytics if the developer is
258            // inspecting the book locally...
259            if (localAddrs.indexOf(document.location.hostname) === -1) {
260                (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
261                (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
262                m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
263                })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
264
265                ga('create', '{{google_analytics}}', 'auto');
266                ga('send', 'pageview');
267            }
268        </script>
269        {{/if}}
270
271        {{#if playground_line_numbers}}
272        <script>
273            window.playground_line_numbers = true;
274        </script>
275        {{/if}}
276
277        {{#if playground_copyable}}
278        <script>
279            window.playground_copyable = true;
280        </script>
281        {{/if}}
282
283        {{#if playground_js}}
284        <script src="{{ path_to_root }}ace.js"></script>
285        <script src="{{ path_to_root }}editor.js"></script>
286        <script src="{{ path_to_root }}mode-rust.js"></script>
287        <script src="{{ path_to_root }}theme-dawn.js"></script>
288        <script src="{{ path_to_root }}theme-tomorrow_night.js"></script>
289        {{/if}}
290
291        {{#if search_js}}
292        <script src="{{ path_to_root }}elasticlunr.min.js"></script>
293        <script src="{{ path_to_root }}mark.min.js"></script>
294        <script src="{{ path_to_root }}searcher.js"></script>
295        {{/if}}
296
297        <script src="{{ path_to_root }}clipboard.min.js"></script>
298        <script src="{{ path_to_root }}highlight.js"></script>
299        <script src="{{ path_to_root }}book.js"></script>
300
301        <!-- Custom JS scripts -->
302        {{#each additional_js}}
303        <script src="{{ ../path_to_root }}{{this}}"></script>
304        {{/each}}
305
306        {{#if is_print}}
307        {{#if mathjax_support}}
308        <script>
309        window.addEventListener('load', function() {
310            MathJax.Hub.Register.StartupHook('End', function() {
311                window.setTimeout(window.print, 100);
312            });
313        });
314        </script>
315        {{else}}
316        <script>
317        window.addEventListener('load', function() {
318            window.setTimeout(window.print, 100);
319        });
320        </script>
321        {{/if}}
322        {{/if}}
323
324    </div>
325    </body>
326</html>