Skip to content

Commit aa825cf

Browse files
committed
doc: user manual updates
1 parent d44dc3b commit aa825cf

26 files changed

+1225
-693
lines changed

404.html

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,30 +25,42 @@
2525
<link rel="stylesheet" href="fonts/fonts.css">
2626

2727
<!-- 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">
3131

3232
<!-- Custom theme stylesheets -->
3333

3434
<!-- MathJax -->
3535
<script async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
3636

37-
<!-- Provide site root to javascript -->
37+
<!-- Provide site root and default themes to javascript -->
3838
<script>
39-
var path_to_root = "";
40-
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "ayu" : "ayu";
39+
const path_to_root = "";
40+
const default_light_theme = "ayu";
41+
const default_dark_theme = "ayu";
4142
</script>
4243
<!-- Start loading toc.js asap -->
4344
<script src="toc.js"></script>
4445
</head>
4546
<body>
47+
<div id="mdbook-help-container">
48+
<div id="mdbook-help-popup">
49+
<h2 class="mdbook-help-title">Keyboard shortcuts</h2>
50+
<div>
51+
<p>Press <kbd></kbd> or <kbd></kbd> to navigate between chapters</p>
52+
<p>Press <kbd>S</kbd> or <kbd>/</kbd> to search in the book</p>
53+
<p>Press <kbd>?</kbd> to show this help</p>
54+
<p>Press <kbd>Esc</kbd> to hide this help</p>
55+
</div>
56+
</div>
57+
</div>
4658
<div id="body-container">
4759
<!-- Work around some values being stored in localStorage wrapped in quotes -->
4860
<script>
4961
try {
50-
var theme = localStorage.getItem('mdbook-theme');
51-
var sidebar = localStorage.getItem('mdbook-sidebar');
62+
let theme = localStorage.getItem('mdbook-theme');
63+
let sidebar = localStorage.getItem('mdbook-sidebar');
5264

5365
if (theme.startsWith('"') && theme.endsWith('"')) {
5466
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
@@ -62,7 +74,8 @@
6274

6375
<!-- Set the theme before any content is loaded, prevents flash -->
6476
<script>
65-
var theme;
77+
const default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? default_dark_theme : default_light_theme;
78+
let theme;
6679
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
6780
if (theme === null || theme === undefined) { theme = default_theme; }
6881
const html = document.documentElement;
@@ -75,8 +88,8 @@
7588

7689
<!-- Hide / unhide sidebar before it is displayed -->
7790
<script>
78-
var sidebar = null;
79-
var sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
91+
let sidebar = null;
92+
const sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
8093
if (document.body.clientWidth >= 1080) {
8194
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
8295
sidebar = sidebar || 'visible';
@@ -112,13 +125,14 @@
112125
<i class="fa fa-paint-brush"></i>
113126
</button>
114127
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
128+
<li role="none"><button role="menuitem" class="theme" id="default_theme">Auto</button></li>
115129
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
116130
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
117131
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
118132
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
119133
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
120134
</ul>
121-
<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">
135+
<button id="search-toggle" class="icon-button" type="button" title="Search (`/`)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="/ s" aria-controls="searchbar">
122136
<i class="fa fa-search"></i>
123137
</button>
124138
</div>
@@ -189,8 +203,8 @@ <h1 id="document-not-found-404"><a class="header" href="#document-not-found-404"
189203
</script>
190204

191205
<script src="ace.js"></script>
192-
<script src="editor.js"></script>
193206
<script src="mode-rust.js"></script>
207+
<script src="editor.js"></script>
194208
<script src="theme-dawn.js"></script>
195209
<script src="theme-tomorrow_night.js"></script>
196210

0 commit comments

Comments
 (0)