Design Stufe 2: Tipp-Karten zum Umdrehen, Sommer/Winter-Vergleich, Galerie mit weichem Vergroessern
Deploy FeWo mit PipelineManager / deploy (push) Successful in 3m45s
Deploy FeWo mit PipelineManager / deploy (push) Successful in 3m45s
- Baustein "Ausflugstipps" (tips): Karten mit Foto vorne, Tipp/Weg/beste Zeit hinten; Seebad als Ansichtskarten - Baustein "Sommer/Winter-Vergleich" (compare): Trennlinie ziehen, Tastatur ueber Range-Input, einmaliger Hinweis-Schwenk - Lightbox: Foto waechst aus der Vorschau, Blaettern (Pfeile, Tasten, Wischen), Zaehler, Bildunterschrift; partials/lightbox - Bewegung reduzieren: Ueberblenden statt Drehen, kein Schwenk, keine Zoom-Animation Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c8bb0f6e97
commit
4c9e6992f4
20 files changed
+785
-43
No files matched your search
@@ -0,0 +1,27 @@
|
||||
{{--
|
||||
Contract: $eyebrow, $heading, $text, $first, $second (Photo|null – renders nothing without both), $firstLabel, $secondLabel.
|
||||
theme.js: [data-compare] box with the second photo underneath, [data-compare-first] (first photo, clipped at --split),
|
||||
[data-compare-handle] (the line) and [data-compare-range] (range input 0–100, hidden without JavaScript).
|
||||
--}}
|
||||
@if ($first && $second)
|
||||
<section class="mx-auto max-w-6xl px-4 py-16 sm:px-8" @if ($heading) aria-labelledby="{{ $sectionId }}-title" @else aria-label="{{ $firstLabel }} und {{ $secondLabel }}" @endif>
|
||||
@if ($eyebrow)<p class="eyebrow">{{ $eyebrow }}</p>@endif
|
||||
@if ($heading)<h2 id="{{ $sectionId }}-title" class="heading-display">{{ $heading }}</h2>@endif
|
||||
@if ($text)<p class="mt-4 max-w-[60ch] text-muted">{{ $text }}</p>@endif
|
||||
|
||||
<div data-compare class="mt-8 aspect-[3/2] cursor-ew-resize overflow-hidden rounded bg-surface">
|
||||
@include('theme::partials.image', ['photo' => $second, 'sizes' => '(min-width: 1152px) 72rem, 100vw', 'class' => 'absolute inset-0 h-full w-full object-cover'])
|
||||
<div data-compare-first>
|
||||
@include('theme::partials.image', ['photo' => $first, 'sizes' => '(min-width: 1152px) 72rem, 100vw', 'class' => 'h-full w-full object-cover'])
|
||||
</div>
|
||||
<span class="absolute top-4 left-4 rounded-full bg-ink/75 px-4 py-1.5 font-semibold text-ground">{{ $firstLabel }}</span>
|
||||
<span class="absolute top-4 right-4 rounded-full bg-ink/75 px-4 py-1.5 font-semibold text-ground">{{ $secondLabel }}</span>
|
||||
<div data-compare-handle class="w-1 bg-ground" aria-hidden="true">
|
||||
<span class="absolute top-1/2 left-1/2 flex size-12 -translate-1/2 items-center justify-center rounded-full bg-ground text-ink shadow-lg">
|
||||
<x-heroicon-o-arrows-right-left class="size-6" />
|
||||
</span>
|
||||
</div>
|
||||
<input type="range" min="0" max="100" value="50" hidden data-compare-range class="sr-only" aria-label="Trennlinie zwischen {{ $firstLabel }} und {{ $secondLabel }} verschieben">
|
||||
</div>
|
||||
</section>
|
||||
@endif
|
||||
@@ -4,7 +4,7 @@
|
||||
<ul class="grid grid-cols-2 gap-3 sm:gap-4 lg:grid-cols-4">
|
||||
@foreach ($photos as $index => $photo)
|
||||
<li @class(['reveal', 'col-span-2 row-span-2' => $index === 0])>
|
||||
<a href="{{ $photo->url('lg') }}" data-lightbox data-alt="{{ $photo->alt_text }}" class="group block overflow-hidden rounded-sm">
|
||||
<a href="{{ $photo->url('lg') }}" data-lightbox data-alt="{{ $photo->alt_text }}" data-caption="{{ $photo->caption }}" class="group block overflow-hidden rounded-sm">
|
||||
@include('theme::partials.image', [
|
||||
'photo' => $photo,
|
||||
'sizes' => $index === 0 ? '(min-width: 1024px) 50vw, 100vw' : '(min-width: 1024px) 25vw, 50vw',
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
{{--
|
||||
Contract: $eyebrow, $heading, $text, $signature (string|null), $tips (list: title, photo (Photo|null), tip, way, bestTime).
|
||||
theme.js: each card [data-flip] > [data-flip-inner] > [data-flip-face="front"] + [data-flip-face="back"], buttons
|
||||
[data-flip-toggle] with aria-controls of the back (hidden without JavaScript – then both faces are shown).
|
||||
--}}
|
||||
@if ($tips !== [])
|
||||
<section class="mx-auto max-w-7xl px-4 py-16 sm:px-8" @if ($heading) aria-labelledby="{{ $sectionId }}-title" @else aria-label="Ausflugstipps" @endif>
|
||||
@if ($eyebrow)<p class="eyebrow">{{ $eyebrow }}</p>@endif
|
||||
@if ($heading)<h2 id="{{ $sectionId }}-title" class="heading-display">{{ $heading }}</h2>@endif
|
||||
@if ($text)<p class="mt-4 max-w-[60ch] text-muted">{{ $text }}</p>@endif
|
||||
|
||||
<ul class="mt-10 grid gap-6 sm:grid-cols-2 lg:grid-cols-3">
|
||||
@foreach ($tips as $tip)
|
||||
@php($backId = $sectionId.'-tip-'.$loop->index)
|
||||
<li data-flip>
|
||||
<div data-flip-inner>
|
||||
<div data-flip-face="front" class="flex flex-col overflow-hidden rounded bg-surface">
|
||||
@include('theme::partials.image', ['photo' => $tip['photo'], 'sizes' => '(min-width: 1024px) 30vw, (min-width: 640px) 45vw, 100vw', 'class' => 'aspect-[4/3] w-full object-cover'])
|
||||
<div class="flex flex-1 items-center justify-between gap-4 p-5">
|
||||
<h3 class="font-display text-2xl leading-tight">{{ $tip['title'] }}</h3>
|
||||
<button type="button" hidden data-flip-toggle aria-expanded="false" aria-controls="{{ $backId }}" class="btn-primary shrink-0">Tipp lesen</button>
|
||||
</div>
|
||||
</div>
|
||||
<div data-flip-face="back" id="{{ $backId }}" class="flex flex-col gap-4 rounded border border-line bg-surface p-6">
|
||||
<p class="font-display text-2xl leading-tight">{{ $tip['title'] }}</p>
|
||||
<p class="text-lg leading-relaxed">{{ $tip['tip'] }}</p>
|
||||
@if ($signature)<p class="font-display text-xl text-accent italic">{{ $signature }}</p>@endif
|
||||
@if ($tip['way'] || $tip['bestTime'])
|
||||
<dl class="mt-auto grid gap-2 border-t border-line pt-4 text-muted">
|
||||
@if ($tip['way'])<div class="flex gap-3"><dt><x-heroicon-o-map class="size-5" aria-hidden="true" /><span class="sr-only">Weg</span></dt><dd>{{ $tip['way'] }}</dd></div>@endif
|
||||
@if ($tip['bestTime'])<div class="flex gap-3"><dt><x-heroicon-o-clock class="size-5" aria-hidden="true" /><span class="sr-only">Beste Zeit</span></dt><dd>{{ $tip['bestTime'] }}</dd></div>@endif
|
||||
</dl>
|
||||
@endif
|
||||
<button type="button" hidden data-flip-toggle aria-expanded="false" aria-controls="{{ $backId }}" class="self-start font-semibold text-accent underline underline-offset-4">Zurück zum Foto</button>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</section>
|
||||
@endif
|
||||
Reference in new issue
Block a user