From 16a3d3aa263ff29cd83bbda13599e3ad570f67eb Mon Sep 17 00:00:00 2001 From: jimmy Date: Wed, 4 Nov 2026 00:55:26 +1300 Subject: [PATCH] fix(ui): bring back v1's header and menu The header is one row again: zone tabs on the left, then the BPM readout, and on wide screens the Beat/Downbeat switch, brightness and the buttons. Under 1000 px the buttons fold into the Menu, which opens with the mode toggle and brightness, as in v1. Groups and the Beat/Downbeat switch from main are kept; the Zones dropdown main used on narrow screens is gone, since the zone tabs stay visible. Co-Authored-By: Claude Opus 5.5 --- web/static/style.css | 134 ++++++++------------------------------- web/templates/index.html | 62 ++++++++---------- 2 files changed, 54 insertions(+), 142 deletions(-) diff --git a/web/static/style.css b/web/static/style.css index 0142743..4e2a903 100644 --- a/web/static/style.css +++ b/web/static/style.css @@ -68,16 +68,15 @@ body { height: 100vh; } -/* One header line: zone tabs, then BPM and the Menu; every action is in the Menu */ +/* One header row: zone tabs, the BPM readout, then the buttons (or, on narrow screens, the Menu) */ header { background-color: #1a1a1a; padding: 0.75rem 1rem; display: flex; - flex-direction: row; + justify-content: space-between; align-items: center; - justify-content: flex-start; border-bottom: 2px solid #4a4a4a; - gap: 0.65rem; + gap: 0.75rem; } header h1 { @@ -85,92 +84,18 @@ header h1 { font-weight: 600; } -/* After the zone tabs: BPM and the Menu */ -.header-end { +.header-actions { display: flex; align-items: center; gap: 0.5rem; - flex-wrap: nowrap; + flex: 0 1 auto; + flex-wrap: wrap; justify-content: flex-end; - margin-left: auto; - flex: 0 0 auto; - min-width: 0; - order: 1; -} - -/* 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 { - display: none; - position: relative; - align-items: center; - flex-shrink: 0; -} - -.zones-menu-dropdown { - position: absolute; - top: 100%; - left: 0; - background-color: #1a1a1a; - border: 1px solid #4a4a4a; - border-radius: 4px; - padding: 0.25rem 0; - display: none; - min-width: 10rem; - max-width: min(16rem, calc(100vw - 1rem)); - max-height: min(50vh, 20rem); - overflow-y: auto; - z-index: 1100; -} - -.zones-menu-dropdown.open { - display: block; -} - -.zones-menu-item { - width: 100%; - background: none; - border: none; - color: white; - text-align: left; - padding: 0.45rem 0.75rem; - font-size: 0.85rem; - cursor: pointer; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.zones-menu-item:hover { - background-color: #333; -} - -.zones-menu-item.active { - background-color: #6a5acd; - color: white; -} - -.zones-menu-empty { - padding: 0.45rem 0.75rem; - font-size: 0.85rem; -} - -#zones-menu-btn { - max-width: 9rem; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; } .header-menu-mobile { - display: flex; + display: none; position: relative; - align-items: center; } .main-menu-dropdown { @@ -207,9 +132,8 @@ header h1 { } .menu-brightness-control { - padding: 0.55rem 0.75rem 0.45rem; - border-top: 1px solid #333; - margin-top: 0.25rem; + padding: 0.45rem 0.75rem 0.55rem; + border-bottom: 1px solid #333; } .menu-brightness-control label { @@ -486,12 +410,16 @@ body.preset-ui-run .edit-mode-only { .zones-container { background-color: transparent; - padding: 0; - flex: 1 1 auto; - min-width: 0; + padding: 0.5rem 0; + flex: 1 1 14rem; + min-width: 8rem; + align-self: stretch; display: flex; align-items: center; - order: 0; +} + +.audio-top-indicator { + flex-shrink: 0; } .zones-list { @@ -1614,7 +1542,7 @@ html.simulated-bpm-mode .seq-switch-toggle-wrap { /* Mobile-friendly layout */ @media (max-width: 1000px) { header { - gap: 0.5rem; + gap: 0.25rem; } header h1 { @@ -1625,37 +1553,27 @@ html.simulated-bpm-mode .seq-switch-toggle-wrap { max-width: min(16rem, calc(100vw - 1rem)); } - - .zones-menu-mobile { - display: flex; - margin-right: auto; + .zones-container { + padding: 0.5rem 0; + border-bottom: none; } - .zones-container { + /* All actions are in the Menu */ + .header-actions { display: none; } .header-menu-mobile { - display: flex; - flex-direction: row; - align-items: center; - gap: 0.35rem; - margin-top: 0; + display: block; margin-left: auto; } - .header-end { - gap: 0.35rem; - flex: 1 1 auto; - margin-left: 0; - } - - .header-end .audio-top-indicator { + .audio-top-indicator { min-width: 5rem; flex-shrink: 0; } - .header-end .audio-top-beat-sync { + .audio-top-beat-sync { padding: 0.2rem 0.4rem; min-height: 2rem; gap: 0.3rem; diff --git a/web/templates/index.html b/web/templates/index.html index d495c0e..ef1d7a9 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -9,11 +9,20 @@
-
-
- - +
+
+ Loading zones...
+
+
+ +
+
-
- -
-
@@ -37,50 +37,44 @@ + + - - - + -
-
+
+
-
-
-
- Loading zones...
@@ -654,7 +648,7 @@
-

Zone buttons below the header; management buttons on the right (Edit mode).

+

Zone buttons on the left of the header; brightness and the other buttons on the right (Menu on narrow screens).

Run mode and Edit mode