From 320a98893a7f9a763e46cd24a3e11025e797b3d7 Mon Sep 17 00:00:00 2001 From: Mischa Date: Mon, 22 Jun 2026 01:33:26 +0200 Subject: [PATCH] feat: add shared feed-map partial (dailies + stories) --- .../templates/partials/feed-map.html.twig | 117 ++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 themes/intotheeast/templates/partials/feed-map.html.twig diff --git a/themes/intotheeast/templates/partials/feed-map.html.twig b/themes/intotheeast/templates/partials/feed-map.html.twig new file mode 100644 index 0000000..a64452a --- /dev/null +++ b/themes/intotheeast/templates/partials/feed-map.html.twig @@ -0,0 +1,117 @@ +{# + Feed mini-map partial — shared by dailies.html.twig and stories.html.twig. + + Required variables (via {% include ... with {...} only %}): + map_entries — array: [{lat, lng, title, slug, url, type, force_connect, transport_mode}] + map_id — string: HTML id for the map div (e.g. 'feed-map', 'stories-map') + map_var — string: JS variable name for the MapLibre Map (e.g. 'feedMap', 'storiesMap') + link_href — string|null: URL for "View full map" link; null/empty hides the link + card_prefix — string: prefix for scroll-to card IDs ('entry-' or 'story-') + trip_page — Grav page: trip page for autoconnect setting (used when show_journey is true) + show_journey — bool: whether to draw the route connector line between markers +#} +{% if map_entries|length > 0 %} +
+
+ +
+ {% if link_href %} + View full map → + {% endif %} +
+ + + + + + +{% endif %}