From 989755d33cfa06c6c7debcc7d8532e32088ecf42 Mon Sep 17 00:00:00 2001 From: Mischa Date: Sun, 21 Jun 2026 23:44:09 +0200 Subject: [PATCH] feat(map): mobile fullscreen button for feed mini-map MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Button in the bottom-right corner of the map, hidden ≥769px. Clicking it toggles .is-fullscreen on .feed-map-wrap (position:fixed, full viewport), locks body scroll, and calls feedMap.resize() so MapLibre re-renders at the new size. Icon swaps between expand SVG and ✕. Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_01Vgmzx8VTTTmCskSpQtsLTr --- themes/intotheeast/css/style.css | 46 +++++++++++++++++++ .../intotheeast/templates/dailies.html.twig | 22 ++++++++- 2 files changed, 67 insertions(+), 1 deletion(-) diff --git a/themes/intotheeast/css/style.css b/themes/intotheeast/css/style.css index 2300bd5..8aa1aa4 100644 --- a/themes/intotheeast/css/style.css +++ b/themes/intotheeast/css/style.css @@ -653,6 +653,7 @@ body::after { } .feed-map { + position: relative; height: 240px; width: 100%; } @@ -661,6 +662,51 @@ body::after { .feed-map { height: 300px; } } +.feed-map-fullscreen-btn { + position: absolute; + bottom: var(--space-2); + right: var(--space-2); + width: 2rem; + height: 2rem; + background: rgba(255, 255, 255, 0.9); + border: none; + border-radius: var(--radius-sm); + color: var(--color-ink); + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + z-index: 20; + box-shadow: var(--shadow-sm); + transition: background 0.15s; +} + +.feed-map-fullscreen-btn:hover { background: rgba(255, 255, 255, 1); } + +.feed-map-fs-close { display: none; font-size: 1rem; line-height: 1; } + +@media (min-width: 769px) { + .feed-map-fullscreen-btn { display: none; } +} + +.feed-map-wrap.is-fullscreen { + position: fixed; + inset: 0; + z-index: 9999; + margin: 0; + border-radius: 0; + border: none; +} + +.feed-map-wrap.is-fullscreen .feed-map { + height: 100dvh; +} + +.feed-map-wrap.is-fullscreen .feed-map-link { display: none; } + +.feed-map-wrap.is-fullscreen .feed-map-fs-open { display: none; } +.feed-map-wrap.is-fullscreen .feed-map-fs-close { display: block; } + .feed-map-link { display: block; text-align: right; diff --git a/themes/intotheeast/templates/dailies.html.twig b/themes/intotheeast/templates/dailies.html.twig index 8834324..2dd9f19 100644 --- a/themes/intotheeast/templates/dailies.html.twig +++ b/themes/intotheeast/templates/dailies.html.twig @@ -37,7 +37,14 @@ {% if map_entries|length > 0 %}
-
+
+ +
View full map →
@@ -86,6 +93,19 @@ feedMap.on('load', function () { MapUtils.addJourneySegments(feedMap, segments, 'feed-journey'); }); + {% endif %}