Nach der fünften Sichtung auf luf-test: - Einheitliche Größenstufen (small, medium, large, xlarge = 2,5 / 3,5 / 5 / 7 rem) als Tokens --lf-symbol-* und als HeadingAccent::STEPS. Überschrift, Einstieg, Bild und Text, Handlungsaufruf, Fließtext und Merkmalszeile verwenden dieselben Schlüssel und Werte. Die früheren Stufen Groß und Sehr groß neben dem Absatz waren zur Breite skaliert (bis 7 und 10 rem) und sind jetzt fest 5 und 7 rem; neu ist Klein. - Einstieg und Bild und Text: Größe (symbol_size) und senkrechte Ausrichtung (symbol_align) neben dem ganzen Textblock, auch auf Navy und auf dem Navy-Einstieg (weiße Scheibe). - Fließtext: Symbol neben dem Text, Vorgabe Mittel. - Handlungsaufruf: zusätzlich der Pinselstrich unter der Überschrift. - Ausrichtung "Oben": die Korrektur der Oberkante rechnet mit der tatsächlichen Zeilenhöhe je Widget (Einstieg 1,06, Bild und Text 1,14, Fließtext Source Sans 3). Am gerenderten Bild gemessen liegen Symbol und Schrift bei allen Widgets auf etwa einen Pixel genau auf einer Linie. - HeadingAccent::lead() bündelt, was eine Ansicht für Symbol und Absatz braucht. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
52 lines
2.8 KiB
PHP
52 lines
2.8 KiB
PHP
{{--
|
||
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">
|
||
@php($lead = \App\Domain\Cms\Widgets\Support\HeadingAccent::lead($settings))
|
||
@if ($lead['side'] !== null)<div class="lf-lead lf-lead--{{ $lead['side'] }} lf-lead--{{ $lead['align'] }}"><x-brand.symbol :name="$lead['symbol']" class="lf-lead__symbol" /><div class="lf-lead__body">@endif
|
||
@if (filled($data['eyebrow'] ?? null))
|
||
<p class="lf-bt__eyebrow">{{ $data['eyebrow'] }}</p>
|
||
@endif
|
||
@if (filled($data['title'] ?? null))
|
||
<{{ $tag }} class="lf-bt__headline"><x-brand.heading-symbol :settings="$lead['inline']" />{{ $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
|
||
@if ($lead['side'] !== null)</div></div>@endif
|
||
</div>
|
||
@if ($imageUrl)
|
||
<div class="lf-bt__media">
|
||
<img class="lf-bt__image" src="{{ $imageUrl }}" alt="{{ $imageAlt ?? '' }}" @if (! empty($first)) loading="eager" fetchpriority="high" @else loading="lazy" @endif decoding="async">
|
||
</div>
|
||
@endif
|
||
</div>
|
||
</div>
|
||
@include('widgets.partials.image-notice')
|