Skip to content

Commit 68c5014

Browse files
committed
render
1 parent 10da155 commit 68c5014

File tree

2 files changed

+3
-150
lines changed

2 files changed

+3
-150
lines changed

_quarto.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ format:
5555
html:
5656
theme:
5757
light: [cosmo, css/styles.scss]
58-
dark: darkly
58+
#dark: darkly
5959
page-layout: custom
6060
toc: false
6161

docs/index.html

+2-149
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,10 @@
3737
<script src="site_libs/quarto-html/tippy.umd.min.js"></script>
3838
<script src="site_libs/quarto-html/anchor.min.js"></script>
3939
<link href="site_libs/quarto-html/tippy.css" rel="stylesheet">
40-
<link href="site_libs/quarto-html/quarto-syntax-highlighting.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
41-
<link href="site_libs/quarto-html/quarto-syntax-highlighting-dark.css" rel="prefetch" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
40+
<link href="site_libs/quarto-html/quarto-syntax-highlighting.css" rel="stylesheet" id="quarto-text-highlighting-styles">
4241
<script src="site_libs/bootstrap/bootstrap.min.js"></script>
4342
<link href="site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
44-
<link href="site_libs/bootstrap/bootstrap.min.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
45-
<link href="site_libs/bootstrap/bootstrap-dark.min.css" rel="prefetch" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
43+
<link href="site_libs/bootstrap/bootstrap.min.css" rel="stylesheet" id="quarto-bootstrap" data-mode="light">
4644
<script id="quarto-search-options" type="application/json">{
4745
"location": "navbar",
4846
"copy-button": false,
@@ -249,7 +247,6 @@
249247
</ul>
250248
</div> <!-- /navcollapse -->
251249
<div class="quarto-navbar-tools">
252-
<a href="" class="quarto-color-scheme-toggle quarto-navigation-tool px-1" onclick="window.quartoToggleColorScheme(); return false;" title="Toggle dark mode"><i class="bi"></i></a>
253250
</div>
254251
</div> <!-- /container-fluid -->
255252
</nav>
@@ -395,150 +392,6 @@ <h1 id="sponsorTitle" data-default-title="<strong>Our Sponsors</strong>"><strong
395392
}
396393
}
397394
toggleBodyColorPrimary();
398-
const disableStylesheet = (stylesheets) => {
399-
for (let i=0; i < stylesheets.length; i++) {
400-
const stylesheet = stylesheets[i];
401-
stylesheet.rel = 'prefetch';
402-
}
403-
}
404-
const enableStylesheet = (stylesheets) => {
405-
for (let i=0; i < stylesheets.length; i++) {
406-
const stylesheet = stylesheets[i];
407-
stylesheet.rel = 'stylesheet';
408-
}
409-
}
410-
const manageTransitions = (selector, allowTransitions) => {
411-
const els = window.document.querySelectorAll(selector);
412-
for (let i=0; i < els.length; i++) {
413-
const el = els[i];
414-
if (allowTransitions) {
415-
el.classList.remove('notransition');
416-
} else {
417-
el.classList.add('notransition');
418-
}
419-
}
420-
}
421-
const toggleGiscusIfUsed = (isAlternate, darkModeDefault) => {
422-
const baseTheme = document.querySelector('#giscus-base-theme')?.value ?? 'light';
423-
const alternateTheme = document.querySelector('#giscus-alt-theme')?.value ?? 'dark';
424-
let newTheme = '';
425-
if(darkModeDefault) {
426-
newTheme = isAlternate ? baseTheme : alternateTheme;
427-
} else {
428-
newTheme = isAlternate ? alternateTheme : baseTheme;
429-
}
430-
const changeGiscusTheme = () => {
431-
// From: https://github.com/giscus/giscus/issues/336
432-
const sendMessage = (message) => {
433-
const iframe = document.querySelector('iframe.giscus-frame');
434-
if (!iframe) return;
435-
iframe.contentWindow.postMessage({ giscus: message }, 'https://giscus.app');
436-
}
437-
sendMessage({
438-
setConfig: {
439-
theme: newTheme
440-
}
441-
});
442-
}
443-
const isGiscussLoaded = window.document.querySelector('iframe.giscus-frame') !== null;
444-
if (isGiscussLoaded) {
445-
changeGiscusTheme();
446-
}
447-
}
448-
const toggleColorMode = (alternate) => {
449-
// Switch the stylesheets
450-
const alternateStylesheets = window.document.querySelectorAll('link.quarto-color-scheme.quarto-color-alternate');
451-
manageTransitions('#quarto-margin-sidebar .nav-link', false);
452-
if (alternate) {
453-
enableStylesheet(alternateStylesheets);
454-
for (const sheetNode of alternateStylesheets) {
455-
if (sheetNode.id === "quarto-bootstrap") {
456-
toggleBodyColorMode(sheetNode);
457-
}
458-
}
459-
} else {
460-
disableStylesheet(alternateStylesheets);
461-
toggleBodyColorPrimary();
462-
}
463-
manageTransitions('#quarto-margin-sidebar .nav-link', true);
464-
// Switch the toggles
465-
const toggles = window.document.querySelectorAll('.quarto-color-scheme-toggle');
466-
for (let i=0; i < toggles.length; i++) {
467-
const toggle = toggles[i];
468-
if (toggle) {
469-
if (alternate) {
470-
toggle.classList.add("alternate");
471-
} else {
472-
toggle.classList.remove("alternate");
473-
}
474-
}
475-
}
476-
// Hack to workaround the fact that safari doesn't
477-
// properly recolor the scrollbar when toggling (#1455)
478-
if (navigator.userAgent.indexOf('Safari') > 0 && navigator.userAgent.indexOf('Chrome') == -1) {
479-
manageTransitions("body", false);
480-
window.scrollTo(0, 1);
481-
setTimeout(() => {
482-
window.scrollTo(0, 0);
483-
manageTransitions("body", true);
484-
}, 40);
485-
}
486-
}
487-
const isFileUrl = () => {
488-
return window.location.protocol === 'file:';
489-
}
490-
const hasAlternateSentinel = () => {
491-
let styleSentinel = getColorSchemeSentinel();
492-
if (styleSentinel !== null) {
493-
return styleSentinel === "alternate";
494-
} else {
495-
return false;
496-
}
497-
}
498-
const setStyleSentinel = (alternate) => {
499-
const value = alternate ? "alternate" : "default";
500-
if (!isFileUrl()) {
501-
window.localStorage.setItem("quarto-color-scheme", value);
502-
} else {
503-
localAlternateSentinel = value;
504-
}
505-
}
506-
const getColorSchemeSentinel = () => {
507-
if (!isFileUrl()) {
508-
const storageValue = window.localStorage.getItem("quarto-color-scheme");
509-
return storageValue != null ? storageValue : localAlternateSentinel;
510-
} else {
511-
return localAlternateSentinel;
512-
}
513-
}
514-
const darkModeDefault = false;
515-
let localAlternateSentinel = darkModeDefault ? 'alternate' : 'default';
516-
// Dark / light mode switch
517-
window.quartoToggleColorScheme = () => {
518-
// Read the current dark / light value
519-
let toAlternate = !hasAlternateSentinel();
520-
toggleColorMode(toAlternate);
521-
setStyleSentinel(toAlternate);
522-
toggleGiscusIfUsed(toAlternate, darkModeDefault);
523-
};
524-
// Ensure there is a toggle, if there isn't float one in the top right
525-
if (window.document.querySelector('.quarto-color-scheme-toggle') === null) {
526-
const a = window.document.createElement('a');
527-
a.classList.add('top-right');
528-
a.classList.add('quarto-color-scheme-toggle');
529-
a.href = "";
530-
a.onclick = function() { try { window.quartoToggleColorScheme(); } catch {} return false; };
531-
const i = window.document.createElement("i");
532-
i.classList.add('bi');
533-
a.appendChild(i);
534-
window.document.body.appendChild(a);
535-
}
536-
// Switch to dark mode if need be
537-
if (hasAlternateSentinel()) {
538-
toggleColorMode(true);
539-
} else {
540-
toggleColorMode(false);
541-
}
542395
const icon = "";
543396
const anchorJS = new window.AnchorJS();
544397
anchorJS.options = {

0 commit comments

Comments
 (0)