Skip to content

Commit 6f9a2d2

Browse files
committed
deploy: dee3890
1 parent 9c73e81 commit 6f9a2d2

File tree

5 files changed

+13
-10
lines changed

5 files changed

+13
-10
lines changed

master/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

master/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;

master/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);

master/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.

master/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="introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li class="chapter-item expanded "><a href="quickstart.html"><strong aria-hidden="true">2.</strong> Quickstart</a></li><li class="chapter-item expanded "><a href="types/index.html"><strong aria-hidden="true">3.</strong> Type system</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="types/objects/index.html"><strong aria-hidden="true">3.1.</strong> Objects</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="types/objects/complex_fields.html"><strong aria-hidden="true">3.1.1.</strong> Complex fields</a></li><li class="chapter-item expanded "><a href="types/objects/context.html"><strong aria-hidden="true">3.1.2.</strong> Context</a></li><li class="chapter-item expanded "><a href="types/objects/error/index.html"><strong aria-hidden="true">3.1.3.</strong> Error handling</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="types/objects/error/field.html"><strong aria-hidden="true">3.1.3.1.</strong> Field errors</a></li><li class="chapter-item expanded "><a href="types/objects/error/schema.html"><strong aria-hidden="true">3.1.3.2.</strong> Schema errors</a></li></ol></li><li class="chapter-item expanded "><a href="types/objects/generics.html"><strong aria-hidden="true">3.1.4.</strong> Generics</a></li></ol></li><li class="chapter-item expanded "><a href="types/interfaces.html"><strong aria-hidden="true">3.2.</strong> Interfaces</a></li><li class="chapter-item expanded "><a href="types/unions.html"><strong aria-hidden="true">3.3.</strong> Unions</a></li><li class="chapter-item expanded "><a href="types/enums.html"><strong aria-hidden="true">3.4.</strong> Enums</a></li><li class="chapter-item expanded "><a href="types/input_objects.html"><strong aria-hidden="true">3.5.</strong> Input objects</a></li><li class="chapter-item expanded "><a href="types/scalars.html"><strong aria-hidden="true">3.6.</strong> Scalars</a></li></ol></li><li class="chapter-item expanded "><a href="schema/index.html"><strong aria-hidden="true">4.</strong> Schema</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="schema/subscriptions.html"><strong aria-hidden="true">4.1.</strong> Subscriptions</a></li><li class="chapter-item expanded "><a href="schema/introspection.html"><strong aria-hidden="true">4.2.</strong> Introspection</a></li></ol></li><li class="chapter-item expanded "><a href="serve/index.html"><strong aria-hidden="true">5.</strong> Serving</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="serve/batching.html"><strong aria-hidden="true">5.1.</strong> Batching</a></li></ol></li><li class="chapter-item expanded "><a href="advanced/index.html"><strong aria-hidden="true">6.</strong> Advanced Topics</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="advanced/implicit_and_explicit_null.html"><strong aria-hidden="true">6.1.</strong> Implicit and explicit null</a></li><li class="chapter-item expanded "><a href="advanced/n_plus_1.html"><strong aria-hidden="true">6.2.</strong> N+1 problem</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="advanced/dataloader.html"><strong aria-hidden="true">6.2.1.</strong> DataLoader</a></li><li class="chapter-item expanded "><a href="advanced/lookahead.html"><strong aria-hidden="true">6.2.2.</strong> Look-ahead</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="advanced/eager_loading.html"><strong aria-hidden="true">6.2.2.1.</strong> Eager loading</a></li></ol></li></ol></li></ol></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)