Skip to content

Commit 6ecee49

Browse files
committed
deploy: 5aff25e
1 parent 32aca18 commit 6ecee49

File tree

5 files changed

+13
-10
lines changed

5 files changed

+13
-10
lines changed

book.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -557,9 +557,9 @@ aria-label="Show hidden lines"></button>';
557557
sidebarToggleAnchor.addEventListener('change', function sidebarToggle() {
558558
if (sidebarToggleAnchor.checked) {
559559
const current_width = parseInt(
560-
document.documentElement.style.getPropertyValue('--sidebar-width'), 10);
560+
document.documentElement.style.getPropertyValue('--sidebar-target-width'), 10);
561561
if (current_width < 150) {
562-
document.documentElement.style.setProperty('--sidebar-width', '150px');
562+
document.documentElement.style.setProperty('--sidebar-target-width', '150px');
563563
}
564564
showSidebar();
565565
} else {
@@ -583,7 +583,7 @@ aria-label="Show hidden lines"></button>';
583583
showSidebar();
584584
}
585585
pos = Math.min(pos, window.innerWidth - 100);
586-
document.documentElement.style.setProperty('--sidebar-width', pos + 'px');
586+
document.documentElement.style.setProperty('--sidebar-target-width', pos + 'px');
587587
}
588588
}
589589
//on mouseup remove windows functions mousemove & mouseup

css/variables.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
/* Globals */
33

44
:root {
5-
--sidebar-width: 300px;
5+
--sidebar-target-width: 300px;
6+
--sidebar-width: min(var(--sidebar-target-width), 80vw);
67
--sidebar-resize-indicator-width: 8px;
78
--sidebar-resize-indicator-space: 2px;
89
--page-padding: 15px;

searcher.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/* global Mark, elasticlunr, path_to_root */
44

55
window.search = window.search || {};
6-
(function search(search) {
6+
(function search() {
77
// Search functionality
88
//
99
// You can use !hasFocus() to prevent keyhandling in your key
@@ -29,7 +29,8 @@ window.search = window.search || {};
2929
searchicon = document.getElementById('search-toggle'),
3030
content = document.getElementById('content'),
3131

32-
mark_exclude = [],
32+
// SVG text elements don't render if inside a <mark> tag.
33+
mark_exclude = ['text'],
3334
marker = new Mark(content),
3435
URL_SEARCH_PARAM = 'search',
3536
URL_MARK_PARAM = 'highlight',
@@ -288,6 +289,9 @@ window.search = window.search || {};
288289

289290
// If reloaded, do the search or mark again, depending on the current url parameters
290291
doSearchOrMarkFromUrl();
292+
293+
// Exported functions
294+
config.hasFocus = hasFocus;
291295
}
292296

293297
function unfocusSearchbar() {
@@ -521,6 +525,4 @@ window.search = window.search || {};
521525

522526
loadScript(path_to_root + 'searchindex.js', 'search-index');
523527

524-
// Exported functions
525-
search.hasFocus = hasFocus;
526528
})(window.search);

searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

toc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class MDBookSidebarScrollbox extends HTMLElement {
1010
connectedCallback() {
1111
this.innerHTML = '<ol class="chapter"><li class="chapter-item expanded "><a href="intro.html"><strong aria-hidden="true">1.</strong> Intro</a></li><li class="chapter-item expanded "><a href="declaring.html"><strong aria-hidden="true">2.</strong> Declaring MicroVMs</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="options.html"><strong aria-hidden="true">2.1.</strong> Configuration options</a></li><li class="chapter-item expanded "><a href="interfaces.html"><strong aria-hidden="true">2.2.</strong> Network interfaces</a></li><li class="chapter-item expanded "><a href="shares.html"><strong aria-hidden="true">2.3.</strong> Shared directories</a></li><li class="chapter-item expanded "><a href="devices.html"><strong aria-hidden="true">2.4.</strong> Device pass-through</a></li><li class="chapter-item expanded "><a href="cpu-emulation.html"><strong aria-hidden="true">2.5.</strong> CPU emulation</a></li><li class="chapter-item expanded "><a href="output-options.html"><strong aria-hidden="true">2.6.</strong> Output options</a></li><li class="chapter-item expanded "><a href="microvm-options.html"><strong aria-hidden="true">2.7.</strong> MicroVM options reference ⚙️</a></li></ol></li><li class="chapter-item expanded "><a href="packages.html"><strong aria-hidden="true">3.</strong> Running a MicroVM as a package</a></li><li class="chapter-item expanded "><a href="host.html"><strong aria-hidden="true">4.</strong> Preparing a host for declarative MicroVMs</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="simple-network.html"><strong aria-hidden="true">4.1.</strong> A simple network setup</a></li><li class="chapter-item expanded "><a href="advanced-network.html"><strong aria-hidden="true">4.2.</strong> Advanced network setup</a></li><li class="chapter-item expanded "><a href="routed-network.html"><strong aria-hidden="true">4.3.</strong> Routed network setup</a></li><li class="chapter-item expanded "><a href="host-systemd.html"><strong aria-hidden="true">4.4.</strong> Host systemd services</a></li><li class="chapter-item expanded "><a href="host-options.html"><strong aria-hidden="true">4.5.</strong> Host options reference ⚙️</a></li></ol></li><li class="chapter-item expanded "><a href="declarative.html"><strong aria-hidden="true">5.</strong> Declarative MicroVMs</a></li><li class="chapter-item expanded "><a href="microvm-command.html"><strong aria-hidden="true">6.</strong> Imperative MicroVM management</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="ssh-deploy.html"><strong aria-hidden="true">6.1.</strong> Deploy via SSH</a></li></ol></li><li class="chapter-item expanded "><a href="conventions.html"><strong aria-hidden="true">7.</strong> Conventions</a></li><li class="chapter-item expanded "><a href="faq.html"><strong aria-hidden="true">8.</strong> Frequently Asked Questions</a></li></ol>';
1212
// Set the current, active page, and reveal it if it's hidden
13-
let current_page = document.location.href.toString().split("#")[0];
13+
let current_page = document.location.href.toString().split("#")[0].split("?")[0];
1414
if (current_page.endsWith("/")) {
1515
current_page += "index.html";
1616
}

0 commit comments

Comments
 (0)