Files
laraundfelix/resources/views/widgets/image_text.blade.php
LarsandClaude Opus 5.5 053a8d4648
CI Feature / test (push) Successful in 48s
Deploy Test / test (push) Successful in 44s
Deploy Test / deploy (push) Successful in 37s
Stelle alle CMS-Bilder auf die zentrale Medienverwaltung um.
- Einstieg, Bild und Text, redaktionelle Karten, Premium-Karten und Abschnittshintergrund speichern die
  Kennung des Mediums (Bildschlüssel image) und lesen über WebsiteMedia; öffentlich nur mit Website-Freigabe,
  in der Redaktionsvorschau sonst das Vorschaubild mit Hinweis.
- Gemeinsame Felder: Medienpicker mit Vorschaubild und Status, Upload direkt über WebsiteIntake, Anzeige des
  gewählten Mediums mit Verweis auf den Medienmanager. Die CMS-eigene Bildauswahl entfällt.
- Frühere CMS-Bilder übernimmt ein Warteschlangen-Job (dedupliziert, nichts gelöscht); website_media_aliases
  ordnet frühere Pfade zu, wirksam erst nach der ersten Website-Freigabe; /medien/cms/ folgt danach der Freigabe.
- Medienansicht nennt die Website-Seiten, die ein Bild verwenden.
- Bewusst geändert: Der Alternativtext gehört zum Medium und ist im Widget nur noch eine optionale Abweichung;
  die Tests zur Alt-Text-Pflicht prüfen jetzt Übernahme und andere Registry-Fehler.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 22:32:29 +01:00

49 lines
2.4 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{{--
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
@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="{{ $imageAlt ?? '' }}" @if (! empty($first)) loading="eager" fetchpriority="high" @else loading="lazy" @endif decoding="async">
</div>
@endif
</div>
</div>
@include('widgets.partials.image-notice')