fork/helix

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

Blaž HrastnikAdd book/ (mdbook based user guide)16350399

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