|
| 1 | +<!-- |
| 2 | +# MIT License |
| 3 | +# |
| 4 | +# Copyright (c) 2025 Mickaël Canouil |
| 5 | +# |
| 6 | +# Permission is hereby granted, free of charge, to any person obtaining a copy |
| 7 | +# of this software and associated documentation files (the "Software"), to deal |
| 8 | +# in the Software without restriction, including without limitation the rights |
| 9 | +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 10 | +# copies of the Software, and to permit persons to whom the Software is |
| 11 | +# furnished to do so, subject to the following conditions: |
| 12 | +
|
| 13 | +# The above copyright notice and this permission notice shall be included in all |
| 14 | +# copies or substantial portions of the Software. |
| 15 | +
|
| 16 | +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 17 | +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 18 | +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 19 | +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 20 | +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 21 | +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 22 | +# SOFTWARE. |
| 23 | +--> |
| 24 | + |
| 25 | +<script type="text/javascript"> |
| 26 | + const dateElements = document.querySelectorAll("p.date, div.listing-date"); |
| 27 | + dateElements.forEach((el) => { |
| 28 | + el.innerHTML = el.innerHTML.replace( |
| 29 | + /(\d+)(st|nd|rd|th)/g, |
| 30 | + "$1<sup style='font-size:0.5em;font-style:italic;'>$2</sup>" |
| 31 | + ); |
| 32 | + }); |
| 33 | +</script> |
| 34 | +<script type="text/javascript"> |
| 35 | + Reveal.addEventListener("ready", (event) => { |
| 36 | + if (event.indexh === 0) { |
| 37 | + document.querySelector("div.slide-menu-button").style.display = "none"; |
| 38 | + document.querySelector("div.has-logo > img.slide-logo").style.display = "none"; |
| 39 | + } else { |
| 40 | + document.querySelector("div.slide-menu-button").style.display = "block"; |
| 41 | + document.querySelector("div.has-logo > img.slide-logo").style.display = null; |
| 42 | + } |
| 43 | + }); |
| 44 | + Reveal.addEventListener("slidechanged", (event) => { |
| 45 | + if (event.indexh === 0) { |
| 46 | + document.querySelector("div.slide-menu-button").style.display = "none"; |
| 47 | + document.querySelector("div.has-logo > img.slide-logo").style.display = "none"; |
| 48 | + } else { |
| 49 | + document.querySelector("div.slide-menu-button").style.display = "block"; |
| 50 | + document.querySelector("div.has-logo > img.slide-logo").style.display = null; |
| 51 | + } |
| 52 | + }); |
| 53 | +</script> |
| 54 | +<script type="text/javascript"> |
| 55 | + Reveal.on("ready", function () { |
| 56 | + const tabsetSlides = document.querySelectorAll(".reveal .slides section .panel-tabset"); |
| 57 | + tabsetSlides.forEach(function (tabset) { |
| 58 | + const tabCount = tabset.querySelectorAll("ul li").length; |
| 59 | + for (let i = 0; i < tabCount - 1; i++) { |
| 60 | + const fragmentDiv = document.createElement("div"); |
| 61 | + fragmentDiv.className = "panel-tabset-fragment fragment"; |
| 62 | + fragmentDiv.dataset.tabIndex = i + 1; |
| 63 | + fragmentDiv.style.display = "none"; |
| 64 | + tabset.parentNode.appendChild(fragmentDiv); |
| 65 | + } |
| 66 | + }); |
| 67 | + }); |
| 68 | + |
| 69 | + Reveal.on("fragmentshown", (event) => { |
| 70 | + if (event.fragment.classList.contains("panel-tabset-fragment")) { |
| 71 | + const tabIndex = parseInt(event.fragment.dataset.tabIndex); |
| 72 | + const tabset = Reveal.getCurrentSlide().querySelector(".panel-tabset"); |
| 73 | + const tabLinks = tabset.querySelectorAll("ul li a"); |
| 74 | + if (tabIndex < tabLinks.length) { |
| 75 | + tabLinks[tabIndex].click(); |
| 76 | + } |
| 77 | + } |
| 78 | + }); |
| 79 | + |
| 80 | + Reveal.on("fragmenthidden", (event) => { |
| 81 | + if (event.fragment.classList.contains("panel-tabset-fragment")) { |
| 82 | + const tabIndex = parseInt(event.fragment.dataset.tabIndex); |
| 83 | + const tabset = Reveal.getCurrentSlide().querySelector(".panel-tabset"); |
| 84 | + const tabLinks = tabset.querySelectorAll("ul li a"); |
| 85 | + if (tabIndex > 0) { |
| 86 | + tabLinks[tabIndex - 1].click(); |
| 87 | + } else { |
| 88 | + tabLinks[0].click(); |
| 89 | + } |
| 90 | + } |
| 91 | + }); |
| 92 | +</script> |
| 93 | +<style> |
| 94 | + .panel-tabset ul li a:focus, |
| 95 | + .panel-tabset ul li a:active { |
| 96 | + outline: none; |
| 97 | + box-shadow: none; |
| 98 | + } |
| 99 | +</style> |
0 commit comments