30 lines
1.1 KiB
PHP
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>
|