diff options
| author | gdamore <gdamore@users.noreply.github.com> | 2025-04-19 20:10:40 +0000 |
|---|---|---|
| committer | gdamore <gdamore@users.noreply.github.com> | 2025-04-19 20:10:40 +0000 |
| commit | c4061caadd4d7c946430aa998c616a20b14187ce (patch) | |
| tree | d4605489a0fdae234a1b52a65c969a7ebed5298d /ref/api/errors.html | |
| parent | 3db54322b4b6024b34878a277789ef082872189b (diff) | |
| download | nng-c4061caadd4d7c946430aa998c616a20b14187ce.tar.gz nng-c4061caadd4d7c946430aa998c616a20b14187ce.tar.bz2 nng-c4061caadd4d7c946430aa998c616a20b14187ce.zip | |
deploy: 55925438bc8b8fd243ab995c48c8996ac49a6652
Diffstat (limited to 'ref/api/errors.html')
| -rw-r--r-- | ref/api/errors.html | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/ref/api/errors.html b/ref/api/errors.html index 766ab1f7..19c297e5 100644 --- a/ref/api/errors.html +++ b/ref/api/errors.html @@ -24,18 +24,19 @@ <link rel="stylesheet" href="../fonts/fonts.css"> <!-- Highlight.js Stylesheets --> - <link rel="stylesheet" href="../highlight.css"> - <link rel="stylesheet" href="../tomorrow-night.css"> - <link rel="stylesheet" href="../ayu-highlight.css"> + <link rel="stylesheet" id="highlight-css" href="../highlight.css"> + <link rel="stylesheet" id="tomorrow-night-css" href="../tomorrow-night.css"> + <link rel="stylesheet" id="ayu-highlight-css" href="../ayu-highlight.css"> <!-- Custom theme stylesheets --> <link rel="stylesheet" href="../theme/pagetoc.css"> - <!-- Provide site root to javascript --> + <!-- Provide site root and default themes to javascript --> <script> - var path_to_root = "../"; - var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light"; + const path_to_root = "../"; + const default_light_theme = "light"; + const default_dark_theme = "navy"; </script> <!-- Start loading toc.js asap --> <script src="../toc.js"></script> @@ -45,8 +46,8 @@ <!-- Work around some values being stored in localStorage wrapped in quotes --> <script> try { - var theme = localStorage.getItem('mdbook-theme'); - var sidebar = localStorage.getItem('mdbook-sidebar'); + let theme = localStorage.getItem('mdbook-theme'); + let sidebar = localStorage.getItem('mdbook-sidebar'); if (theme.startsWith('"') && theme.endsWith('"')) { localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1)); @@ -60,7 +61,8 @@ <!-- Set the theme before any content is loaded, prevents flash --> <script> - var theme; + const default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? default_dark_theme : default_light_theme; + let theme; try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } if (theme === null || theme === undefined) { theme = default_theme; } const html = document.documentElement; @@ -73,8 +75,8 @@ <!-- Hide / unhide sidebar before it is displayed --> <script> - var sidebar = null; - var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); + let sidebar = null; + const sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); if (document.body.clientWidth >= 1080) { try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { } sidebar = sidebar || 'visible'; @@ -110,6 +112,7 @@ <i class="fa fa-paint-brush"></i> </button> <ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu"> + <li role="none"><button role="menuitem" class="theme" id="default_theme">Auto</button></li> <li role="none"><button role="menuitem" class="theme" id="light">Light</button></li> <li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li> <li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li> |
