|
71 | 71 | <script src="../site_libs/quarto-html/tippy.umd.min.js"></script>
|
72 | 72 | <script src="../site_libs/quarto-html/anchor.min.js"></script>
|
73 | 73 | <link href="../site_libs/quarto-html/tippy.css" rel="stylesheet">
|
74 |
| -<link href="../site_libs/quarto-html/quarto-syntax-highlighting.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles"> |
75 |
| -<link href="../site_libs/quarto-html/quarto-syntax-highlighting-dark.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles"> |
| 74 | +<link href="../site_libs/quarto-html/quarto-syntax-highlighting.css" rel="stylesheet" id="quarto-text-highlighting-styles"> |
76 | 75 | <script src="../site_libs/bootstrap/bootstrap.min.js"></script>
|
77 | 76 | <link href="../site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
|
78 |
| -<link href="../site_libs/bootstrap/bootstrap.min.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light"> |
79 |
| -<link href="../site_libs/bootstrap/bootstrap-dark.min.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark"> |
| 77 | +<link href="../site_libs/bootstrap/bootstrap.min.css" rel="stylesheet" id="quarto-bootstrap" data-mode="light"> |
80 | 78 | <script id="quarto-search-options" type="application/json">{
|
81 | 79 | "location": "navbar",
|
82 | 80 | "copy-button": false,
|
|
152 | 150 | </ul>
|
153 | 151 | </div> <!-- /navcollapse -->
|
154 | 152 | <div class="quarto-navbar-tools">
|
155 |
| - <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> |
156 | 153 | </div>
|
157 | 154 | </div> <!-- /container-fluid -->
|
158 | 155 | </nav>
|
@@ -364,150 +361,6 @@ <h2 class="anchored" data-anchor-id="the-metropolis-algorithm">10.2 The Metropol
|
364 | 361 | }
|
365 | 362 | }
|
366 | 363 | toggleBodyColorPrimary();
|
367 |
| - const disableStylesheet = (stylesheets) => { |
368 |
| - for (let i=0; i < stylesheets.length; i++) { |
369 |
| - const stylesheet = stylesheets[i]; |
370 |
| - stylesheet.rel = 'prefetch'; |
371 |
| - } |
372 |
| - } |
373 |
| - const enableStylesheet = (stylesheets) => { |
374 |
| - for (let i=0; i < stylesheets.length; i++) { |
375 |
| - const stylesheet = stylesheets[i]; |
376 |
| - stylesheet.rel = 'stylesheet'; |
377 |
| - } |
378 |
| - } |
379 |
| - const manageTransitions = (selector, allowTransitions) => { |
380 |
| - const els = window.document.querySelectorAll(selector); |
381 |
| - for (let i=0; i < els.length; i++) { |
382 |
| - const el = els[i]; |
383 |
| - if (allowTransitions) { |
384 |
| - el.classList.remove('notransition'); |
385 |
| - } else { |
386 |
| - el.classList.add('notransition'); |
387 |
| - } |
388 |
| - } |
389 |
| - } |
390 |
| - const toggleGiscusIfUsed = (isAlternate, darkModeDefault) => { |
391 |
| - const baseTheme = document.querySelector('#giscus-base-theme')?.value ?? 'light'; |
392 |
| - const alternateTheme = document.querySelector('#giscus-alt-theme')?.value ?? 'dark'; |
393 |
| - let newTheme = ''; |
394 |
| - if(darkModeDefault) { |
395 |
| - newTheme = isAlternate ? baseTheme : alternateTheme; |
396 |
| - } else { |
397 |
| - newTheme = isAlternate ? alternateTheme : baseTheme; |
398 |
| - } |
399 |
| - const changeGiscusTheme = () => { |
400 |
| - // From: https://github.com/giscus/giscus/issues/336 |
401 |
| - const sendMessage = (message) => { |
402 |
| - const iframe = document.querySelector('iframe.giscus-frame'); |
403 |
| - if (!iframe) return; |
404 |
| - iframe.contentWindow.postMessage({ giscus: message }, 'https://giscus.app'); |
405 |
| - } |
406 |
| - sendMessage({ |
407 |
| - setConfig: { |
408 |
| - theme: newTheme |
409 |
| - } |
410 |
| - }); |
411 |
| - } |
412 |
| - const isGiscussLoaded = window.document.querySelector('iframe.giscus-frame') !== null; |
413 |
| - if (isGiscussLoaded) { |
414 |
| - changeGiscusTheme(); |
415 |
| - } |
416 |
| - } |
417 |
| - const toggleColorMode = (alternate) => { |
418 |
| - // Switch the stylesheets |
419 |
| - const alternateStylesheets = window.document.querySelectorAll('link.quarto-color-scheme.quarto-color-alternate'); |
420 |
| - manageTransitions('#quarto-margin-sidebar .nav-link', false); |
421 |
| - if (alternate) { |
422 |
| - enableStylesheet(alternateStylesheets); |
423 |
| - for (const sheetNode of alternateStylesheets) { |
424 |
| - if (sheetNode.id === "quarto-bootstrap") { |
425 |
| - toggleBodyColorMode(sheetNode); |
426 |
| - } |
427 |
| - } |
428 |
| - } else { |
429 |
| - disableStylesheet(alternateStylesheets); |
430 |
| - toggleBodyColorPrimary(); |
431 |
| - } |
432 |
| - manageTransitions('#quarto-margin-sidebar .nav-link', true); |
433 |
| - // Switch the toggles |
434 |
| - const toggles = window.document.querySelectorAll('.quarto-color-scheme-toggle'); |
435 |
| - for (let i=0; i < toggles.length; i++) { |
436 |
| - const toggle = toggles[i]; |
437 |
| - if (toggle) { |
438 |
| - if (alternate) { |
439 |
| - toggle.classList.add("alternate"); |
440 |
| - } else { |
441 |
| - toggle.classList.remove("alternate"); |
442 |
| - } |
443 |
| - } |
444 |
| - } |
445 |
| - // Hack to workaround the fact that safari doesn't |
446 |
| - // properly recolor the scrollbar when toggling (#1455) |
447 |
| - if (navigator.userAgent.indexOf('Safari') > 0 && navigator.userAgent.indexOf('Chrome') == -1) { |
448 |
| - manageTransitions("body", false); |
449 |
| - window.scrollTo(0, 1); |
450 |
| - setTimeout(() => { |
451 |
| - window.scrollTo(0, 0); |
452 |
| - manageTransitions("body", true); |
453 |
| - }, 40); |
454 |
| - } |
455 |
| - } |
456 |
| - const isFileUrl = () => { |
457 |
| - return window.location.protocol === 'file:'; |
458 |
| - } |
459 |
| - const hasAlternateSentinel = () => { |
460 |
| - let styleSentinel = getColorSchemeSentinel(); |
461 |
| - if (styleSentinel !== null) { |
462 |
| - return styleSentinel === "alternate"; |
463 |
| - } else { |
464 |
| - return false; |
465 |
| - } |
466 |
| - } |
467 |
| - const setStyleSentinel = (alternate) => { |
468 |
| - const value = alternate ? "alternate" : "default"; |
469 |
| - if (!isFileUrl()) { |
470 |
| - window.localStorage.setItem("quarto-color-scheme", value); |
471 |
| - } else { |
472 |
| - localAlternateSentinel = value; |
473 |
| - } |
474 |
| - } |
475 |
| - const getColorSchemeSentinel = () => { |
476 |
| - if (!isFileUrl()) { |
477 |
| - const storageValue = window.localStorage.getItem("quarto-color-scheme"); |
478 |
| - return storageValue != null ? storageValue : localAlternateSentinel; |
479 |
| - } else { |
480 |
| - return localAlternateSentinel; |
481 |
| - } |
482 |
| - } |
483 |
| - const darkModeDefault = true; |
484 |
| - let localAlternateSentinel = darkModeDefault ? 'alternate' : 'default'; |
485 |
| - // Dark / light mode switch |
486 |
| - window.quartoToggleColorScheme = () => { |
487 |
| - // Read the current dark / light value |
488 |
| - let toAlternate = !hasAlternateSentinel(); |
489 |
| - toggleColorMode(toAlternate); |
490 |
| - setStyleSentinel(toAlternate); |
491 |
| - toggleGiscusIfUsed(toAlternate, darkModeDefault); |
492 |
| - }; |
493 |
| - // Ensure there is a toggle, if there isn't float one in the top right |
494 |
| - if (window.document.querySelector('.quarto-color-scheme-toggle') === null) { |
495 |
| - const a = window.document.createElement('a'); |
496 |
| - a.classList.add('top-right'); |
497 |
| - a.classList.add('quarto-color-scheme-toggle'); |
498 |
| - a.href = ""; |
499 |
| - a.onclick = function() { try { window.quartoToggleColorScheme(); } catch {} return false; }; |
500 |
| - const i = window.document.createElement("i"); |
501 |
| - i.classList.add('bi'); |
502 |
| - a.appendChild(i); |
503 |
| - window.document.body.appendChild(a); |
504 |
| - } |
505 |
| - // Switch to dark mode if need be |
506 |
| - if (hasAlternateSentinel()) { |
507 |
| - toggleColorMode(true); |
508 |
| - } else { |
509 |
| - toggleColorMode(false); |
510 |
| - } |
511 | 364 | const icon = "";
|
512 | 365 | const anchorJS = new window.AnchorJS();
|
513 | 366 | anchorJS.options = {
|
@@ -884,7 +737,7 @@ <h2 class="anchored" data-anchor-id="the-metropolis-algorithm">10.2 The Metropol
|
884 | 737 |
|
885 | 738 | </div>
|
886 | 739 | <div class="nav-footer-center">
|
887 |
| -<p>© 2024- JW TSAI. All rights reserved.</p> |
| 740 | +<p>© 2024-2024 JW TSAI. All rights reserved.</p> |
888 | 741 | </div>
|
889 | 742 | <div class="nav-footer-right">
|
890 | 743 |
|
|
0 commit comments