From d8c0462b753a0208b1a9c8a43b23e131e4c38a35 Mon Sep 17 00:00:00 2001 From: bdu-birhanu <birhanu.hailub@gmail.com> Date: Thu, 10 Oct 2024 15:52:35 -0500 Subject: [PATCH] fix footer and menu --- _quarto.yml | 2 +- runtime/includes/footer.html | 33 ++++++++++++++++++++++++++++++--- runtime/theme/uab-rc.css | 14 +++++++++++++- 3 files changed, 44 insertions(+), 5 deletions(-) diff --git a/_quarto.yml b/_quarto.yml index a132635..4e9066c 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -29,7 +29,7 @@ format: height: 720 auto-stretch: false history: true - menu: false + menu: true progress: true revealjs-plugins: - rStackFix diff --git a/runtime/includes/footer.html b/runtime/includes/footer.html index 5852182..d7b46de 100644 --- a/runtime/includes/footer.html +++ b/runtime/includes/footer.html @@ -4,9 +4,36 @@ </div> <div class="footer-center"> Research Computing - - <a class="support-link" href="https://docs.rc.uab.edu" - >https://docs.rc.uab.edu</a - > + <a class="support-link" href="https://docs.rc.uab.edu">https://docs.rc.uab.edu</a> </div> <div class="footer-right">© UAB</div> </div> + +<script> + //execute the function () {...} only when the entire HTML document (DOM)loaded + document.addEventListener("DOMContentLoaded", function () { + // Function to check the current slide + function checkSlide() { + var titleSlide = document.querySelector("section#title-slide"); + var customFooter = document.querySelector(".uabfooter"); + + if (customFooter) { + // Check if the current slide is the title slide + var currentSlide = document.querySelector(".reveal .slides .present"); + if (currentSlide === titleSlide) { + customFooter.style.display = "none"; // Hide footer on title slide + } else { + customFooter.style.display = "flex"; // Show footer on other slides + } + } + } + + // Call fun "checkSlide", initial check on load whether it is error free + checkSlide(); + + // Check the slide when it changes + Reveal.on('slidechanged', function (event) { + checkSlide(); + }); + }); +</script> diff --git a/runtime/theme/uab-rc.css b/runtime/theme/uab-rc.css index 3da7620..77c7278 100644 --- a/runtime/theme/uab-rc.css +++ b/runtime/theme/uab-rc.css @@ -131,7 +131,6 @@ div.reveal div.slides div.quarto-title-authors { /* headers */ .reveal h1, -.reveal h2, .reveal h3, .reveal h4, .reveal h5, @@ -139,6 +138,13 @@ div.reveal div.slides div.quarto-title-authors { color: var(--uab-dragons-lair-green); } +/* headers */ +.reveal h2 { + color: var(--uab-dragons-lair-green); + text-align: center; +} + + /* return to index */ .top-left-link { position: fixed; @@ -207,3 +213,9 @@ body { align-items: center; width: 25%; } + +.reveal .slide-menu-button { + top: 8px; + left: 8px; + bottom: auto; +} -- GitLab