Files
laraundfelix/resources/views/member/partials/card.blade.php
T
LarsandCursor c997eb500c
Deploy Test / test (push) Successful in 2m28s
Deploy Test / deploy (push) Failing after 14s
Leite Vorschaubilder und Filmstufen geschuetzt ab
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-16 09:40:59 +01:00

30 lines
1.1 KiB
PHP

@php
$coverageLabel = match ($card['coverage'] ?? '') {
'nutzbar' => 'Nutzbar',
'teilweise' => 'Teilweise nutzbar',
default => 'Nicht enthalten',
};
@endphp
<article class="media-card">
<a href="{{ $href }}">
<div class="thumb">
<span class="flag">{{ $card['kind'] ?: 'Material' }}</span>
@if (filled($card['image_url'] ?? null))
<img src="{{ $card['image_url'] }}" alt="{{ $card['image'] ?: 'Vorschaubild' }}">
@else
<span class="thumb-label">{{ filled($card['image'] ?? null) ? $card['image'] : 'Platzhalter' }}</span>
@endif
</div>
<div class="card-copy">
<h2>{{ $card['title'] }}</h2>
@if (filled($card['summary'] ?? null))
<p>{{ $card['summary'] }}</p>
@endif
<p class="state state-{{ $card['coverage'] ?? 'offen' }}">{{ $coverageLabel }}</p>
@if (filled($card['error'] ?? null))
<p class="state state-hinweis">{{ $card['error'] }}</p>
@endif
</div>
</a>
</article>