From bc67a0ee88c421ed8902ca1f15c7f2c02d9bd0d9 Mon Sep 17 00:00:00 2001 From: Mischa Date: Sat, 20 Jun 2026 11:45:38 +0200 Subject: [PATCH] fix(story): add end_date blueprint field; fix date range display MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Blueprint: renamed 'Date' to 'Start Date', added optional 'End Date' field (header.end_date) so it's editable in Admin. Template: single date → 'd M Y'; range → 'd M Y – d M Y' (full year on both sides — the old format silently dropped the start year). Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_01Vgmzx8VTTTmCskSpQtsLTr --- themes/intotheeast/blueprints/story.yaml | 8 +++++++- themes/intotheeast/templates/story.html.twig | 3 +-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/themes/intotheeast/blueprints/story.yaml b/themes/intotheeast/blueprints/story.yaml index c690001..770b86b 100644 --- a/themes/intotheeast/blueprints/story.yaml +++ b/themes/intotheeast/blueprints/story.yaml @@ -19,11 +19,17 @@ form: header.date: type: datetime - label: Date + label: Start Date format: 'Y-m-d H:i' validate: required: true + header.end_date: + type: datetime + label: End Date + format: 'Y-m-d H:i' + help: 'Optional — leave blank for a single-day story' + header.hero_image: type: text label: Hero Image diff --git a/themes/intotheeast/templates/story.html.twig b/themes/intotheeast/templates/story.html.twig index 06b5a43..9ea650f 100644 --- a/themes/intotheeast/templates/story.html.twig +++ b/themes/intotheeast/templates/story.html.twig @@ -13,8 +13,7 @@ {% set date_str = page.date|date('d M Y') %} {% if page.header.end_date %} - {% set end_str = page.header.end_date|date('d M Y') %} - {% set date_str = page.date|date('d M') ~ '–' ~ end_str %} + {% set date_str = page.date|date('d M Y') ~ ' – ' ~ page.header.end_date|date('d M Y') %} {% endif %} {% set location = page.header.location_name ?? '' %}