From fa1d77f44411e4d2e9a55b99c53253bde96a7e16 Mon Sep 17 00:00:00 2001 From: Mischa Date: Sat, 27 Jun 2026 20:33:54 +0200 Subject: [PATCH] feat(theme): home-active reuses trip-feed-col partial with stats + pre-departure state Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01BftDn9vu9SonFAY4vxu4uk --- themes/intotheeast/templates/home.html.twig | 43 +++++++++------------ 1 file changed, 19 insertions(+), 24 deletions(-) diff --git a/themes/intotheeast/templates/home.html.twig b/themes/intotheeast/templates/home.html.twig index 7498ece..e85aba9 100644 --- a/themes/intotheeast/templates/home.html.twig +++ b/themes/intotheeast/templates/home.html.twig @@ -29,6 +29,13 @@ {% set journal_count = journal_entries|length %} {% set story_count = story_entries|length %} +{% set gps_points = [] %} +{% for entry in journal_entries %} + {% if entry.header.lat is not empty and entry.header.lng is not empty %} + {% set gps_points = gps_points|merge([[entry.header.lat, entry.header.lng]]) %} + {% endif %} +{% endfor %} + {% set map_entries = [] %} {% for item in all_items %} {% if item.type == 'journal' and item.page.header.lat is not empty and item.page.header.lng is not empty %} @@ -57,30 +64,18 @@
-
-
-

{{ trip ? trip.title : trip_route }}

- - {{ journal_count }} journal {{ journal_count == 1 ? 'entry' : 'entries' }} - {% if story_count > 0 %} ยท {{ story_count }} {{ story_count == 1 ? 'story' : 'stories' }}{% endif %} - -
- -
- {% if all_items|length > 0 %} - {% for item in all_items %} - {% set entry = item.page %} - {% if item.type == 'journal' %} - {% include 'partials/entry-journal.html.twig' %} - {% else %} - {% include 'partials/entry-story.html.twig' %} - {% endif %} - {% endfor %} - {% else %} -

No entries yet. The journey is about to begin.

- {% endif %} -
-
+ {% include 'partials/trip-feed-col.html.twig' with { + trip_page: trip, + all_items: all_items, + journal_entries: journal_entries, + journal_count: journal_count, + story_count: story_count, + has_gpx: home_gpx_urls|length > 0, + gpx_urls: home_gpx_urls, + gps_points: gps_points, + show_sort: false, + pre_departure: all_items|length == 0 + } only %} {% if map_entries|length > 0 %}