-
-
- {% set images = entry.media.images %}
- {% if images|length > 0 %}
- {% set firstImg = images|first %}
- {% set wrapRatio = firstImg.height > firstImg.width ? '4 / 5' : '4 / 3' %}
-
-
- {% for img in images %}
-
-
-
- {% endfor %}
-
- {% if images|length > 1 %}
-
- {% for img in images %}
-
- {% endfor %}
-
- {% endif %}
-
-
- {% endif %}
-
- {{ entry.content|raw }}
-
+ {% include 'partials/entry-journal.html.twig' %}
{% else %}
- {% set hero = null %}
- {% if entry.header.hero_image and entry.media[entry.header.hero_image] is defined %}
- {% set hero = entry.media[entry.header.hero_image] %}
- {% elseif entry.media.images|length > 0 %}
- {% set hero = entry.media.images|first %}
- {% endif %}
-
- {% if hero %}
-
-
.url }})
-
- {% endif %}
-
- ✦ Story
-
{{ entry.title }}
-
-
+ {% include 'partials/entry-story.html.twig' %}
{% endif %}
{% endfor %}
{% else %}
diff --git a/themes/intotheeast/templates/home.html.twig b/themes/intotheeast/templates/home.html.twig
index f24f343..9614745 100644
--- a/themes/intotheeast/templates/home.html.twig
+++ b/themes/intotheeast/templates/home.html.twig
@@ -1,6 +1,7 @@
{% extends 'partials/base.html.twig' %}
{% block content %}
+
-
-
- {% set images = entry.media.images %}
- {% if images|length > 0 %}
-
- {% for img in images %}
-
-
.url }})
-
- {% endfor %}
-
- {% if images|length > 1 %}
-
- {% for img in images %}
-
- {% endfor %}
-
- {% endif %}
- {% endif %}
-
- {{ entry.content|raw }}
-
+ {% include 'partials/entry-journal.html.twig' %}
{% else %}
- {% set hero = null %}
- {% if entry.header.hero_image and entry.media[entry.header.hero_image] is defined %}
- {% set hero = entry.media[entry.header.hero_image] %}
- {% elseif entry.media.images|length > 0 %}
- {% set hero = entry.media.images|first %}
- {% endif %}
-
- {% if hero %}
-
-
.url }})
-
- {% endif %}
-
- ✦ Story
-
{{ entry.title }}
-
-
+ {% include 'partials/entry-story.html.twig' %}
{% endif %}
{% endfor %}
{% else %}
@@ -180,7 +118,8 @@ homeMap.on('load', function () {
el.addEventListener('mouseleave', function () { popup.remove(); });
el.addEventListener('click', function () {
var card = document.getElementById('entry-' + entry.slug);
- if (card) card.scrollIntoView({ behavior: 'smooth', block: 'center' });
+ if (!card) return;
+ window.location.hash = 'entry-' + entry.slug;
});
new maplibregl.Marker({ element: el }).setLngLat(lngLat).addTo(homeMap);
@@ -199,6 +138,41 @@ homeMap.on('load', function () {
{% endif %}
+
+
{% else %}
{# ══════════════════════════════════════════════════════ BETWEEN-TRIPS MODE #}
diff --git a/themes/intotheeast/templates/partials/entry-journal.html.twig b/themes/intotheeast/templates/partials/entry-journal.html.twig
new file mode 100644
index 0000000..980766c
--- /dev/null
+++ b/themes/intotheeast/templates/partials/entry-journal.html.twig
@@ -0,0 +1,59 @@
+{% set weather_icons = {
+ 'Sunny': '☀️', 'Partly cloudy': '⛅', 'Cloudy': '☁️',
+ 'Foggy': '🌫️', 'Drizzle': '🌦️', 'Rain': '🌧️',
+ 'Snow': '❄️', 'Thunderstorm': '⛈️'
+} %}
+
+
+
+ {% set images = entry.media.images %}
+ {% if images|length > 0 %}
+ {% set firstImg = images|first %}
+ {% set wrapRatio = firstImg.height > firstImg.width ? '4 / 5' : '4 / 3' %}
+
+
+ {% for img in images %}
+
+
+
+ {% endfor %}
+
+ {% if images|length > 1 %}
+
+ {% for img in images %}
+
+ {% endfor %}
+
+ {% endif %}
+
+
+ {% endif %}
+
+ {{ entry.content|raw }}
+
diff --git a/themes/intotheeast/templates/partials/entry-story.html.twig b/themes/intotheeast/templates/partials/entry-story.html.twig
new file mode 100644
index 0000000..dee014f
--- /dev/null
+++ b/themes/intotheeast/templates/partials/entry-story.html.twig
@@ -0,0 +1,17 @@
+{% set hero = null %}
+{% if entry.header.hero_image and entry.media[entry.header.hero_image] is defined %}
+ {% set hero = entry.media[entry.header.hero_image] %}
+{% elseif entry.media.images|length > 0 %}
+ {% set hero = entry.media.images|first %}
+{% endif %}
+
+ {% if hero %}
+
+
.url }})
+
+ {% endif %}
+
+ ✦ Story
+
{{ entry.title }}
+
+
diff --git a/themes/intotheeast/templates/trip.html.twig b/themes/intotheeast/templates/trip.html.twig
index 93d79a6..4f38710 100644
--- a/themes/intotheeast/templates/trip.html.twig
+++ b/themes/intotheeast/templates/trip.html.twig
@@ -216,85 +216,10 @@
{% if all_items|length > 0 %}
{% for item in all_items %}
{% set entry = item.page %}
-
{% if item.type == 'journal' %}
- {% set weather_icons = {
- 'Sunny': '☀️', 'Partly cloudy': '⛅', 'Cloudy': '☁️',
- 'Foggy': '🌫️', 'Drizzle': '🌦️', 'Rain': '🌧️',
- 'Snow': '❄️', 'Thunderstorm': '⛈️'
- } %}
-
-
-
- {% set images = entry.media.images %}
- {% if images|length > 0 %}
- {% set firstImg = images|first %}
- {% set wrapRatio = firstImg.height > firstImg.width ? '4 / 5' : '4 / 3' %}
-
-
- {% for img in images %}
-
-
-
- {% endfor %}
-
- {% if images|length > 1 %}
-
- {% for img in images %}
-
- {% endfor %}
-
- {% endif %}
-
-
- {% endif %}
-
- {{ entry.content|raw }}
-
+ {% include 'partials/entry-journal.html.twig' %}
{% else %}
- {% set hero = null %}
- {% if entry.header.hero_image and entry.media[entry.header.hero_image] is defined %}
- {% set hero = entry.media[entry.header.hero_image] %}
- {% elseif entry.media.images|length > 0 %}
- {% set hero = entry.media.images|first %}
- {% endif %}
-
- {% if hero %}
-
-
.url }})
-
- {% endif %}
-
- ✦ Story
-
{{ entry.title }}
-
-
+ {% include 'partials/entry-story.html.twig' %}
{% endif %}
{% endfor %}
{% else %}