|
25 | 25 | <link rel="stylesheet" href="fonts/fonts.css"> |
26 | 26 |
|
27 | 27 | <!-- Highlight.js Stylesheets --> |
28 | | - <link rel="stylesheet" href="highlight.css"> |
29 | | - <link rel="stylesheet" href="tomorrow-night.css"> |
30 | | - <link rel="stylesheet" href="ayu-highlight.css"> |
| 28 | + <link rel="stylesheet" id="highlight-css" href="highlight.css"> |
| 29 | + <link rel="stylesheet" id="tomorrow-night-css" href="tomorrow-night.css"> |
| 30 | + <link rel="stylesheet" id="ayu-highlight-css" href="ayu-highlight.css"> |
31 | 31 |
|
32 | 32 | <!-- Custom theme stylesheets --> |
33 | 33 | <link rel="stylesheet" href="ferris.css"> |
34 | 34 |
|
35 | 35 | <!-- MathJax --> |
36 | 36 | <script async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> |
37 | 37 |
|
38 | | - <!-- Provide site root to javascript --> |
| 38 | + <!-- Provide site root and default themes to javascript --> |
39 | 39 | <script> |
40 | | - var path_to_root = ""; |
41 | | - var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "ayu"; |
| 40 | + const path_to_root = ""; |
| 41 | + const default_light_theme = "ayu"; |
| 42 | + const default_dark_theme = "navy"; |
42 | 43 | </script> |
43 | 44 | <!-- Start loading toc.js asap --> |
44 | 45 | <script src="toc.js"></script> |
45 | 46 | </head> |
46 | 47 | <body> |
| 48 | + <div id="mdbook-help-container"> |
| 49 | + <div id="mdbook-help-popup"> |
| 50 | + <h2 class="mdbook-help-title">Keyboard shortcuts</h2> |
| 51 | + <div> |
| 52 | + <p>Press <kbd>←</kbd> or <kbd>→</kbd> to navigate between chapters</p> |
| 53 | + <p>Press <kbd>S</kbd> or <kbd>/</kbd> to search in the book</p> |
| 54 | + <p>Press <kbd>?</kbd> to show this help</p> |
| 55 | + <p>Press <kbd>Esc</kbd> to hide this help</p> |
| 56 | + </div> |
| 57 | + </div> |
| 58 | + </div> |
47 | 59 | <div id="body-container"> |
48 | 60 | <!-- Work around some values being stored in localStorage wrapped in quotes --> |
49 | 61 | <script> |
50 | 62 | try { |
51 | | - var theme = localStorage.getItem('mdbook-theme'); |
52 | | - var sidebar = localStorage.getItem('mdbook-sidebar'); |
| 63 | + let theme = localStorage.getItem('mdbook-theme'); |
| 64 | + let sidebar = localStorage.getItem('mdbook-sidebar'); |
53 | 65 |
|
54 | 66 | if (theme.startsWith('"') && theme.endsWith('"')) { |
55 | 67 | localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1)); |
|
63 | 75 |
|
64 | 76 | <!-- Set the theme before any content is loaded, prevents flash --> |
65 | 77 | <script> |
66 | | - var theme; |
| 78 | + const default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? default_dark_theme : default_light_theme; |
| 79 | + let theme; |
67 | 80 | try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } |
68 | 81 | if (theme === null || theme === undefined) { theme = default_theme; } |
69 | 82 | const html = document.documentElement; |
|
76 | 89 |
|
77 | 90 | <!-- Hide / unhide sidebar before it is displayed --> |
78 | 91 | <script> |
79 | | - var sidebar = null; |
80 | | - var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); |
| 92 | + let sidebar = null; |
| 93 | + const sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); |
81 | 94 | if (document.body.clientWidth >= 1080) { |
82 | 95 | try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { } |
83 | 96 | sidebar = sidebar || 'visible'; |
|
103 | 116 | <div id="page-wrapper" class="page-wrapper"> |
104 | 117 |
|
105 | 118 | <div class="page"> |
106 | | - <script src="https://cdn.plot.ly/plotly-2.12.1.min.js"></script> <div id="menu-bar-hover-placeholder"></div> |
| 119 | + <script src="https://cdn.plot.ly/plotly-3.0.1.min.js"></script> <div id="menu-bar-hover-placeholder"></div> |
107 | 120 | <div id="menu-bar" class="menu-bar sticky"> |
108 | 121 | <div class="left-buttons"> |
109 | 122 | <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"> |
|
113 | 126 | <i class="fa fa-paint-brush"></i> |
114 | 127 | </button> |
115 | 128 | <ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu"> |
| 129 | + <li role="none"><button role="menuitem" class="theme" id="default_theme">Auto</button></li> |
116 | 130 | <li role="none"><button role="menuitem" class="theme" id="light">Light</button></li> |
117 | 131 | <li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li> |
118 | 132 | <li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li> |
119 | 133 | <li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li> |
120 | 134 | <li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li> |
121 | 135 | </ul> |
122 | | - <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 | + <button id="search-toggle" class="icon-button" type="button" title="Search (`/`)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="/ s" aria-controls="searchbar"> |
123 | 137 | <i class="fa fa-search"></i> |
124 | 138 | </button> |
125 | 139 | </div> |
|
0 commit comments