diff --git a/TODO.adoc b/TODO.adoc index 10bfcac..b79491c 100644 --- a/TODO.adoc +++ b/TODO.adoc @@ -310,8 +310,8 @@ Planning in the NPS look, driving in the cockpit look, joined by the Unigrid bla . [x] Switch them: by the sun (the night mode's auto) and by hand (the topbar button cycles day / dusk / night / auto), replacing the inverting `html.night`; the planning UI's hard-coded colors onto `--ui-*` first, or a dark palette leaves light panels. Done: the - greys onto `--ui-*` by role, MapLibre's controls/popups too; night mode sets Night, the new - "◑" mode Dusk (the day map) + greys on `--ui-*` (MapLibre's controls too), `color-scheme: dark`, the controls lifted off + the dark map; night mode sets Night, "◑" Dusk (the day map) . [ ] A Dusk map (between Park Tiles and `NightMap`), the map's palette following the UI's . [ ] Daylight: a full-opacity bezel preset for sun on the screen @@ -346,8 +346,10 @@ already offline work on the road. The Pi only serves; heavy builds stay on brick * [ ] Build on brick, ship to the Pi: `offline.pmtiles`, `terrain.pmtiles`, Valhalla `tiles.tar`, `places/*.sqlite`, `hiking_trails/*.geojson`, the ZIM — an rsync (only when refreshed, which is rare) instead of the Pi's own build buttons; hide/disable those there -* [ ] Login without internet: Gitea OAuth can't run offline — let the car's LAN through - without login (e.g. `TRUSTED_NETWORKS` CIDR list), or a local fallback account +* [x] Login without internet: Gitea OAuth can't run offline — let the car's LAN through + without login (e.g. `TRUSTED_NETWORKS` CIDR list), or a local fallback account. Done: the + session cookie is checked locally (90 days, no Gitea after the login), and rpi-dev has + `TRUSTED_NETWORKS=connected` — whatever is on the Pi's own networks counts as logged in * [ ] HTTPS on the LAN (the secure session cookie, the PWA and the service worker need it): the same hostname resolved to the Pi by the car router's DNS, Let's Encrypt cert via DNS-01 * [ ] A touch display on the Pi itself (a portable ~16" USB touchscreen, the co-driver's — diff --git a/docs/design.adoc b/docs/design.adoc index 5bf9709..4ee0a68 100644 --- a/docs/design.adoc +++ b/docs/design.adoc @@ -89,8 +89,12 @@ own night palette (`NightMap`, `map_themes.js`); a Dusk map is still to do. The night mode sets the palette (`map.js`): automatic by the sun or on → Night (with the night map), "◑" → Dusk over the day map, off → Day. The planning UI's greys are the `--ui-*` tokens (`--ui-bg`, `--ui-bg-2` for -hover and fills, `--ui-line`, `--ui-fg`, `--ui-muted`); MapLibre's own -controls and popups take them too. +hover, fills and the section bands, `--ui-line`, `--ui-fg`, `--ui-muted`); +MapLibre's controls and popups take them too, and a dark palette sets +`color-scheme: dark` (native checkboxes, scrollbars) and lifts the map +controls off the dark map (`--ui-bg-2` with a `--ui-line` ring). The first +try (2026-12-01) left the section bands light, checkboxes white and the +controls black on black — tokens missed by the first pass. The driving mode (`driving.js`, "Drive" in the topbar) is the cockpit's input side: big band-black buttons down the map's left — follow, zoom, diff --git a/public/css/style.css b/public/css/style.css index 5a1932d..5b7c28f 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -66,10 +66,10 @@ generate more light than the chart display itself"). */ :root[data-palette="night"] { --ui-bg: #0c0c0b; - --ui-bg-2: #161614; /* hover, subtle fills */ + --ui-bg-2: #1c1c19; /* hover, subtle fills */ --ui-fg: #8f8b80; --ui-muted: #5f5c55; - --ui-line: #24231f; + --ui-line: #34332d; --accent: #6e7c32; --accent-bg: #1d2113; --band: #000000; @@ -104,6 +104,9 @@ body { background: var(--ui-bg); color: var(--ui-fg); } .maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--ui-bg); } .maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--ui-bg); } :root[data-palette] .maplibregl-ctrl-icon { filter: invert(0.75); } +:root[data-palette] { color-scheme: dark; } /* checkboxes, scrollbars, inputs */ +:root[data-palette] .maplibregl-ctrl-group { background: var(--ui-bg-2); box-shadow: 0 0 0 1px var(--ui-line); } +:root[data-palette] .maplibregl-ctrl-group button:not(:disabled):hover { background-color: var(--ui-line); } html, body { height: 100%; @@ -640,11 +643,11 @@ html, body { .basemap-panel { position: fixed; - top: 0; + top: 44px; /* below the topbar, its title in view */ left: 52px; width: 300px; max-width: 90vw; - height: 100%; + bottom: 0; display: flex; flex-direction: column; background: var(--ui-bg); @@ -788,7 +791,7 @@ button.basemap-panel__link[hidden] { display: none; } renders here unchanged; no separate panel-flavored template needed. */ .trail-panel { position: fixed; - top: 0; + top: 44px; right: 0; bottom: 0; width: 300px; @@ -813,7 +816,7 @@ button.basemap-panel__link[hidden] { display: none; } right: 6px; border: none; border-radius: 50%; - background: rgba(255, 255, 255, 0.85); + background: rgb(from var(--ui-bg) r g b / 0.85); font-size: 18px; line-height: 1; padding: 2px 7px; @@ -854,7 +857,7 @@ button.basemap-panel__link[hidden] { display: none; } .debug-panel__body pre { margin: 2px 0 8px; padding: 6px; - background: #f6f6f6; + background: var(--ui-bg-2); border-radius: 4px; font-size: 11px; white-space: pre-wrap; @@ -898,7 +901,7 @@ button.basemap-panel__link[hidden] { display: none; } .offline-data-panel__continent > summary { font-weight: 600; - background: #f7f7f7; + background: var(--ui-bg-2); border-bottom: 1px solid var(--ui-line); } @@ -1067,11 +1070,11 @@ button.basemap-panel__link[hidden] { display: none; } .gpx-panel { position: fixed; - top: 0; + top: 44px; /* below the topbar, its title in view */ left: 52px; width: 300px; max-width: 90vw; - height: 100%; + bottom: 0; display: flex; flex-direction: column; background: var(--ui-bg); @@ -2400,7 +2403,7 @@ button.basemap-panel__link[hidden] { display: none; } flex-shrink: 0; padding: 2px 6px; border-radius: 3px; - background: #e5e5e5; + background: var(--ui-bg-2); color: var(--ui-muted); font-size: 10px; font-weight: 600; @@ -2519,7 +2522,7 @@ button.basemap-panel__link[hidden] { display: none; } color: var(--ui-muted); font-size: 10px; line-height: 1; - background: rgba(252, 252, 251, 0.75); + background: rgb(from var(--ui-bg) r g b / 0.75); padding: 1px 3px; border-radius: 2px; pointer-events: none; @@ -2702,7 +2705,7 @@ button.basemap-panel__link[hidden] { display: none; } } .plugins-panel__item + .plugins-panel__item { - box-shadow: inset 0 1px #e6e6e6; + box-shadow: inset 0 1px var(--ui-line); } .plugins-panel__label { @@ -3328,7 +3331,7 @@ button.basemap-panel__link[hidden] { display: none; } .gpx-tree li + li, .sidebar-flyout__option + .sidebar-flyout__option, .gpx-tree__download-menu-item + .gpx-tree__download-menu-item { - box-shadow: inset 0 1px #e6e6e6; + box-shadow: inset 0 1px var(--ui-line); } .gpx-tree__download-menu-item + .gpx-tree__download-menu-item, @@ -3339,7 +3342,7 @@ button.basemap-panel__link[hidden] { display: none; } .overlays-panel__group { margin: 10px -12px 0; padding: 8px 16px 6px; - background: #f3f3f1; + background: var(--ui-bg-2); border-top: 1px solid var(--ui-line); border-bottom: 1px solid var(--ui-line); } @@ -3560,3 +3563,5 @@ html.driving #map .maplibregl-ctrl-top-left { display: none; } .drive-bar button:disabled { opacity: 0.4; } html.follow-3d .maplibregl-ctrl-overview-map { display: none; } .drive-bar .drive-bar__night { font-size: 30px; } +/* npmap's home button draws its house in #333: the UI's text color instead */ +.feather-home { fill: var(--ui-fg); }