mdcms/app
kbenestad cd02f43e82
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 <noreply@anthropic.com>
2026-05-19 13:28:51 +07:00
..
assets Add configurable nav section toggle icons 2026-05-18 15:08:59 +00:00
pages Phase 7 test setup: PWA config, sample pages, test_phase.py wiring 2026-05-17 19:11:33 +00:00
posts Rename website/ directory to app/ 2026-05-08 15:29:54 +00:00
config.yml Add full Apache 2.0 licence notice to all relevant files 2026-05-18 07:11:00 +00:00
index.html Fix category font not reverting when switching to a no-font category (#23) 2026-05-19 13:28:51 +07:00
manifest.json Add M favicon, fix manifest for PWA installability 2026-05-17 20:33:00 +00:00
nav.yml Rebuild nav.yml and search.json for phase7 test pages 2026-05-17 20:33:17 +00:00
search.json Rebuild nav.yml and search.json for phase7 test pages 2026-05-17 20:33:17 +00:00
service-worker.js Add M favicon, fix manifest for PWA installability 2026-05-17 20:33:00 +00:00
theme.yml Add configurable nav section toggle icons 2026-05-18 15:08:59 +00:00