Biete in Bild und Text einen Bildanteil, Bild ohne Text und ein Video auf dem Bild an
Neue Einstellung "Bildanteil" (Bild zu Text von 1:2 bis 2:1, nur im zweispaltigen Stand ab 900 px; ohne Wert bleibt die bisherige Verteilung). Der Text ist nur noch Pflicht, solange kein Bild gewählt ist; ein Bild darf allein über die ganze Breite stehen. Optional ein Video (refs.video, ein Film aus dem Medienmanager, gewählt über den gemeinsamen Picker): Der für die Website freigegebene Clip spielt auf dem Bild beim Überfahren stumm und per Klick mit Ton wie auf der Medienkarte (CardClip, card-clip.js). Ohne Versionssprung; gespeicherte Seiten bleiben unverändert. Die Pflichtregel für den Text wird bewusst gelockert: "Bitte einen Text eingeben" gilt nur noch ohne Bild. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3cf3e822b8
commit
5233b96c42
15 files changed
+603
-19
No files matched your search
@@ -3,12 +3,20 @@
|
||||
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).
|
||||
Der Bildanteil (imageShare) gilt nur im zweispaltigen Stand. Ohne Text, Überschrift, Label und Schaltflächen
|
||||
(hasCopy) steht das Bild allein über die ganze Breite. Ein freigegebenes Video (video.url, CardClip) liegt über dem
|
||||
Bild und spielt dort wie auf der Medienkarte (resources/js/card-clip.js); ohne freigegebenen Clip bleibt es beim Bild.
|
||||
--}}
|
||||
@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));
|
||||
$hasCopy = $hasCopy ?? true;
|
||||
$imageShare = $imageShare ?? null;
|
||||
$clipUrl = $imageUrl ? ($video['url'] ?? null) : null;
|
||||
$clipTitle = (string) ($video['title'] ?? '');
|
||||
@endphp
|
||||
@if ($imageUrl || $hasCopy)
|
||||
<div class="lf-bt-host">
|
||||
<div @class([
|
||||
'lf-bt',
|
||||
@@ -16,7 +24,11 @@
|
||||
'lf-bt--image-'.$side,
|
||||
'lf-bt--height-'.$heightClass,
|
||||
'lf-bt--without-image' => ! $imageUrl,
|
||||
'lf-bt--without-text' => ! $hasCopy,
|
||||
'lf-bt--shared' => $imageShare !== null && $imageUrl && $hasCopy,
|
||||
'lf-bt--share-'.$imageShare => $imageShare !== null && $imageUrl && $hasCopy,
|
||||
]) style="--bt-focus-x: {{ $focus['x'] }}%; --bt-focus-y: {{ $focus['y'] }}%">
|
||||
@if ($hasCopy)
|
||||
<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
|
||||
@@ -41,11 +53,17 @@
|
||||
@endif
|
||||
@if ($lead['side'] !== null)</div></div>@endif
|
||||
</div>
|
||||
@endif
|
||||
@if ($imageUrl)
|
||||
<div class="lf-bt__media">
|
||||
<div class="lf-bt__media" @if ($clipUrl !== null) data-card-clip data-clip-src="{{ $clipUrl }}" data-clip-title="{{ $clipTitle }}" @endif>
|
||||
<img class="lf-bt__image" src="{{ $imageUrl }}" alt="{{ $imageAlt ?? '' }}" @if (! empty($first)) loading="eager" fetchpriority="high" @else loading="lazy" @endif decoding="async">
|
||||
@include('widgets.partials.card-clip')
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@include('widgets.partials.image-notice')
|
||||
@if ($context->preview && ! empty($video['notice']))
|
||||
<p class="preview-note">{{ $video['notice'] }}</p>
|
||||
@endif
|
||||
Reference in new issue
Block a user