From f64f21fbd784f48ef6eb0b61a51b4df932271f52 Mon Sep 17 00:00:00 2001 From: Davis Vann Bennett Date: Fri, 19 Sep 2025 21:08:44 +0200 Subject: [PATCH 1/3] make dark mode / light mode toggle responsive to user preferences --- _includes/head/custom.html | 302 +++++++++++++++++++++++++++++++++++++ _includes/masthead.html | 40 +++++ 2 files changed, 342 insertions(+) create mode 100644 _includes/masthead.html diff --git a/_includes/head/custom.html b/_includes/head/custom.html index 9ae6fd0..17210df 100644 --- a/_includes/head/custom.html +++ b/_includes/head/custom.html @@ -9,3 +9,305 @@ + + + + + + diff --git a/_includes/masthead.html b/_includes/masthead.html new file mode 100644 index 0000000..23b956c --- /dev/null +++ b/_includes/masthead.html @@ -0,0 +1,40 @@ +{% capture logo_path %}{{ site.logo }}{% endcapture %} + +
+
+
+ +
+
+
\ No newline at end of file From 6d554c7273a3f095a1ba312f1689b3a621ff65af Mon Sep 17 00:00:00 2001 From: Davis Vann Bennett Date: Fri, 19 Sep 2025 21:21:40 +0200 Subject: [PATCH 2/3] fix heading of datasets table --- _includes/head/custom.html | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/_includes/head/custom.html b/_includes/head/custom.html index 17210df..0231105 100644 --- a/_includes/head/custom.html +++ b/_includes/head/custom.html @@ -168,6 +168,44 @@ color: var(--link-hover-color) !important; } +/* Table styling for light/dark mode */ +table { + background: var(--bg-color) !important; + color: var(--text-color) !important; + border-collapse: collapse !important; +} + +table th, +table td { + background: var(--bg-color) !important; + color: var(--text-color) !important; + border: 1px solid var(--border-color) !important; + padding: 0.5rem !important; +} + +table th { + background: var(--secondary-color) !important; + color: var(--text-color) !important; + font-weight: bold !important; +} + +table tbody tr:nth-child(even) { + background: var(--secondary-color) !important; +} + +table tbody tr:hover { + background: var(--notice-bg) !important; +} + +/* Ensure table links are visible */ +table a { + color: var(--link-color) !important; +} + +table a:hover { + color: var(--link-hover-color) !important; +} + /* Theme toggle button styles */ .theme-toggle { position: relative; From fdff54a60f75bf389b73be0fce86dd424c9f4f2d Mon Sep 17 00:00:00 2001 From: Josh Moore Date: Thu, 2 Oct 2025 10:26:23 +0200 Subject: [PATCH 3/3] Swap light and dark toggle --- _includes/head/custom.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/head/custom.html b/_includes/head/custom.html index 0231105..694c641 100644 --- a/_includes/head/custom.html +++ b/_includes/head/custom.html @@ -295,7 +295,7 @@ const icon = button.querySelector('.theme-toggle-icon'); const text = button.querySelector('.theme-toggle-text'); - if (currentTheme === THEME_DARK) { + if (currentTheme === THEME_LIGHT) { icon.innerHTML = '☀️'; text.textContent = 'Light'; button.setAttribute('aria-label', 'Switch to light mode');