From 790c3deb266814c4b1ac3e2136d02ba42e06fcac Mon Sep 17 00:00:00 2001 From: Mischa Date: Thu, 9 Jul 2026 20:20:20 +0200 Subject: [PATCH] fix(theme): hide the map fullscreen button when the map never initialises MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The entry-map partial always rendered .feed-map-fullscreen-btn, but the MapLibre init AND the button's click wiring only run when entries exist — so on the home pre-departure state (active trip, no published posts) mobile showed a dead button floating over an empty 40vh map area. Gate the button on the same entries|length condition as the init script; it reappears with the first published post, exactly when it becomes functional. Covers any zero-entry trip page too (shared partial). Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_0195b3cDdMeize2Mm1FgC2aU --- themes/intotheeast/templates/partials/entry-map.html.twig | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/themes/intotheeast/templates/partials/entry-map.html.twig b/themes/intotheeast/templates/partials/entry-map.html.twig index 57a97df..651c577 100644 --- a/themes/intotheeast/templates/partials/entry-map.html.twig +++ b/themes/intotheeast/templates/partials/entry-map.html.twig @@ -23,12 +23,18 @@ #}
+ {# Same gate as the init script below: without entries the map never + initialises and nothing wires the button's click handler, so on + mobile (the only viewport where it shows) it would float as a dead + control over an empty map area (home pre-departure state). #} + {% if entries|length > 0 %} + {% endif %}