Hauptadresse statt Zweitadresse, Abspielgeschwindigkeit je Video

- 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>
This commit is contained in:
LarsandClaude Opus 5.5 committed 2026-10-30 11:30:42 +01:00
1 parent b5ff837dcd
commit cc47cac93e
14 files changed
+113 -16

No files matched your search

+8
View File
@@ -71,6 +71,14 @@ document.querySelectorAll('[data-rotator]').forEach((rotator) => {
const reducedMotion = () => window.matchMedia('(prefers-reduced-motion: reduce)').matches;
// Playback speed set per video in the admin (data-playback-rate); also after the browser resets it on load.
document.querySelectorAll('video[data-playback-rate]').forEach((video) => {
const rate = Number(video.dataset.playbackRate) || 1;
const apply = () => { video.defaultPlaybackRate = rate; video.playbackRate = rate; };
apply();
video.addEventListener('loadedmetadata', apply);
});
// Silent video loops (partials/video-loop): loaded only with motion allowed and without Save-Data, playing while
// visible; the button pauses and resumes. Otherwise the poster stays and nothing is downloaded.
document.querySelectorAll('[data-video-loop]').forEach((box) => {
@@ -5,7 +5,7 @@
--}}
<div class="relative {{ $wrapperClass ?? '' }}" data-video-loop>
<video class="{{ $class ?? '' }}" muted loop playsinline disablepictureinpicture preload="none"
poster="{{ $video->posterUrl() }}" data-src="{{ $video->url() }}" data-type="{{ $video->mimeType() }}"
poster="{{ $video->posterUrl() }}" data-src="{{ $video->url() }}" data-type="{{ $video->mimeType() }}" data-playback-rate="{{ $video->playbackRate() }}"
aria-label="Video: {{ $video->title }}"></video>
<button type="button" data-video-toggle hidden aria-pressed="false" aria-label="Video anhalten" title="Video anhalten"
class="{{ $buttonClass ?? 'absolute right-4 bottom-4' }} inline-flex size-12 items-center justify-center rounded-full bg-ink/70 text-ground backdrop-blur-sm hover:bg-ink focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ground">
@@ -8,7 +8,7 @@
<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() }}" aria-label="Video: {{ $video->title }}">
<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">
@@ -18,7 +18,7 @@
<span class="absolute -top-0.5 -left-0.5 z-10" aria-hidden="true">@include('theme::partials.motif', ['slot' => 'bracket', 'class' => 'size-10'])</span>
<span class="absolute -top-0.5 -right-0.5 z-10 -scale-x-100" aria-hidden="true">@include('theme::partials.motif', ['slot' => 'bracket', 'class' => 'size-10'])</span>
<div class="relative bg-ink">
<video class="block aspect-video w-full" controls playsinline preload="none" poster="{{ $video->posterUrl() }}" aria-label="Video: {{ $video->title }}">
<video class="block 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="group absolute inset-0 flex flex-col items-center justify-center gap-4 bg-ink/25 text-ground transition hover:bg-ink/35">