From 011883a6a8f6fd47aa91f3a6b606d0c845f99cb5 Mon Sep 17 00:00:00 2001 From: jimmy Date: Tue, 3 Nov 2026 20:46:39 +1300 Subject: [PATCH] feat(ui): one-line header with every action in the Menu Zone tabs, the BPM readout and the Menu share one line at every width. The header buttons and the Beat/Downbeat switch move into the Menu (the narrow-screen layout, now everywhere), and the brightness slider sits at the bottom of the Menu, under its items. Co-Authored-By: Claude Opus 5.5 --- web/static/style.css | 97 +++++++++++++++++++--------------------- web/templates/index.html | 8 ++-- 2 files changed, 49 insertions(+), 56 deletions(-) diff --git a/web/static/style.css b/web/static/style.css index 3806367..0142743 100644 --- a/web/static/style.css +++ b/web/static/style.css @@ -68,12 +68,13 @@ body { height: 100vh; } +/* One header line: zone tabs, then BPM and the Menu; every action is in the Menu */ header { background-color: #1a1a1a; padding: 0.75rem 1rem; display: flex; - flex-direction: column; - align-items: stretch; + flex-direction: row; + align-items: center; justify-content: flex-start; border-bottom: 2px solid #4a4a4a; gap: 0.65rem; @@ -84,23 +85,24 @@ header h1 { font-weight: 600; } -/* Top header row: BPM, brightness, desktop buttons, mobile menu (above zone tabs) */ +/* After the zone tabs: BPM and the Menu */ .header-end { display: flex; align-items: center; gap: 0.5rem; - flex-wrap: wrap; + flex-wrap: nowrap; justify-content: flex-end; - margin-left: 0; - width: 100%; + margin-left: auto; + flex: 0 0 auto; min-width: 0; + order: 1; } -.header-actions { - display: flex; - gap: 0.5rem; - flex-wrap: wrap; - justify-content: flex-end; +/* The row of header buttons stays in the page for the Menu to forward clicks to, but is not shown; + the Beat/Downbeat switch is in the Menu too */ +.header-actions, +#seq-switch-toggle-wrap { + display: none !important; } .zones-menu-mobile { @@ -166,7 +168,7 @@ header h1 { } .header-menu-mobile { - display: none; + display: flex; position: relative; align-items: center; } @@ -175,6 +177,7 @@ header h1 { position: absolute; top: 100%; right: 0; + max-width: min(16rem, calc(100vw - 1rem)); background-color: #1a1a1a; border: 1px solid #4a4a4a; border-radius: 4px; @@ -204,8 +207,9 @@ header h1 { } .menu-brightness-control { - padding: 0.45rem 0.75rem 0.55rem; - border-bottom: 1px solid #333; + padding: 0.55rem 0.75rem 0.45rem; + border-top: 1px solid #333; + margin-top: 0.25rem; } .menu-brightness-control label { @@ -219,6 +223,29 @@ header h1 { width: 100%; } +/* Beat/Downbeat switch in the Menu: compact so it fits the dropdown */ +#seq-switch-toggle-wrap-mobile .nav-slide-toggle-side-label { + font-size: 0.7rem; + flex-shrink: 1; + min-width: 0; +} + +#seq-switch-toggle-wrap-mobile .nav-slide-toggle-switch.seq-switch-toggle { + width: 3.6rem; + height: 1.25rem; + flex-shrink: 0; +} + +#seq-switch-toggle-wrap-mobile .nav-slide-toggle-switch .nav-slide-toggle-thumb { + width: 0.9rem; + height: 0.9rem; +} + +#seq-switch-toggle-wrap-mobile .nav-slide-toggle-switch.seq-switch-toggle--downbeat .nav-slide-toggle-thumb { + left: calc(100% - 0.9rem - 2px); + transform: translateY(-50%); +} + .header-brightness-control { display: flex; align-items: center; @@ -460,12 +487,11 @@ body.preset-ui-run .edit-mode-only { .zones-container { background-color: transparent; padding: 0; - flex: 0 0 auto; - width: 100%; + flex: 1 1 auto; min-width: 0; - align-self: stretch; display: flex; align-items: center; + order: 0; } .zones-list { @@ -1588,8 +1614,6 @@ html.simulated-bpm-mode .seq-switch-toggle-wrap { /* Mobile-friendly layout */ @media (max-width: 1000px) { header { - flex-direction: column; - align-items: stretch; gap: 0.5rem; } @@ -1597,41 +1621,10 @@ html.simulated-bpm-mode .seq-switch-toggle-wrap { font-size: 1.1rem; } - /* On mobile, hide header buttons; all actions (including Zones) are in the Menu dropdown */ - .header-actions { - display: none; - } - - /* Beat/downbeat toggle lives in the mobile menu only */ - #seq-switch-toggle-wrap { - display: none !important; - } - .main-menu-dropdown { max-width: min(16rem, calc(100vw - 1rem)); } - #seq-switch-toggle-wrap-mobile .nav-slide-toggle-side-label { - font-size: 0.7rem; - flex-shrink: 1; - min-width: 0; - } - - #seq-switch-toggle-wrap-mobile .nav-slide-toggle-switch.seq-switch-toggle { - width: 3.6rem; - height: 1.25rem; - flex-shrink: 0; - } - - #seq-switch-toggle-wrap-mobile .nav-slide-toggle-switch .nav-slide-toggle-thumb { - width: 0.9rem; - height: 0.9rem; - } - - #seq-switch-toggle-wrap-mobile .nav-slide-toggle-switch.seq-switch-toggle--downbeat .nav-slide-toggle-thumb { - left: calc(100% - 0.9rem - 2px); - transform: translateY(-50%); - } .zones-menu-mobile { display: flex; @@ -1653,8 +1646,8 @@ html.simulated-bpm-mode .seq-switch-toggle-wrap { .header-end { gap: 0.35rem; - flex-shrink: 0; - flex-wrap: nowrap; + flex: 1 1 auto; + margin-left: 0; } .header-end .audio-top-indicator { diff --git a/web/templates/index.html b/web/templates/index.html index f531915..d495c0e 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -59,10 +59,6 @@ Downbeat - @@ -75,6 +71,10 @@ +