From 4ec64dca183cbbf18cc81f51c6feaee7309ba120 Mon Sep 17 00:00:00 2001 From: Thad Miller Date: Thu, 5 Mar 2026 12:10:55 -0500 Subject: [PATCH 1/2] [bugfix] make sure previous card is not shown in modal by defaulting to "loading..." --- src/assets/js/main.js | 2 ++ src/components/CardGrid.astro | 1 + 2 files changed, 3 insertions(+) diff --git a/src/assets/js/main.js b/src/assets/js/main.js index 30cb966..4aaa451 100644 --- a/src/assets/js/main.js +++ b/src/assets/js/main.js @@ -4,6 +4,7 @@ window.bootstrap = bootstrap; // trap browser back and close the modal if open const cardModal = document.getElementById('cardModal'); +const loadingMsg = cardModal.innerHTML; // Push a new history state when the modal is shown cardModal.addEventListener('shown.bs.modal', () => { history.pushState({ modalOpen: true }, null, '#cardModal'); @@ -19,6 +20,7 @@ window.addEventListener('popstate', (e) => { }); // Trigger a back navigation when the modal is closed via its native controls (X, backdrop click) cardModal.addEventListener('hide.bs.modal', () => { + cardModal.innerHTML = loadingMsg; if (history.state && history.state.modalOpen) { history.back(); } diff --git a/src/components/CardGrid.astro b/src/components/CardGrid.astro index added70..0f71b11 100644 --- a/src/components/CardGrid.astro +++ b/src/components/CardGrid.astro @@ -23,6 +23,7 @@ import BackToTop from "./BackToTop.astro" From 58e0acf4623fb11ddadd9b1f4b8d00aeb8a2b011 Mon Sep 17 00:00:00 2001 From: Thad Miller Date: Thu, 5 Mar 2026 12:14:00 -0500 Subject: [PATCH 2/2] [bugfix] bootstrap overrides must come before loading bootstrap --- src/assets/css/main.scss | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/assets/css/main.scss b/src/assets/css/main.scss index 6af3b5b..25912ef 100644 --- a/src/assets/css/main.scss +++ b/src/assets/css/main.scss @@ -1,16 +1,6 @@ -@import "_bootstrap"; - /* -------------------------------------------------- - Root Variables + Bootstrap overrides -------------------------------------------------- */ -:root { - --total: 11; /* Number of items in the energy wheel */ - --radius: 40px; /* Circle radius */ -} - -html { - scroll-behavior: smooth; -} $grid-breakpoints: ( xs: 0, @@ -31,6 +21,22 @@ $container-max-widths: ( xxxl: 1840px ) !default; + +@import "_bootstrap"; + +/* -------------------------------------------------- + Root Variables +-------------------------------------------------- */ +:root { + --total: 11; /* Number of items in the energy wheel */ + --radius: 40px; /* Circle radius */ +} + +html { + scroll-behavior: smooth; +} + + /* -------------------------------------------------- Layout -------------------------------------------------- */