- Weitere Adressen einer Website (z. B. www.stommer.info) leiten per 301 auf die Hauptadresse um; vorher blockierte der Browser Skripte, Schriften und Videos, die von der Hauptadresse kamen (kein Titelvideo, Ersatzschrift) - Site::origin() nimmt verbindlich das Feld domain - Videos: Abspielgeschwindigkeit 0,5x bis 1x, gilt im Titelbereich und Rundgang Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
35 lines
2.7 KiB
PHP
35 lines
2.7 KiB
PHP
{{--
|
|
Contract: $eyebrow, $heading, $text, $video (App\Models\Video|null), $chapters (list: seconds, time, label, room),
|
|
$layout (wide|left|right). The video has native controls and loads only when started (preload="none").
|
|
theme.js (initTours): [data-tour], [data-tour-start] (start overlay), [data-tour-seek="<seconds>"] (chapter buttons,
|
|
hidden without JavaScript). Floor plan rooms link here with [data-tour-link="<seconds>"].
|
|
--}}
|
|
@if ($video)
|
|
<section class="mx-auto max-w-7xl px-4 py-16 sm:px-8" aria-labelledby="{{ $sectionId }}-title" data-tour>
|
|
<div @class(['grid items-center gap-10', 'lg:grid-cols-[3fr_2fr]' => $layout === 'left', 'lg:grid-cols-[2fr_3fr]' => $layout === 'right'])>
|
|
<div @class(['relative overflow-hidden rounded bg-ink', 'lg:order-2' => $layout === 'right'])>
|
|
<video class="aspect-video w-full" controls playsinline preload="none" poster="{{ $video->posterUrl() }}" data-playback-rate="{{ $video->playbackRate() }}" aria-label="Video: {{ $video->title }}">
|
|
<source src="{{ $video->url() }}" type="{{ $video->mimeType() }}">
|
|
</video>
|
|
<button type="button" data-tour-start hidden class="absolute inset-0 flex items-center justify-center bg-ink/20 hover:bg-ink/30">
|
|
<span class="inline-flex min-h-14 items-center gap-3 rounded-full bg-ground px-7 font-semibold text-ink"><x-heroicon-s-play class="size-6" aria-hidden="true" />Rundgang starten</span>
|
|
</button>
|
|
</div>
|
|
<div @class(['lg:order-1' => $layout === 'right', 'order-first' => $layout === 'wide'])>
|
|
@if ($eyebrow)<p class="eyebrow">{{ $eyebrow }}</p>@endif
|
|
@if ($heading)<h2 id="{{ $sectionId }}-title" class="font-display text-[2rem] leading-tight sm:text-[2.5rem]">{{ $heading }}</h2>@endif
|
|
@if ($text)<p class="mt-4 max-w-[60ch] text-muted">{{ $text }}</p>@endif
|
|
@if ($chapters !== [])
|
|
<ul class="mt-6 flex flex-wrap gap-2" hidden data-tour-chapters aria-label="Kapitel">
|
|
@foreach ($chapters as $chapter)
|
|
<li><button type="button" data-tour-seek="{{ $chapter['seconds'] }}" class="inline-flex min-h-12 items-center gap-2 rounded border border-line bg-surface px-4 hover:border-accent aria-[current=true]:border-accent aria-[current=true]:bg-accent aria-[current=true]:text-accent-ink">
|
|
<span class="text-sm tabular-nums text-muted">{{ $chapter['time'] }}</span> {{ $chapter['label'] }}
|
|
</button></li>
|
|
@endforeach
|
|
</ul>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
</section>
|
|
@endif
|