From c1d83b4bd6dd8c4997439d4bf3bec48eae8b62bb Mon Sep 17 00:00:00 2001 From: kbenestad Date: Tue, 19 May 2026 13:25:29 +0700 Subject: [PATCH 1/4] Fix category picker and hamburger using page colours instead of nav colours (#22) Both elements render against --bg-nav but were using --font-colour (the page text colour). Switch to --nav-link-colour / --nav-section-heading-colour / --nav-link-active-colour so they remain legible when nav-background is set to a colour that contrasts with the page text colour (e.g. dark blue nav with white nav-link text). https://claude.ai/code/session_01MA8V1FvCmxjkCYyTxseaxB Co-authored-by: Claude --- app/index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/index.html b/app/index.html index c813133..ab6d934 100644 --- a/app/index.html +++ b/app/index.html @@ -448,7 +448,7 @@ body { border: none; cursor: pointer; padding: 0.4rem; - color: var(--font-colour); + color: var(--nav-link-colour, var(--font-colour)); z-index: 150; } .hamburger svg { width: 22px; height: 22px; } @@ -627,17 +627,17 @@ body { padding: 0.55rem 0.85rem; cursor: pointer; font-size: 0.88rem; - color: var(--font-colour); + color: var(--nav-link-colour, var(--font-colour)); border-bottom: 1px solid var(--divider); transition: background 0.1s; } .category-option:last-child { border-bottom: none; } .category-option:hover { background: var(--nav-hover-bg); } -.category-option.active { background: var(--nav-active-bg); color: var(--accent); font-weight: 600; } +.category-option.active { background: var(--nav-active-bg); color: var(--nav-link-active-colour, var(--accent)); font-weight: 600; } .category-option .secondary { display: block; font-size: 0.75rem; - color: var(--font-colour-muted); + color: var(--nav-section-heading-colour, var(--font-colour-muted)); margin-top: 0.15rem; } From cd02f43e82fa8012aa7446839259542ca863313c Mon Sep 17 00:00:00 2001 From: kbenestad Date: Tue, 19 May 2026 13:28:51 +0700 Subject: [PATCH 2/4] Fix category font not reverting when switching to a no-font category (#23) * Fix category picker and hamburger using page colours instead of nav colours Both elements render against --bg-nav but were using --font-colour (the page text colour). Switch to --nav-link-colour / --nav-section-heading-colour / --nav-link-active-colour so they remain legible when nav-background is set to a colour that contrasts with the page text colour (e.g. dark blue nav with white nav-link text). https://claude.ai/code/session_01MA8V1FvCmxjkCYyTxseaxB * Fix category font not reverting when switching to a no-font category maybeLoadCategoryFont applied a font-family to document.body but never cleared it when switching to a category with no font defined. The inline style overrides the CSS --font-body variable, so the category font persisted indefinitely. Fix: reset document.body.style.fontFamily to '' when the target category has no font (letting --font-body take effect), and re-apply the family string when switching back to an already-loaded font category. https://claude.ai/code/session_01MA8V1FvCmxjkCYyTxseaxB --------- Co-authored-by: Claude --- app/index.html | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/app/index.html b/app/index.html index ab6d934..3f05de6 100644 --- a/app/index.html +++ b/app/index.html @@ -1094,9 +1094,16 @@ body { async function maybeLoadCategoryFont(code) { const cat = categoriesByCode[code]; - if (!cat || !cat.font || loadedFonts.has(cat.font)) return; - showFontLoadingBanner(); + if (!cat || !cat.font) { + document.body.style.fontFamily = ''; + return; + } const family = 'mdcms-cat-' + code; + if (loadedFonts.has(cat.font)) { + document.body.style.fontFamily = `"${family}", ${getComputedStyle(document.documentElement).getPropertyValue('--font-body').trim()}`; + return; + } + showFontLoadingBanner(); const css = `@font-face { font-family: "${family}"; src: url("assets/fonts/${cat.font}"); }`; const style = document.createElement('style'); style.textContent = css; @@ -1106,8 +1113,7 @@ body { await face.load(); document.fonts.add(face); loadedFonts.add(cat.font); - // Apply font to body for this session - document.body.style.fontFamily = `"${family}", ${getComputedStyle(document.body).fontFamily}`; + document.body.style.fontFamily = `"${family}", ${getComputedStyle(document.documentElement).getPropertyValue('--font-body').trim()}`; } catch (e) { console.warn('Font load failed:', e); } From cb0bc180a43c0f9582399d07cbcea9334a95161c Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 19 May 2026 06:48:03 +0000 Subject: [PATCH 3/4] Remove default bold-on-hover from content links Link hover bold was hardcoded to 700 in both light and dark root variables. Users can opt in via `link-style-hover: ...:bold` in theme.yml. https://claude.ai/code/session_01EzU13EL8D5Ud2ngQUKDj9e --- app/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/index.html b/app/index.html index 3f05de6..bd88e70 100644 --- a/app/index.html +++ b/app/index.html @@ -76,7 +76,7 @@ if ('serviceWorker' in navigator) { --link-visited-colour: #7C3AED; --link-decoration: underline; --link-hover-decoration: underline; - --link-hover-weight: 700; + --link-hover-weight: normal; --link-visited-decoration: underline; --search-bg: #FFFFFF; --search-border: #E2E8F0; @@ -113,7 +113,7 @@ if ('serviceWorker' in navigator) { --link-visited-colour: #A78BFA; --link-decoration: underline; --link-hover-decoration: underline; - --link-hover-weight: 700; + --link-hover-weight: normal; --link-visited-decoration: underline; --search-bg: #1E293B; --search-border: #334155; From d63fc0035f8761bf2f30365668a5e2ab95922a30 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 19 May 2026 06:58:41 +0000 Subject: [PATCH 4/4] Document unreleased.md as a living changelog for development https://claude.ai/code/session_01EzU13EL8D5Ud2ngQUKDj9e --- CLAUDE.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 50c27bc..78e55c2 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -15,6 +15,10 @@ Every merge into `main` is a release. Before committing any change to `mdcms.py` In practice: check out `development`, do the work, push to `development`, PR `development` → `main` when ready to release. +## Unreleased changelog + +`docs/unreleased.md` is a living document that tracks every fix or feature on `development` that has not yet been merged to `main`. Keep it current: whenever a change lands on `development`, add or update an entry in `unreleased.md` in the same commit (or a follow-up commit to `development`). When a batch of changes is merged to `main` and released, clear the entries that were released and leave the file in place for the next round of work. + ## What this project is MD-CMS is a markdown-based static site system with two distinct parts: