From 962d5bab7f27459406f85f3cc46bf148bfcf3435 Mon Sep 17 00:00:00 2001 From: ort Date: Sat, 15 Aug 2026 17:16:16 -0400 Subject: [PATCH] Fix kiosk weekend visibility and landscape weekday layout The kiosk deliberately ignored calendar.showWeekend when it was built, treating the parent's toggle as print-only -- but that's not what parents actually expect: hiding the weekend on the dashboard should hide it on the tablet too. kiosk.js now toggles weekendWrap's hidden class the same way the parent editor does. Separately, weekdayBoard's auto-fit/minmax(240px) grid only fit 4 columns on real tablet landscape widths (~1024-1180px), pushing Friday to a second row. Since weekdayBoard always holds exactly 5 day-cards, forcing repeat(5, 1fr) once there's clearly tablet-landscape width (960px+, excludes large phones in landscape) fits all 5 comfortably instead of relying on auto-fit's width heuristic. Verified both at real tablet landscape sizes (1024x768, 1180x820) with the Browser tool: 5 weekday columns fit in one row, and the weekend section correctly appears/disappears with showWeekend. --- public/js/kiosk.js | 2 ++ public/kiosk.html | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/public/js/kiosk.js b/public/js/kiosk.js index d94de1e..b21f3d5 100644 --- a/public/js/kiosk.js +++ b/public/js/kiosk.js @@ -38,6 +38,8 @@ function draw(calendar) { handlers, todayName: todayName(), }); + + weekendWrap.classList.toggle('hidden', !calendar.showWeekend); } async function poll() { diff --git a/public/kiosk.html b/public/kiosk.html index d35f1ec..ee69c24 100644 --- a/public/kiosk.html +++ b/public/kiosk.html @@ -19,6 +19,18 @@ .board{ grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } .task-text{ font-size: 1.02rem; } + /* weekdayBoard always holds exactly 5 day-cards (Mon-Fri) — on a tablet + in landscape there's room for all 5 side by side, but the 240px + auto-fit minimum (sized for narrower/portrait views) was only letting + 4 fit, pushing Friday to a second row. Force exactly 5 columns once + there's clearly tablet-landscape width to do it justice; narrower + views keep the auto-fit wrapping behavior above. 960px excludes large + phones in landscape (~926px max) while covering real tablets. + */ + @media (orientation: landscape) and (min-width: 960px) { + .board{ grid-template-columns: repeat(5, 1fr); } + } + /* Full-bleed standalone launch: respect notches/home-indicator, and stop iOS's rubber-band overscroll from flashing white space at the edges. */ body{