From fb6323657286b0ab3e46b6c8af43b9a63ec07ffb Mon Sep 17 00:00:00 2001 From: efiten Date: Sat, 23 May 2026 17:03:37 +0200 Subject: [PATCH] fix(mobile): expose dark/light toggle in More sheet on narrow viewports (#1327) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary - `#darkModeToggle` sits inside `.nav-right` which is `display: none !important` at ≤768px — mobile users had no way to switch themes - Adds a **Dark mode / Light mode** button at the bottom of the More sheet, separated from the route list by a hairline rule - Click delegates to `#darkModeToggle` so `app.js` remains the single owner of all theme logic (no duplication) - Icon (`🌙` / `☀️`) and label sync on every sheet open and after each toggle ## Test plan - [ ] Mobile (≤768px): open More sheet → "Dark mode" / "Light mode" button visible at the bottom - [ ] Tap button → theme toggles, sheet closes, icon/label update correctly on next open - [ ] Tap button repeatedly → theme keeps toggling correctly - [ ] Desktop (>768px): no visual change, `#darkModeToggle` in top-nav still works normally - [ ] `prefers-reduced-motion`: no transitions (inherited from existing sheet-item rule) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Sonnet 4.6 --- public/bottom-nav.css | 14 ++++++++++++++ public/bottom-nav.js | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) diff --git a/public/bottom-nav.css b/public/bottom-nav.css index 556f0f43..3b672ff0 100644 --- a/public/bottom-nav.css +++ b/public/bottom-nav.css @@ -241,6 +241,20 @@ white-space: nowrap; } +/* Dark mode toggle button — same layout as sheet-item but it's a