Führe einen gemeinsamen Layoutvertrag ein und integriere die Premium-Widgets.
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>
This commit is contained in:
1 parent
3cdb36e7a3
commit
0bfb53463a
38 files changed
+1755
-856
No files matched your search
@@ -1,52 +1,45 @@
|
||||
{{--
|
||||
Einstieg (Hero). Varianten:
|
||||
- standard: Text neben dem Bild (ältere Instanzen unverändert gültig)
|
||||
- highlight: dunkle Markenfläche
|
||||
- stage: Markenbühne, Bild über die volle Breite, Text auf heller Tafel (randlos, wenn allein im Abschnitt)
|
||||
- editorial: textbetonter Einstieg, Bild optional als breites Band darunter
|
||||
Das Bild des ersten Widgets wird sofort geladen (größtes Element), alle anderen verzögert.
|
||||
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
|
||||
$variant = in_array($variant, ['standard', 'highlight', 'stage', 'editorial'], true) ? $variant : 'standard';
|
||||
$headingTag = ! empty($first) ? 'h1' : 'h2';
|
||||
$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([
|
||||
'hero',
|
||||
'hero-'.$variant,
|
||||
'hero-with-image' => $imageUrl,
|
||||
'hero-text-left' => $variant === 'stage' && $textSide === 'left',
|
||||
]) style="--hero-focus: {{ $focus }}">
|
||||
@if ($imageUrl && $variant === 'stage')
|
||||
<div class="hero-media">
|
||||
<img class="hero-image" src="{{ $imageUrl }}" alt="{{ $data['alt'] ?? '' }}" {!! $loading !!} decoding="async">
|
||||
</div>
|
||||
@endif
|
||||
<div class="hero-frame">
|
||||
<div class="hero-copy">
|
||||
@if ($variant === 'stage' || $variant === 'highlight')
|
||||
<x-brand.rays class="hero-rays" />
|
||||
@endif
|
||||
<{{ $headingTag }}>{{ $data['heading'] ?? '' }}</{{ $headingTag }}>
|
||||
<x-brand.underline class="hero-mark" />
|
||||
@if (filled($data['text'] ?? null))
|
||||
<p class="lede">{{ $data['text'] }}</p>
|
||||
@endif
|
||||
@if ($actions !== [])
|
||||
<div class="hero-actions">
|
||||
@foreach ($actions as $index => $item)
|
||||
<a @class(['button', 'button-brand' => $index === 0, 'button-secondary' => $index > 0]) href="{{ $item['url'] }}">{{ $item['label'] }}</a>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
<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>
|
||||
@if ($imageUrl && $variant !== 'stage')
|
||||
<figure class="hero-figure">
|
||||
<img class="hero-image" src="{{ $imageUrl }}" alt="{{ $data['alt'] ?? '' }}" {!! $loading !!} decoding="async">
|
||||
@if ($variant === 'standard')
|
||||
<x-brand.rays class="hero-rays" />
|
||||
@endif
|
||||
</figure>
|
||||
@endif
|
||||
</div>
|
||||
Reference in new issue
Block a user