fix(map): collapse attribution on load; darken fullscreen button
Attribution: MapLibre v4 uses <details> and may open it after load regardless of compact:true — remove the open attribute in the load handler to guarantee collapsed state. Button: switch from teal to --color-canvas (#22201B) so it sits quietly against the dark map; icon reads in --color-ink (warm cream). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vgmzx8VTTTmCskSpQtsLTr
This commit is contained in:
@@ -669,10 +669,10 @@ body::after {
|
||||
right: var(--space-2);
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
background: var(--color-accent);
|
||||
background: var(--color-canvas);
|
||||
border: none;
|
||||
border-radius: var(--radius-sm);
|
||||
color: var(--color-accent-on);
|
||||
color: var(--color-ink);
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -682,7 +682,7 @@ body::after {
|
||||
transition: background 0.15s;
|
||||
}
|
||||
|
||||
.feed-map-fullscreen-btn:hover { background: var(--color-accent-hover); }
|
||||
.feed-map-fullscreen-btn:hover { background: var(--color-paper); }
|
||||
|
||||
.feed-map-fs-close { display: none; font-size: 1rem; line-height: 1; }
|
||||
|
||||
|
||||
@@ -306,6 +306,10 @@ tripMap.on('load', function () {
|
||||
|
||||
/* ── GPX tracks + journey segments ─────────────────────────── */
|
||||
MapUtils.renderGpxJourney(tripMap, USE_GPX ? GPX_URLS : [], TRIP_ENTRIES, 'gpx', 'trip-journey', { connectMode: AUTOCONNECT });
|
||||
|
||||
// Collapse attribution <details> which MapLibre may open on load
|
||||
var attrib = tripMap.getContainer().querySelector('.maplibregl-ctrl-attrib');
|
||||
if (attrib) attrib.removeAttribute('open');
|
||||
});
|
||||
setTimeout(function () { tripMap.resize(); }, 100);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user