Merge remote-tracking branch 'origin/develop' into feature/kopfzeile-desktop-menue-merge
Deploy Test / test (push) Successful in 2m26s
Deploy Test / deploy (push) Successful in 41s

This commit is contained in:
Lars committed 2026-11-22 18:04:37 +01:00
commit 2d54d39c24
43 files changed
+3770 -1097

No files matched your search

@@ -0,0 +1,63 @@
{{--
Inhaltskarte der Bibliothek (Programm, Modul, Film, Material). Die ganze Karte ist ein Link, der Titel trägt den Linktext.
Bild: nur ein vorhandenes, für das Konto freigegebenes Vorschaubild; sonst ein ruhiger Platzhalter mit der Inhaltsart.
Zusätze: Modulzahl, Zeitbedarf, Verfügbarkeit, „Verwendet in“ bei Medien, die in mehreren Programmen stehen.
--}}
@props(['card'])
@php
$type = $card['type'];
$kindLabel = $card['kind'] ?? match ($type) {
'programm' => 'Programm',
'modul' => 'Modul',
'film' => 'Film',
default => 'Material',
};
$usedIn = array_values($card['used_in'] ?? []);
$placeholderIcon = match ($type) {
'programm' => 'squares-2x2',
'modul' => 'rectangle-stack',
'film' => 'play-circle',
default => 'document-text',
};
@endphp
<article {{ $attributes->class(['mb-card', 'mb-card-'.$type]) }}>
<a class="mb-card-link" href="{{ $card['url'] }}">
<div class="mb-card-visual">
@if (filled($card['image_url'] ?? null))
<img src="{{ $card['image_url'] }}" alt="{{ $card['image'] ?: '' }}" loading="lazy">
@else
<span class="mb-card-placeholder" aria-hidden="true"><x-dynamic-component :component="'heroicon-o-'.$placeholderIcon" /></span>
@endif
@if ($type === 'film')
<span class="mb-card-play" aria-hidden="true"><x-heroicon-s-play /></span>
@endif
</div>
<div class="mb-card-body">
<x-member.type :type="$type" :label="$kindLabel" />
<h3 class="mb-card-title">{{ $card['title'] }}</h3>
@if (filled($card['summary'] ?? null))
<p class="mb-card-text">{{ $card['summary'] }}</p>
@endif
<ul class="mb-card-facts">
@if (($card['module_count'] ?? 0) > 0)
<li>{{ $card['module_count'] }} {{ $card['module_count'] === 1 ? 'Modul' : 'Module' }}</li>
@endif
@if (! empty($card['duration_minutes']))
<li><x-heroicon-o-clock aria-hidden="true" /> ca. {{ $card['duration_minutes'] }} Min.</li>
@endif
@if (count($usedIn) > 1)
<li>in {{ count($usedIn) }} Programmen und Modulen</li>
@endif
@if (count($card['versions'] ?? []) > 1)
<li>in unterschiedlichen Fassungen</li>
@endif
@unless ($card['hide_status'] ?? false)
<li><x-member.status :state="$card['coverage'] ?? 'nutzbar'" /></li>
@endunless
</ul>
@if (filled($card['error'] ?? null))
<p class="mb-card-note">{{ $card['error'] }}</p>
@endif
</div>
</a>
</article>
@@ -0,0 +1,15 @@
{{--
Kopf einer Mitgliederseite: Kennzeile, Titel mit der gelben Unterstreichung der Marke, Einleitung.
Keine Bilder und keine erfundenen Inhalte. Die Fläche folgt dem Token --color-surface-subtle.
--}}
@props(['kicker' => 'Mitgliederbereich', 'title'])
<header {{ $attributes->class(['mb-hero']) }}>
<p class="mb-kicker">{{ $kicker }}</p>
<h1 class="mb-title">
{{ $title }}
<x-brand.underline class="mb-title-line" />
</h1>
@if (trim((string) $slot) !== '')
<div class="mb-lede">{{ $slot }}</div>
@endif
</header>
@@ -0,0 +1,18 @@
{{-- Zustand einer Berechtigung oder eines Inhalts: Symbol, Text und Rahmen tragen gemeinsam, nie Farbe allein. --}}
@props(['state'])
@php
[$icon, $label, $tone] = match ($state) {
'nutzbar' => ['check-circle', 'Verfügbar', 'ok'],
'aktiv' => ['check-circle', 'Aktiv', 'ok'],
'teilweise' => ['exclamation-triangle', 'Teilweise verfügbar', 'warn'],
'geplant' => ['clock', 'Noch nicht gültig', 'warn'],
'abgelaufen' => ['x-circle', 'Abgelaufen', 'off'],
'ausgesetzt' => ['exclamation-triangle', 'Ausgesetzt', 'off'],
'widerrufen' => ['x-circle', 'Widerrufen', 'off'],
default => ['lock-closed', 'Nicht enthalten', 'off'],
};
@endphp
<span {{ $attributes->class(['mb-status', 'mb-status-'.$tone, 'state', 'state-'.str_replace(' ', '', (string) $state)]) }}>
<x-dynamic-component :component="'heroicon-o-'.$icon" aria-hidden="true" />
<span>{{ $slot->isEmpty() ? $label : $slot }}</span>
</span>
@@ -0,0 +1,21 @@
{{-- Inhaltsart mit Symbol: Programm, Modul, Film, Material. Der Text trägt die Aussage, das Symbol ist Beiwerk. --}}
@props(['type', 'label' => null])
@php
$icon = match ($type) {
'programm' => 'squares-2x2',
'modul' => 'rectangle-stack',
'film' => 'play-circle',
'hoerstueck' => 'speaker-wave',
default => 'document-text',
};
$text = $label ?? match ($type) {
'programm' => 'Programm',
'modul' => 'Modul',
'film' => 'Film',
default => 'Material',
};
@endphp
<span {{ $attributes->class(['mb-type', 'mb-type-'.$type]) }}>
<x-dynamic-component :component="'heroicon-o-'.$icon" aria-hidden="true" />
<span>{{ $text }}</span>
</span>