|
241 | 241 | toggleColorMode(toAlternate); |
242 | 242 | setStyleSentinel(toAlternate); |
243 | 243 | toggleGiscusIfUsed(toAlternate, darkModeDefault); |
| 244 | + window.dispatchEvent(new Event('resize')); |
244 | 245 | }; |
245 | 246 | // Switch to dark mode if need be |
246 | 247 | if (hasAlternateSentinel()) { |
|
256 | 257 | <div class="navbar-container container-fluid"> |
257 | 258 | <div class="navbar-brand-container mx-auto"> |
258 | 259 | <a href="./index.html" class="navbar-brand navbar-brand-logo"> |
259 | | - <img src="./man/ohdsi16x16.png" alt="" class="navbar-logo"> |
| 260 | + <img src="./man/ohdsi16x16.png" alt="" class="navbar-logo light-content"> |
| 261 | + <img src="./man/ohdsi16x16.png" alt="" class="navbar-logo dark-content"> |
260 | 262 | </a> |
261 | 263 | <a class="navbar-brand" href="./index.html"> |
262 | 264 | <span class="navbar-title">OMOP Common Data Model</span> |
@@ -553,13 +555,14 @@ <h1 class="title">CDM v3</h1> |
553 | 555 | e.clearSelection(); |
554 | 556 | } |
555 | 557 | const getTextToCopy = function(trigger) { |
556 | | - const codeEl = trigger.previousElementSibling.cloneNode(true); |
557 | | - for (const childEl of codeEl.children) { |
558 | | - if (isCodeAnnotation(childEl)) { |
559 | | - childEl.remove(); |
560 | | - } |
| 558 | + const outerScaffold = trigger.parentElement.cloneNode(true); |
| 559 | + const codeEl = outerScaffold.querySelector('code'); |
| 560 | + for (const childEl of codeEl.children) { |
| 561 | + if (isCodeAnnotation(childEl)) { |
| 562 | + childEl.remove(); |
561 | 563 | } |
562 | | - return codeEl.innerText; |
| 564 | + } |
| 565 | + return codeEl.innerText; |
563 | 566 | } |
564 | 567 | const clipboard = new window.ClipboardJS('.code-copy-button:not([data-in-quarto-modal])', { |
565 | 568 | text: getTextToCopy |
|
0 commit comments