|
73 | 73 | <script src="../../site_libs/quarto-html/tippy.umd.min.js"></script> |
74 | 74 | <script src="../../site_libs/quarto-html/anchor.min.js"></script> |
75 | 75 | <link href="../../site_libs/quarto-html/tippy.css" rel="stylesheet"> |
76 | | -<link href="../../site_libs/quarto-html/quarto-syntax-highlighting-e1a5c8363afafaef2c763b6775fbf3ca.css" rel="stylesheet" id="quarto-text-highlighting-styles"> |
| 76 | +<link href="../../site_libs/quarto-html/quarto-syntax-highlighting-e1a5c8363afafaef2c763b6775fbf3ca.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles"> |
| 77 | +<link href="../../site_libs/quarto-html/quarto-syntax-highlighting-dark-8ef56b68f8fa1e9d2ba328e99e439f80.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles"> |
| 78 | +<link href="../../site_libs/quarto-html/quarto-syntax-highlighting-e1a5c8363afafaef2c763b6775fbf3ca.css" rel="stylesheet" class="quarto-color-scheme-extra" id="quarto-text-highlighting-styles"> |
77 | 79 | <script src="../../site_libs/bootstrap/bootstrap.min.js"></script> |
78 | 80 | <link href="../../site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet"> |
79 | | -<link href="../../site_libs/bootstrap/bootstrap-dde8d7229bfee0f8bb5efd37f0f9ae1e.min.css" rel="stylesheet" append-hash="true" id="quarto-bootstrap" data-mode="light"> |
| 81 | +<link href="../../site_libs/bootstrap/bootstrap-2d2c3c1dc8fcebd689918bbad00a5354.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light"> |
| 82 | +<link href="../../site_libs/bootstrap/bootstrap-dark-a5cec38defc11f7561b05eff66b91810.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark"> |
| 83 | +<link href="../../site_libs/bootstrap/bootstrap-2d2c3c1dc8fcebd689918bbad00a5354.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light"> |
80 | 84 | <script id="quarto-search-options" type="application/json">{ |
81 | 85 | "location": "navbar", |
82 | 86 | "copy-button": false, |
|
111 | 115 | <meta property="og:site_name" content="Clojure Civitas"> |
112 | 116 | </head> |
113 | 117 |
|
114 | | -<body class="nav-fixed quarto-light"> |
| 118 | +<body class="nav-fixed quarto-light"><script id="quarto-html-before-body" type="application/javascript"> |
| 119 | + const toggleBodyColorMode = (bsSheetEl) => { |
| 120 | + const mode = bsSheetEl.getAttribute("data-mode"); |
| 121 | + const bodyEl = window.document.querySelector("body"); |
| 122 | + if (mode === "dark") { |
| 123 | + bodyEl.classList.add("quarto-dark"); |
| 124 | + bodyEl.classList.remove("quarto-light"); |
| 125 | + } else { |
| 126 | + bodyEl.classList.add("quarto-light"); |
| 127 | + bodyEl.classList.remove("quarto-dark"); |
| 128 | + } |
| 129 | + } |
| 130 | + const toggleBodyColorPrimary = () => { |
| 131 | + const bsSheetEl = window.document.querySelector("link#quarto-bootstrap:not([rel=disabled-stylesheet])"); |
| 132 | + if (bsSheetEl) { |
| 133 | + toggleBodyColorMode(bsSheetEl); |
| 134 | + } |
| 135 | + } |
| 136 | + const setColorSchemeToggle = (alternate) => { |
| 137 | + const toggles = window.document.querySelectorAll('.quarto-color-scheme-toggle'); |
| 138 | + for (let i=0; i < toggles.length; i++) { |
| 139 | + const toggle = toggles[i]; |
| 140 | + if (toggle) { |
| 141 | + if (alternate) { |
| 142 | + toggle.classList.add("alternate"); |
| 143 | + } else { |
| 144 | + toggle.classList.remove("alternate"); |
| 145 | + } |
| 146 | + } |
| 147 | + } |
| 148 | + }; |
| 149 | + const toggleColorMode = (alternate) => { |
| 150 | + // Switch the stylesheets |
| 151 | + const primaryStylesheets = window.document.querySelectorAll('link.quarto-color-scheme:not(.quarto-color-alternate)'); |
| 152 | + const alternateStylesheets = window.document.querySelectorAll('link.quarto-color-scheme.quarto-color-alternate'); |
| 153 | + manageTransitions('#quarto-margin-sidebar .nav-link', false); |
| 154 | + if (alternate) { |
| 155 | + // note: dark is layered on light, we don't disable primary! |
| 156 | + enableStylesheet(alternateStylesheets); |
| 157 | + for (const sheetNode of alternateStylesheets) { |
| 158 | + if (sheetNode.id === "quarto-bootstrap") { |
| 159 | + toggleBodyColorMode(sheetNode); |
| 160 | + } |
| 161 | + } |
| 162 | + } else { |
| 163 | + disableStylesheet(alternateStylesheets); |
| 164 | + enableStylesheet(primaryStylesheets) |
| 165 | + toggleBodyColorPrimary(); |
| 166 | + } |
| 167 | + manageTransitions('#quarto-margin-sidebar .nav-link', true); |
| 168 | + // Switch the toggles |
| 169 | + setColorSchemeToggle(alternate) |
| 170 | + // Hack to workaround the fact that safari doesn't |
| 171 | + // properly recolor the scrollbar when toggling (#1455) |
| 172 | + if (navigator.userAgent.indexOf('Safari') > 0 && navigator.userAgent.indexOf('Chrome') == -1) { |
| 173 | + manageTransitions("body", false); |
| 174 | + window.scrollTo(0, 1); |
| 175 | + setTimeout(() => { |
| 176 | + window.scrollTo(0, 0); |
| 177 | + manageTransitions("body", true); |
| 178 | + }, 40); |
| 179 | + } |
| 180 | + } |
| 181 | + const disableStylesheet = (stylesheets) => { |
| 182 | + for (let i=0; i < stylesheets.length; i++) { |
| 183 | + const stylesheet = stylesheets[i]; |
| 184 | + stylesheet.rel = 'disabled-stylesheet'; |
| 185 | + } |
| 186 | + } |
| 187 | + const enableStylesheet = (stylesheets) => { |
| 188 | + for (let i=0; i < stylesheets.length; i++) { |
| 189 | + const stylesheet = stylesheets[i]; |
| 190 | + if(stylesheet.rel !== 'stylesheet') { // for Chrome, which will still FOUC without this check |
| 191 | + stylesheet.rel = 'stylesheet'; |
| 192 | + } |
| 193 | + } |
| 194 | + } |
| 195 | + const manageTransitions = (selector, allowTransitions) => { |
| 196 | + const els = window.document.querySelectorAll(selector); |
| 197 | + for (let i=0; i < els.length; i++) { |
| 198 | + const el = els[i]; |
| 199 | + if (allowTransitions) { |
| 200 | + el.classList.remove('notransition'); |
| 201 | + } else { |
| 202 | + el.classList.add('notransition'); |
| 203 | + } |
| 204 | + } |
| 205 | + } |
| 206 | + const isFileUrl = () => { |
| 207 | + return window.location.protocol === 'file:'; |
| 208 | + } |
| 209 | + const hasAlternateSentinel = () => { |
| 210 | + let styleSentinel = getColorSchemeSentinel(); |
| 211 | + if (styleSentinel !== null) { |
| 212 | + return styleSentinel === "alternate"; |
| 213 | + } else { |
| 214 | + return false; |
| 215 | + } |
| 216 | + } |
| 217 | + const setStyleSentinel = (alternate) => { |
| 218 | + const value = alternate ? "alternate" : "default"; |
| 219 | + if (!isFileUrl()) { |
| 220 | + window.localStorage.setItem("quarto-color-scheme", value); |
| 221 | + } else { |
| 222 | + localAlternateSentinel = value; |
| 223 | + } |
| 224 | + } |
| 225 | + const getColorSchemeSentinel = () => { |
| 226 | + if (!isFileUrl()) { |
| 227 | + const storageValue = window.localStorage.getItem("quarto-color-scheme"); |
| 228 | + return storageValue != null ? storageValue : localAlternateSentinel; |
| 229 | + } else { |
| 230 | + return localAlternateSentinel; |
| 231 | + } |
| 232 | + } |
| 233 | + const toggleGiscusIfUsed = (isAlternate, darkModeDefault) => { |
| 234 | + const baseTheme = document.querySelector('#giscus-base-theme')?.value ?? 'light'; |
| 235 | + const alternateTheme = document.querySelector('#giscus-alt-theme')?.value ?? 'dark'; |
| 236 | + let newTheme = ''; |
| 237 | + if(authorPrefersDark) { |
| 238 | + newTheme = isAlternate ? baseTheme : alternateTheme; |
| 239 | + } else { |
| 240 | + newTheme = isAlternate ? alternateTheme : baseTheme; |
| 241 | + } |
| 242 | + const changeGiscusTheme = () => { |
| 243 | + // From: https://github.com/giscus/giscus/issues/336 |
| 244 | + const sendMessage = (message) => { |
| 245 | + const iframe = document.querySelector('iframe.giscus-frame'); |
| 246 | + if (!iframe) return; |
| 247 | + iframe.contentWindow.postMessage({ giscus: message }, 'https://giscus.app'); |
| 248 | + } |
| 249 | + sendMessage({ |
| 250 | + setConfig: { |
| 251 | + theme: newTheme |
| 252 | + } |
| 253 | + }); |
| 254 | + } |
| 255 | + const isGiscussLoaded = window.document.querySelector('iframe.giscus-frame') !== null; |
| 256 | + if (isGiscussLoaded) { |
| 257 | + changeGiscusTheme(); |
| 258 | + } |
| 259 | + }; |
| 260 | + const authorPrefersDark = false; |
| 261 | + const queryPrefersDark = window.matchMedia('(prefers-color-scheme: dark)'); |
| 262 | + const darkModeDefault = queryPrefersDark.matches; |
| 263 | + document.querySelector('link#quarto-text-highlighting-styles.quarto-color-scheme-extra').rel = 'disabled-stylesheet'; |
| 264 | + document.querySelector('link#quarto-bootstrap.quarto-color-scheme-extra').rel = 'disabled-stylesheet'; |
| 265 | + let localAlternateSentinel = darkModeDefault ? 'alternate' : 'default'; |
| 266 | + // Dark / light mode switch |
| 267 | + window.quartoToggleColorScheme = () => { |
| 268 | + // Read the current dark / light value |
| 269 | + let toAlternate = !hasAlternateSentinel(); |
| 270 | + toggleColorMode(toAlternate); |
| 271 | + setStyleSentinel(toAlternate); |
| 272 | + toggleGiscusIfUsed(toAlternate, darkModeDefault); |
| 273 | + window.dispatchEvent(new Event('resize')); |
| 274 | + }; |
| 275 | + queryPrefersDark.addEventListener("change", e => { |
| 276 | + if(window.localStorage.getItem("quarto-color-scheme") !== null) |
| 277 | + return; |
| 278 | + const alternate = e.matches |
| 279 | + toggleColorMode(alternate); |
| 280 | + localAlternateSentinel = e.matches ? 'alternate' : 'default'; // this is used alongside local storage! |
| 281 | + toggleGiscusIfUsed(alternate, darkModeDefault); |
| 282 | + }); |
| 283 | + // Switch to dark mode if need be |
| 284 | + if (hasAlternateSentinel()) { |
| 285 | + toggleColorMode(true); |
| 286 | + } else { |
| 287 | + toggleColorMode(false); |
| 288 | + } |
| 289 | + </script> |
115 | 290 |
|
116 | 291 | <div id="quarto-search-results"></div> |
117 | 292 | <header id="quarto-header" class="headroom fixed-top"> |
|
168 | 343 | <div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-full page-navbar"> |
169 | 344 | <!-- sidebar --> |
170 | 345 | <!-- margin-sidebar --> |
171 | | - <div id="quarto-margin-sidebar" class="sidebar margin-sidebar zindex-bottom"> |
172 | | - |
173 | | - </div> |
| 346 | + |
174 | 347 | <!-- main --> |
175 | 348 | <main class="content column-page" id="quarto-document-content"> |
176 | 349 |
|
| 350 | + |
177 | 351 | <header id="title-block-header" class="quarto-title-block default"> |
178 | 352 | <div class="quarto-title"> |
179 | 353 | <h1 class="title">Civitas Explorer</h1> |
@@ -288,6 +462,19 @@ <h1 class="title">Civitas Explorer</h1> |
288 | 462 | </main> <!-- /main --> |
289 | 463 | <script id="quarto-html-after-body" type="application/javascript"> |
290 | 464 | window.document.addEventListener("DOMContentLoaded", function (event) { |
| 465 | + // Ensure there is a toggle, if there isn't float one in the top right |
| 466 | + if (window.document.querySelector('.quarto-color-scheme-toggle') === null) { |
| 467 | + const a = window.document.createElement('a'); |
| 468 | + a.classList.add('top-right'); |
| 469 | + a.classList.add('quarto-color-scheme-toggle'); |
| 470 | + a.href = ""; |
| 471 | + a.onclick = function() { try { window.quartoToggleColorScheme(); } catch {} return false; }; |
| 472 | + const i = window.document.createElement("i"); |
| 473 | + i.classList.add('bi'); |
| 474 | + a.appendChild(i); |
| 475 | + window.document.body.appendChild(a); |
| 476 | + } |
| 477 | + setColorSchemeToggle(hasAlternateSentinel()) |
291 | 478 | const icon = ""; |
292 | 479 | const anchorJS = new window.AnchorJS(); |
293 | 480 | anchorJS.options = { |
|
0 commit comments