From 3379e50503c853d121b4596c8ba91e07dcabaea3 Mon Sep 17 00:00:00 2001 From: Mischa Date: Sun, 21 Jun 2026 19:39:33 +0200 Subject: [PATCH] fix(dailies): fix PhotoSwipe CSS loading + restore expand button MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move PhotoSwipe CSS from per-entry assets.addCss() (runs after head is committed) to a single tag at block start. Restore the expand button as the reliable mobile tap target — it dispatches a synthetic click on the visible slide, which bubbles to PhotoSwipe's gallery handler. Merge dot sync into the single module script. Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_01Vgmzx8VTTTmCskSpQtsLTr --- themes/intotheeast/css/style.css | 21 ++++++++ .../intotheeast/templates/dailies.html.twig | 52 +++++++++++-------- 2 files changed, 51 insertions(+), 22 deletions(-) diff --git a/themes/intotheeast/css/style.css b/themes/intotheeast/css/style.css index 57b056a..223a7be 100644 --- a/themes/intotheeast/css/style.css +++ b/themes/intotheeast/css/style.css @@ -234,6 +234,27 @@ body::after { display: block; } +.journal-photo-expand { + position: absolute; + bottom: var(--space-3); + right: var(--space-3); + width: 32px; + height: 32px; + background: rgba(0,0,0,0.45); + border: none; + border-radius: 50%; + color: #fff; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + padding: 0; + z-index: 2; + -webkit-tap-highlight-color: transparent; +} + +.journal-photo-expand:active { background: rgba(0,0,0,0.7); } + .journal-photo-dots { display: flex; justify-content: center; diff --git a/themes/intotheeast/templates/dailies.html.twig b/themes/intotheeast/templates/dailies.html.twig index 3e547b1..78a5fe0 100644 --- a/themes/intotheeast/templates/dailies.html.twig +++ b/themes/intotheeast/templates/dailies.html.twig @@ -1,6 +1,7 @@ {% extends 'default.html.twig' %} {% block content %} + {% set journal_entries = page.collection() %} {% set stories_page = grav.pages.find(page.parent().route ~ '/stories') %} {% set story_entries = stories_page ? stories_page.children.published() : [] %} @@ -121,7 +122,6 @@ feedMap.on('load', function () { {% set images = entry.media.images %} {% if images|length > 0 %} - {% do assets.addCss('https://cdn.jsdelivr.net/npm/photoswipe@5/dist/photoswipe.css') %}
+
{% if images|length > 1 %}