Layoutvertrag (ADR-38) in der bestehenden Registry: Jede Widget-Art erklärt zulässige Rasterbreiten (supportedUnits), Höhen aus einem gemeinsamen Vokabular (heights, gespeichert als settings.height), Darstellungsmodi und Verhalten bei wenig Platz. Unzulässige Breiten werden beim Speichern verständlich abgewiesen; Höhe „fill“ streckt den Handlungsaufruf auf die Abschnittszeile. Premium-Widgets nach Brand-UI-Kit v1.6: - hero Version 2: photo_split/editorial_solid, Höhen compact/normal/ large, Label, Überschriftenebene, Akzent, Bildfokus in Prozent, zwei Schaltflächen; nur 3 oder 4 Einheiten. Upgrade aus Version 1. - image_text Version 3: Fläche cream/clear/navy, Höhen compact/normal/ spacious, Label, zwei Schaltflächen, Bildfokus; 1 bis 4 Einheiten. Upgrade aus Version 2 (format entfällt, Fokus in Prozent). - Kit-CSS ersetzt das bisherige Hero- und Bild-und-Text-CSS; der Randlos-Mechanismus der Designiteration 1 entfällt. Editor: Reiter Inhalt/Medien/Darstellung aus der Registry, Auswahl- knöpfe mit Symbolen, Schieberegler für den Bildfokus und eine Live- Vorschau im Dialog mit demselben Renderer in wählbarer Platzbreite. Tests bewusst angepasst: Einstieg braucht jetzt 3 oder 4 Einheiten (vorher Mindestbreite 2), image_text ist Version 3, Klassen der neuen Ansichten; die Hero-/Bild-Tests der Designiteration 1 sind durch CmsPremiumWidgetsTest ersetzt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
46 lines
2.5 KiB
PHP
46 lines
2.5 KiB
PHP
{{--
|
|
Premium-Einstieg (Brand-UI-Kit v1.6, Komponente lf-hero), angepasst an die Widget-Hülle der Registry.
|
|
Varianten: photo_split (Foto mit heller Textfläche), editorial_solid (Navy-Markenfläche ohne Foto).
|
|
Höhen compact/normal/large sind Mindesthöhen ab 860 px Containerbreite; darunter Sicherheitsumbruch.
|
|
Das Bild des ersten Widgets der Seite wird sofort geladen, alle anderen verzögert.
|
|
--}}
|
|
@php
|
|
$layout = $variant === 'editorial_solid' ? 'editorial-solid' : 'photo-split';
|
|
$heightClass = in_array($height, ['compact', 'normal', 'large'], true) ? $height : 'normal';
|
|
$tag = \App\Domain\Cms\Widgets\Support\PremiumFields::headingTag($settings, ! empty($first));
|
|
$loading = ! empty($first) ? 'loading="eager" fetchpriority="high"' : 'loading="lazy"';
|
|
@endphp
|
|
<div class="lf-hero-host">
|
|
<div class="lf-hero lf-hero--{{ $layout }} lf-hero--height-{{ $heightClass }} lf-hero--accent-{{ $accent }}"
|
|
style="--lf-hero-focus-x: {{ $focus['x'] }}%; --lf-hero-focus-y: {{ $focus['y'] }}%">
|
|
@if ($layout === 'photo-split' && $imageUrl)
|
|
<img class="lf-hero__photo" src="{{ $imageUrl }}" alt="{{ $data['alt'] ?? '' }}" {!! $loading !!} decoding="async">
|
|
@endif
|
|
<div class="lf-hero__inner">
|
|
<div class="lf-hero__copy">
|
|
@if ($accent === 'rays')
|
|
<x-brand.rays class="lf-hero__rays" />
|
|
@endif
|
|
@if (filled($data['eyebrow'] ?? null))
|
|
<p class="lf-hero__eyebrow">{{ $data['eyebrow'] }}</p>
|
|
@endif
|
|
<{{ $tag }} class="lf-hero__title">{{ $data['heading'] ?? '' }}</{{ $tag }}>
|
|
@if ($accent !== 'none')
|
|
<span class="lf-hero__title-accent" aria-hidden="true"></span>
|
|
@endif
|
|
@if (filled($data['text'] ?? null))
|
|
<p class="lf-hero__description">{{ $data['text'] }}</p>
|
|
@endif
|
|
@if ($actions !== [])
|
|
<div class="lf-hero__actions">
|
|
@foreach ($actions as $index => $item)
|
|
<a @class(['lf-hero__button', 'lf-hero__button--primary' => $index === 0, 'lf-hero__button--secondary' => $index > 0]) href="{{ $item['url'] }}">{{ $item['label'] }}</a>
|
|
@endforeach
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
<span class="lf-hero__bottom" aria-hidden="true"></span>
|
|
</div>
|
|
</div>
|