Der Editor packt eingefügten Text in <p>; Felder wie die FAQ-Antwort gibt die Website als Text aus, die Tags waren sichtbar. Beim Speichern entfernt unwrapParagraphs() die Absätze (ein Absatz ohne <p>, mehrere mit <br><br>, Blockinhalte unverändert). cms_inline() gibt die Felder als bereinigtes Inline-HTML aus – auch schon gespeicherte Texte mit <p> erscheinen sauber, Fett und Hervorhebung werden dargestellt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
67 lines
4.2 KiB
PHP
67 lines
4.2 KiB
PHP
<section id="projekte" class="section-padding {{ $bg }}">
|
|
<div class="container-padding">
|
|
<div class="text-center max-w-2xl mx-auto">
|
|
<h2 class="text-section-title">{!! $content['title'] ?? '' !!}</h2>
|
|
@if (!empty($content['text']))
|
|
<p class="text-large text-muted-foreground leading-relaxed mt-4">{!! cms_inline($content['text'] ?? '') !!}</p>
|
|
@endif
|
|
</div>
|
|
|
|
@if ($projects)
|
|
<div class="grid sm:grid-cols-2 lg:grid-cols-3 gap-6 mt-12">
|
|
@foreach ($projects as $project)
|
|
<figure class="card-elevated rounded-2xl overflow-hidden group" wire:key="ref-{{ $project['key'] }}">
|
|
<div class="relative overflow-hidden">
|
|
<img src="{{ theme_image_url($project['image']) }}"
|
|
alt="{{ $project['caption'] ?: ($project['brands'][0]['name'] ?? '') }}" loading="lazy"
|
|
class="w-full aspect-[4/3] object-cover transition-transform duration-300 group-hover:scale-105" />
|
|
<span class="absolute top-3 left-3 rounded-full bg-black/60 px-3 py-1 text-xs font-medium text-white backdrop-blur-sm">
|
|
{{ __('ui.brand_gallery_badge_project') }}
|
|
</span>
|
|
</div>
|
|
<figcaption class="p-5">
|
|
@if (!empty($project['caption']))
|
|
<p class="font-medium">{{ $project['caption'] }}</p>
|
|
@endif
|
|
@if (!empty($project['meta']))
|
|
<p class="text-xs uppercase tracking-wider text-clay mt-1">{{ $project['meta'] }}</p>
|
|
@endif
|
|
@if (!empty($project['description']))
|
|
<p class="text-sm text-muted-foreground leading-relaxed mt-2">{!! cms_inline($project['description'] ?? '') !!}</p>
|
|
@endif
|
|
@if (!empty($project['gallery']))
|
|
{{-- Weitere Bilder der Referenz als kleine Reihe --}}
|
|
<div class="flex gap-2 mt-3 overflow-x-auto">
|
|
@foreach ($project['gallery'] as $item)
|
|
<img src="{{ theme_image_url($item['image']) }}" alt="{{ $item['caption'] ?: $project['caption'] }}"
|
|
loading="lazy" class="h-14 w-20 shrink-0 rounded-md object-cover" />
|
|
@endforeach
|
|
</div>
|
|
@endif
|
|
@if (!empty($project['brands']))
|
|
<p class="text-sm mt-2 flex flex-wrap gap-x-3 gap-y-1">
|
|
@foreach ($project['brands'] as $brand)
|
|
@if (!empty($brand['link']))
|
|
<a href="{{ $brand['link'] }}"
|
|
class="text-secondary underline underline-offset-2 hover:no-underline">{{ $brand['name'] }}</a>
|
|
@else
|
|
<span class="text-muted-foreground">{{ $brand['name'] }}</span>
|
|
@endif
|
|
@endforeach
|
|
</p>
|
|
@endif
|
|
</figcaption>
|
|
</figure>
|
|
@endforeach
|
|
</div>
|
|
@else
|
|
{{-- Ehrlicher Leerzustand statt einer erfundenen Referenz. --}}
|
|
<div class="mt-12 rounded-2xl border border-dashed border-border p-10 text-center">
|
|
<p class="text-muted-foreground">{{ $content['empty'] ?? __('ui.references_empty') }}</p>
|
|
<x-appointment-link :href="route('contact')" class="btn-primary-accent px-6 py-3 mt-6 inline-block">
|
|
{{ __('ui.request_appointment') }}
|
|
</x-appointment-link>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</section>
|