Driving bar after the research: four 76 px buttons (zoom ±, 2D/3D, route overview), one Follow button bottom left shown only while the map isn't following, night and exit off the bar; research on day/night and on driving buttons (Garmin aviation/marine/zūmo, ships' ECDIS/S-Mode, Android Auto) in docs/design.adoc, its follow-ups in TODO
This commit is contained in:
1 parent
9b797fd48c
commit
0eb9d05cdc
5 files changed
+211
-36
No files matched your search
+28
-5
@@ -3544,9 +3544,10 @@ html.driving #map .maplibregl-ctrl-top-left { display: none; }
|
||||
max-height: calc(100% - 24px); /* a low screen: the buttons shrink, to 44 px */
|
||||
}
|
||||
.drive-bar[hidden] { display: none; }
|
||||
.drive-bar button {
|
||||
.drive-bar button,
|
||||
.drive-bar__recenter {
|
||||
width: 76px;
|
||||
flex: 0 1 64px;
|
||||
flex: 0 1 76px;
|
||||
min-height: 44px;
|
||||
border: none;
|
||||
border-radius: 12px;
|
||||
@@ -3557,11 +3558,33 @@ html.driving #map .maplibregl-ctrl-top-left { display: none; }
|
||||
box-shadow: 0 2px 8px rgb(0 0 0 / 0.35);
|
||||
cursor: pointer;
|
||||
}
|
||||
.drive-bar .drive-bar__follow,
|
||||
.drive-bar .drive-bar__overview { font-size: 16px; }
|
||||
.drive-bar button:active { background: var(--accent); }
|
||||
.drive-bar button:active,
|
||||
.drive-bar__recenter:active { background: var(--accent); }
|
||||
/* the one follow / back-to-the-position button, bottom left, only while
|
||||
the map isn't following (driving.js); gnss.js's own one not meanwhile */
|
||||
.drive-bar__recenter {
|
||||
position: absolute;
|
||||
left: 12px;
|
||||
bottom: 36px;
|
||||
z-index: 4;
|
||||
width: auto;
|
||||
height: 76px;
|
||||
padding: 0 22px;
|
||||
border: none;
|
||||
border-radius: 12px;
|
||||
background: var(--band);
|
||||
color: var(--band-fg);
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
box-shadow: 0 2px 8px rgb(0 0 0 / 0.35);
|
||||
cursor: pointer;
|
||||
}
|
||||
.drive-bar__recenter[hidden],
|
||||
html.driving .follow-resume { 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); }
|
||||
:root[data-palette] .drive-bar button,
|
||||
:root[data-palette] .drive-bar__recenter { box-shadow: 0 0 0 1px var(--ui-line), 0 2px 8px rgb(0 0 0 / 0.35); }
|
||||
Reference in new issue
Block a user