From dfd1c383968aeb846c785097632afca3e65a49e4 Mon Sep 17 00:00:00 2001 From: Mischa Date: Fri, 19 Jun 2026 22:59:17 +0200 Subject: [PATCH] feat: add stories listing page and all story/shortcode CSS --- themes/intotheeast/css/style.css | 502 ++++++++++++++++++ .../intotheeast/templates/stories.html.twig | 47 +- 2 files changed, 543 insertions(+), 6 deletions(-) diff --git a/themes/intotheeast/css/style.css b/themes/intotheeast/css/style.css index b89ecfc..3defae1 100644 --- a/themes/intotheeast/css/style.css +++ b/themes/intotheeast/css/style.css @@ -1009,3 +1009,505 @@ body::after { font-size: var(--text-xs); color: var(--color-ink-muted); } + +/* ── Story pages ─────────────────────────────────────────────────────────── */ + +/* Override site-main constraints for story pages */ +.template-story .site-main { max-width: none; padding: 0; } + +/* Floating escape link */ +.story-escape { + position: fixed; + top: calc(var(--site-header-height) + var(--space-4)); + left: var(--space-4); + z-index: 100; + font-family: var(--font-ui); + font-size: var(--text-sm); + font-weight: 500; + color: rgba(255,255,255,0.85); + background: rgba(26,24,20,0.55); + backdrop-filter: blur(6px); + -webkit-backdrop-filter: blur(6px); + border: 1px solid rgba(255,255,255,0.12); + border-radius: var(--radius-full); + padding: var(--space-2) var(--space-4); + text-decoration: none; + transition: background 0.2s; +} +.story-escape:hover { background: rgba(26,24,20,0.8); } + +/* Hero */ +.story-hero { position: relative; } +.story-hero__img-wrap { + position: sticky; + top: 0; + height: 100vh; + width: 100%; + overflow: hidden; +} +.story-hero__img { + width: 100%; + height: 100%; + object-fit: cover; + animation: storyKenBurns 12s ease-out forwards; + transform-origin: center center; +} +@keyframes storyKenBurns { + from { transform: scale(1.06); } + to { transform: scale(1); } +} +@media (prefers-reduced-motion: reduce) { + .story-hero__img { animation: none; } +} +.story-hero__img-placeholder { + width: 100%; + height: 100%; + background: linear-gradient(135deg, #1A1814 0%, #2A2720 100%); +} +.story-hero__overlay { + position: fixed; + inset: 0; + pointer-events: none; + z-index: 1; +} +.story-hero__content { + position: absolute; + bottom: 18%; + left: 0; + width: 100%; + padding: 0 var(--space-8); + text-align: center; + color: #fff; + z-index: 2; +} +.story-hero__title { + font-family: var(--font-display); + font-size: clamp(2.2rem, 6vw, 4.5rem); + font-weight: 900; + line-height: 1.08; + letter-spacing: -0.02em; + margin-bottom: var(--space-3); + text-shadow: 0 2px 20px rgba(0,0,0,0.5); + animation: storyReveal 0.9s cubic-bezier(.16,1,.3,1) 0.2s both; +} +.story-hero__meta { + font-family: var(--font-ui); + font-size: var(--text-base); + opacity: 0.85; + letter-spacing: 0.04em; + text-shadow: 0 1px 6px rgba(0,0,0,0.4); + animation: storyReveal 0.9s cubic-bezier(.16,1,.3,1) 0.55s both; + margin: 0; +} +@keyframes storyReveal { + from { filter: blur(10px); opacity: 0; transform: translateY(22px); } + to { filter: blur(0); opacity: 1; transform: translateY(0); } +} +@media (prefers-reduced-motion: reduce) { + .story-hero__title, .story-hero__meta { animation: none; opacity: 1; filter: none; transform: none; } +} +.story-hero__scroll-cue { + position: absolute; + bottom: var(--space-8); + left: 50%; + transform: translateX(-50%); + color: rgba(255,255,255,0.7); + z-index: 2; + animation: storyCueBounce 2s ease-in-out infinite; + transition: opacity 0.4s; +} +.story-hero__scroll-cue.is-hidden { opacity: 0; pointer-events: none; } +@keyframes storyCueBounce { + 0%, 100% { transform: translateX(-50%) translateY(0); } + 50% { transform: translateX(-50%) translateY(6px); } +} +@media (prefers-reduced-motion: reduce) { + .story-hero__scroll-cue { animation: none; } +} +.story-hero__spacer { height: 40vh; position: relative; z-index: 3; } + +/* Story body */ +.story-body { + max-width: 680px; + margin: 0 auto; + padding: var(--space-16) var(--space-6) var(--space-16); +} +.story-body p { + font-family: var(--font-ui); + font-size: 1.0625rem; + line-height: 1.85; + color: var(--color-ink-2); + margin-bottom: var(--space-6); +} +.story-body h2, .story-body h3 { + font-family: var(--font-display); + color: var(--color-ink); + margin-top: var(--space-10); + margin-bottom: var(--space-4); +} +.story-footer { + margin-top: var(--space-16); + padding-top: var(--space-8); + border-top: 1px solid var(--color-border); +} +.story-footer a { + font-family: var(--font-ui); + font-size: var(--text-sm); + color: var(--color-accent); + text-decoration: none; +} + +/* ── ChapterBreak ─────────────────────────────────────────── */ +.chapter-break { + position: relative; + width: 100vw; + left: 50%; + margin-left: -50vw; + height: 60vh; + min-height: 320px; + overflow: hidden; + display: flex; + align-items: center; + justify-content: center; + margin-top: var(--space-16); + margin-bottom: var(--space-16); +} +.chapter-break__bg { position: absolute; inset: 0; } +.chapter-break__img { width: 100%; height: 100%; object-fit: cover; display: block; } +.chapter-break__tint { + position: absolute; + inset: 0; + background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.6) 100%); +} +.chapter-break__panel { + position: relative; + z-index: 1; + display: flex; + flex-direction: column; + align-items: center; + gap: var(--space-2); + padding: var(--space-10) var(--space-12); + background: rgba(26,24,20,0.25); + backdrop-filter: blur(18px) saturate(1.4); + -webkit-backdrop-filter: blur(18px) saturate(1.4); + border: 1px solid rgba(255,255,255,0.12); + border-radius: var(--radius-sm); + max-width: 520px; + width: 90%; + text-align: center; + opacity: 0; + filter: blur(12px); + transform: translateY(28px); + transition: opacity 0.9s cubic-bezier(.16,1,.3,1), filter 0.9s cubic-bezier(.16,1,.3,1), transform 0.9s cubic-bezier(.16,1,.3,1); +} +.chapter-break__panel.is-revealed { opacity: 1; filter: blur(0); transform: translateY(0); } +@media (prefers-reduced-motion: reduce) { + .chapter-break__panel { opacity: 1 !important; filter: none !important; transform: none !important; transition: none !important; } +} +.chapter-break__number { + font-family: var(--font-ui); + font-size: var(--text-xs); + font-weight: 600; + letter-spacing: 0.22em; + text-transform: uppercase; + color: rgba(255,255,255,0.6); +} +.chapter-break__title { + font-family: var(--font-display); + font-size: clamp(1.6rem, 4vw, 2.6rem); + font-weight: 700; + line-height: 1.15; + color: #fff; + text-shadow: 0 2px 16px rgba(0,0,0,0.4); + margin: 0; +} +.chapter-break__rule { + width: 40px; + height: 2px; + background: var(--color-accent); + border-radius: 1px; + margin-top: var(--space-2); +} + +/* ── ScrollySection ───────────────────────────────────────── */ +.scrolly { + position: relative; + display: grid; + grid-template-columns: 55% 45%; + width: 100vw; + left: 50%; + margin-left: -50vw; + margin-top: var(--space-16); + margin-bottom: var(--space-16); + align-items: start; +} +.scrolly__media { + position: sticky; + top: var(--site-header-height); + height: calc(100vh - var(--site-header-height)); + overflow: hidden; +} +.scrolly__media-inner { position: relative; width: 100%; height: 100%; } +.scrolly__img { + width: 100%; + height: 100%; + object-fit: cover; + object-position: 50% 50%; + display: block; + will-change: filter, object-position; + transition: filter 0.6s cubic-bezier(.16,1,.3,1), object-position 1.2s cubic-bezier(.16,1,.3,1); +} +.scrolly .scrolly__img { margin: 0; border-radius: 0; max-width: none; } +.scrolly__img-overlay { + position: absolute; + inset: 0; + background: rgba(0,0,0,0); + transition: background 0.6s ease; + pointer-events: none; +} +.scrolly__caption { + position: absolute; + bottom: var(--space-4); + left: var(--space-4); + right: var(--space-4); + font-family: var(--font-ui); + font-size: var(--text-xs); + color: rgba(255,255,255,0.65); + text-align: center; + pointer-events: none; + margin: 0; +} +.scrolly__steps-content { display: none; } +.scrolly-step { min-height: 60vh; display: flex; align-items: center; padding: var(--space-16) var(--space-8); } +.scrolly-step__inner { + background: rgba(26,24,20,0.92); + backdrop-filter: blur(4px); + -webkit-backdrop-filter: blur(4px); + border: 1px solid var(--color-border); + border-radius: var(--radius-sm); + padding: var(--space-8) var(--space-8); + opacity: 0; + transform: translateY(20px); + transition: opacity 0.55s cubic-bezier(.16,1,.3,1), transform 0.55s cubic-bezier(.16,1,.3,1); +} +.scrolly-step.is-active .scrolly-step__inner { opacity: 1; transform: translateY(0); } +@media (prefers-reduced-motion: reduce) { + .scrolly-step__inner { opacity: 1 !important; transform: none !important; transition: none !important; } +} +.scrolly-step__inner p { + font-family: var(--font-ui); + font-size: 1.05rem; + line-height: 1.8; + color: var(--color-ink-2); + margin-bottom: var(--space-3); +} +.scrolly-step__inner p:last-child { margin-bottom: 0; } +.scrolly-step:last-child { padding-bottom: 50vh; } +@media (max-width: 768px), (pointer: coarse) { + .scrolly { display: block; } + .scrolly__steps { margin-top: calc(-(100vh - var(--site-header-height))); position: relative; z-index: 1; } + .scrolly-step { min-height: 80vh; padding: var(--space-8) var(--space-6); align-items: center; justify-content: center; } + .scrolly-step:last-child { padding-bottom: 50vh; } +} + +/* ── PullQuote ────────────────────────────────────────────── */ +.pull-quote { + position: relative; + width: calc(100% + 3rem); + margin-left: -1.5rem; + margin-right: -1.5rem; + margin-top: var(--space-12); + margin-bottom: var(--space-12); + overflow: hidden; + border-radius: var(--radius-sm); + border: none; + background: transparent; + padding: 0; + opacity: 0; + filter: blur(6px); + transform: translateY(24px); + transition: opacity 0.85s cubic-bezier(.16,1,.3,1), filter 0.85s cubic-bezier(.16,1,.3,1), transform 0.85s cubic-bezier(.16,1,.3,1); +} +.pull-quote.is-revealed { opacity: 1; filter: blur(0); transform: translateY(0); } +@media (prefers-reduced-motion: reduce) { + .pull-quote { opacity: 1 !important; filter: none !important; transform: none !important; transition: none !important; } +} +.pull-quote__bg { position: absolute; inset: 0; z-index: 0; } +.pull-quote__bg-img { width: 100%; height: 100%; object-fit: cover; display: block; } +.pull-quote__bg-tint { position: absolute; inset: 0; background: rgba(0,0,0,0.55); } +.pull-quote__inner { + position: relative; + z-index: 1; + display: flex; + flex-direction: column; + align-items: center; + padding: var(--space-10) var(--space-8); + backdrop-filter: blur(14px) saturate(1.3); + -webkit-backdrop-filter: blur(14px) saturate(1.3); + background: rgba(26,24,20,0.08); + text-align: center; +} +.pull-quote__inner--no-image { + background: var(--color-canvas); + backdrop-filter: none; + -webkit-backdrop-filter: none; +} +.pull-quote__mark { + font-family: var(--font-display); + font-size: 5rem; + line-height: 0.8; + color: var(--color-accent); + opacity: 0.4; + display: block; +} +.pull-quote__mark--close { margin-top: var(--space-2); } +.pull-quote__text { + font-family: var(--font-display); + font-size: clamp(1.2rem, 3vw, 1.6rem); + font-style: italic; + color: #fff; + line-height: 1.5; + margin: var(--space-4) 0; +} +.pull-quote__inner--no-image .pull-quote__text { color: var(--color-ink); } + +/* ── SnapGallery ──────────────────────────────────────────── */ +.pgallery { + width: 100vw; + left: 50%; + margin-left: -50vw; + position: relative; + margin-top: var(--space-16); + margin-bottom: var(--space-16); +} +.pgallery__frame { + position: relative; + height: 100vh; + overflow-y: scroll; + scroll-snap-type: y mandatory; + -webkit-overflow-scrolling: touch; +} +.pgallery__slide { + position: relative; + height: 100vh; + display: flex; + align-items: center; + justify-content: center; + scroll-snap-align: start; + scroll-snap-stop: always; +} +.pgallery__bg { + position: absolute; + inset: 0; + width: 100%; + height: 100%; + object-fit: cover; + filter: blur(20px) brightness(0.4); + transform: scale(1.05); +} +.pgallery__fg { + position: relative; + z-index: 1; + max-height: 90vh; + max-width: 90vw; + object-fit: contain; +} +.pgallery__caption { + position: absolute; + bottom: var(--space-8); + left: 0; + right: 0; + z-index: 2; + text-align: center; + font-family: var(--font-ui); + font-size: var(--text-sm); + color: rgba(255,255,255,0.8); + margin: 0; + padding: 0 var(--space-8); +} +.pgallery__dots { + position: absolute; + right: var(--space-4); + top: 50%; + transform: translateY(-50%); + z-index: 3; + display: flex; + flex-direction: column; + gap: var(--space-2); +} +.pgallery__dot { + width: 6px; + height: 6px; + border-radius: 50%; + background: rgba(255,255,255,0.35); + transition: background 0.25s; + display: block; +} +.pgallery__dot.is-active { background: var(--color-accent); } + +/* ── Stories listing ──────────────────────────────────────── */ +.stories-listing { padding: var(--space-10) 0; } +.stories-listing__heading { + font-family: var(--font-display); + font-size: var(--text-2xl); + font-weight: 400; + color: var(--color-ink); + margin-bottom: var(--space-10); +} +.stories-grid { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: var(--space-8); +} +@media (max-width: 640px) { .stories-grid { grid-template-columns: 1fr; } } +.story-card { + text-decoration: none; + color: inherit; + display: flex; + flex-direction: column; + border-radius: var(--radius-md); + overflow: hidden; + background: var(--color-canvas); + border: 1px solid var(--color-border); + transition: box-shadow 0.2s; +} +.story-card:hover { box-shadow: var(--shadow-md); } +.story-card__photo { aspect-ratio: 16/9; overflow: hidden; } +.story-card__photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; } +.story-card:hover .story-card__photo img { transform: scale(1.03); } +.story-card__photo--empty { background: var(--color-surface-raised); } +.story-card__body { padding: var(--space-5); } +.story-card__date { + display: block; + font-family: var(--font-ui); + font-size: var(--text-xs); + color: var(--color-ink-muted); + text-transform: uppercase; + letter-spacing: 0.06em; + margin-bottom: var(--space-1); +} +.story-card__location { + display: block; + font-family: var(--font-ui); + font-size: var(--text-xs); + color: var(--color-ink-muted); + margin-bottom: var(--space-3); +} +.story-card__title { + font-family: var(--font-display); + font-size: var(--text-lg); + font-weight: 400; + color: var(--color-ink); + margin-bottom: var(--space-3); + line-height: var(--leading-snug); +} +.story-card__cta { + font-family: var(--font-ui); + font-size: var(--text-sm); + color: var(--color-accent); +} +.stories-empty { + font-family: var(--font-ui); + color: var(--color-ink-muted); + font-style: italic; +} diff --git a/themes/intotheeast/templates/stories.html.twig b/themes/intotheeast/templates/stories.html.twig index 80fa2a8..b6953d8 100644 --- a/themes/intotheeast/templates/stories.html.twig +++ b/themes/intotheeast/templates/stories.html.twig @@ -1,10 +1,45 @@ {% extends 'partials/base.html.twig' %} -{% block nav %} -← Back -{% endblock %} - {% block content %} -

{{ page.title }}

-

Stories coming soon.

+{% set stories = page.children.published().order('date', 'asc') %} + +
+

Stories

+ + {% if stories|length > 0 %} +
+ {% for story in stories %} + {% set hero = null %} + {% if story.header.hero_image and story.media[story.header.hero_image] is defined %} + {% set hero = story.media[story.header.hero_image] %} + {% endif %} + + {% set date_str = story.date|date('d M Y') %} + {% if story.header.end_date %} + {% set date_str = story.date|date('d M') ~ '–' ~ story.header.end_date|date('d M Y') %} + {% endif %} + + + {% if hero %} +
+ {{ story.title }} +
+ {% else %} +
+ {% endif %} +
+ + {% if story.header.location_name %} + 📍 {{ story.header.location_name }}{% if story.header.location_country %}, {{ story.header.location_country }}{% endif %} + {% endif %} +

{{ story.title }}

+ Read story → +
+
+ {% endfor %} +
+ {% else %} +

No stories yet — check back soon.

+ {% endif %} +
{% endblock %}