Hero-Video eingebaut: komprimiert 11→2,9 MB, Bild bleibt Poster/Fallback, reduced-motion zeigt nur Bild
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,10 @@ declare(strict_types=1);
|
||||
<section class="hero">
|
||||
<div class="hero__media" aria-hidden="true">
|
||||
<?php component('img', ['image' => $hero['image'], 'sizes' => '100vw', 'eager' => true, 'class' => 'hero__img']); ?>
|
||||
<?php if (!empty($hero['video'])): ?>
|
||||
<?php /* Bild bleibt Poster/Fallback; reduced-motion blendet das Video per CSS aus */ ?>
|
||||
<video class="hero__video" src="<?= e(asset($hero['video'])) ?>" autoplay muted loop playsinline preload="none" tabindex="-1"></video>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="container hero__content">
|
||||
<h1 class="hero__title"><?= e($hero['title']) ?></h1>
|
||||
|
||||
Reference in New Issue
Block a user