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,19 +1,47 @@
|
||||
{{-- Bild und Text. Varianten: image_left, image_right. Einstellungen: Bildformat und Bildausschnitt. --}}
|
||||
<div class="image-text image-text-{{ $variant === 'image_right' ? 'right' : 'left' }} @unless ($imageUrl) image-text-no-image @endunless image-format-{{ $format }}" style="--image-focus: {{ $focus }}">
|
||||
@if ($imageUrl)
|
||||
<figure class="image-text-figure">
|
||||
<img src="{{ $imageUrl }}" alt="{{ $data['alt'] ?? '' }}" @if (! empty($first)) loading="eager" fetchpriority="high" @else loading="lazy" @endif decoding="async">
|
||||
</figure>
|
||||
@endif
|
||||
<div class="image-text-copy">
|
||||
@if (filled($data['title'] ?? null))
|
||||
@if (! empty($first))
|
||||
<h1>{{ $data['title'] }}</h1>
|
||||
@else
|
||||
<h2>{{ $data['title'] }}</h2>
|
||||
{{--
|
||||
Premium-Bild-und-Text (Brand-UI-Kit v1.6, Komponente lf-bild-text), angepasst an die Widget-Hülle der Registry.
|
||||
Darstellung nach tatsächlicher Containerbreite: unter 540 px gestapelt, 540–899 px flacher Bildstreifen,
|
||||
ab 900 px zweispaltig mit Bild links oder rechts (Variante). Die Höhe ändert Bildproportion und Abstände,
|
||||
nie die zulässige Textmenge. Der Text ist bereits bereinigter formatierter Text (RichText::sanitize).
|
||||
--}}
|
||||
@php
|
||||
$side = $variant === 'image_left' ? 'left' : 'right';
|
||||
$heightClass = in_array($height, ['compact', 'normal', 'spacious'], true) ? $height : 'normal';
|
||||
$tag = \App\Domain\Cms\Widgets\Support\PremiumFields::headingTag($settings, ! empty($first));
|
||||
@endphp
|
||||
<div class="lf-bt-host">
|
||||
<div @class([
|
||||
'lf-bt',
|
||||
'lf-bt--'.$surface,
|
||||
'lf-bt--image-'.$side,
|
||||
'lf-bt--height-'.$heightClass,
|
||||
'lf-bt--without-image' => ! $imageUrl,
|
||||
]) style="--bt-focus-x: {{ $focus['x'] }}%; --bt-focus-y: {{ $focus['y'] }}%">
|
||||
<div class="lf-bt__copy">
|
||||
@if (filled($data['eyebrow'] ?? null))
|
||||
<p class="lf-bt__eyebrow">{{ $data['eyebrow'] }}</p>
|
||||
@endif
|
||||
<x-brand.underline class="image-text-mark" />
|
||||
@if (filled($data['title'] ?? null))
|
||||
<{{ $tag }} class="lf-bt__headline">{{ $data['title'] }}</{{ $tag }}>
|
||||
<span class="lf-bt__accent" aria-hidden="true"></span>
|
||||
@endif
|
||||
<div class="lf-bt__body">{!! $body !!}</div>
|
||||
@if ($actions !== [])
|
||||
<div class="lf-bt__actions">
|
||||
@foreach ($actions as $index => $item)
|
||||
@if ($index === 0)
|
||||
<a class="lf-bt__button" href="{{ $item['url'] }}">{{ $item['label'] }} <span aria-hidden="true">→</span></a>
|
||||
@else
|
||||
<a class="lf-bt__button lf-bt__button--secondary" href="{{ $item['url'] }}">{{ $item['label'] }}</a>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@if ($imageUrl)
|
||||
<div class="lf-bt__media">
|
||||
<img class="lf-bt__image" src="{{ $imageUrl }}" alt="{{ $data['alt'] ?? '' }}" @if (! empty($first)) loading="eager" fetchpriority="high" @else loading="lazy" @endif decoding="async">
|
||||
</div>
|
||||
@endif
|
||||
<div class="prose">{!! $body !!}</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in new issue
Block a user