Add a Locus Pro-style toolbar readout: DMS coords + sunrise/sunset
The topbar's coordinate display was plain decimal degrees ("48.14611,
17.17722") — switched to DMS (48°08'46"N 17°10'38"E), the more
GPS-unit-like format Locus Pro itself uses, and made it click-to-copy
(plain decimal, since that's what pastes cleanly into another map/GPS
app — not the DMS text actually shown).
Added sunrise/sunset + a countdown to whichever's next, for the same
map-center point the coordinates already describe. Vendored SunCalc
(BSD-2-Clause, github.com/mourner/suncalc) rather than hand-rolling
the astronomical math — small, dependency-free, and correctness here
has real pitfalls (equation of time, refraction, polar day/night) a
first-pass reimplementation would risk getting subtly wrong.
Also added a test asserting every public/js/*.js module has a
versioned importmap entry in layout.erb — caught that overlays.js
(from the previous commit) was missing one, which would have quietly
skipped ASSET_VERSION's cache-busting for that file after every
deploy.
This commit is contained in:
1 parent
c5b4a9ffb2
commit
dce5fd87da
8 files changed
+696
-3
No files matched your search
+20
-1
@@ -27,13 +27,32 @@ html, body {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.topbar__coords {
|
||||
.topbar__center {
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
.topbar__coords,
|
||||
.topbar__sun {
|
||||
font-size: 12px;
|
||||
font-variant-numeric: tabular-nums;
|
||||
color: #bbb;
|
||||
}
|
||||
|
||||
.topbar__coords {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.topbar__coords:hover {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.topbar__sun[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.topbar__offline-status {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
|
||||
Reference in new issue
Block a user