diff --git a/app/components/group-schedule.php b/app/components/group-schedule.php index c414f29..dcfe0ef 100644 --- a/app/components/group-schedule.php +++ b/app/components/group-schedule.php @@ -36,6 +36,12 @@ declare(strict_types=1); * $layout 'tabs' (Default) | 'stacked' — greift nur bei beschreibenden Gruppen. * 'stacked' zeigt alle Karten offen untereinander (wenige Gruppen), * 'tabs' ordnet viele textreiche Gruppen (Kinderturnen). + * $groupsInDash bool (optional) — nur für SCHLICHTE Gruppen (ohne intro/details): zieht die + * Gruppen-Karten als volle Bodenreihe MIT INS Bento-Dashboard, ohne eigene Sektion + * und ohne „Unsere Gruppen"-Überschrift. Für Disziplinen mit wenigen kurzen Gruppen + * (Trampolin), damit das Dashboard ein zusammenhängender Block bleibt statt einer + * losgelösten Kartenreihe darunter. Bei beschreibenden Gruppen (Wettkampfturnen, + * Kinderturnen) wirkungslos — die brauchen Platz und ihre eigene Sektion. * $anchor string (optional, Default 'training') * * Eine Gruppe → Trainingszeiten landen als Bento-Kachel im Dashboard. @@ -54,6 +60,7 @@ $noticeTitle = $noticeTitle ?? ''; $noticeTone = $noticeTone ?? 'info'; $noticeIcon = $noticeIcon ?? 'info-circle'; $footnote = $footnote ?? ''; +$groupsInDash = !empty($groupsInDash); $groups = $groups ?? []; $location = $location ?? []; @@ -74,6 +81,9 @@ foreach ($groups as $g) { } } +// Schlichte Gruppen direkt ins Dashboard ziehen (nur wenn mehrere und keine „reich"). +$groupsInline = $groupsInDash && !$single && !$rich; + $hasVenue = !empty($location['venue']); $mapsQuery = $hasVenue ? rawurlencode(trim( ($location['venue'] ?? '') . ', ' @@ -160,12 +170,39 @@ $renderCardBody = static function (array $g) use ($renderSession): void { + + + + = e($g['name']) ?> + + = e($g['level']) ?> + + + + + + + + + + + + - + $noticeTitle, @@ -221,12 +258,20 @@ $soleNote = $single ? ($groups[0]['note'] ?? '') : ''; Route planen (öffnet Google Maps in neuem Tab) = icon('geo-alt') ?> + + + + + + + = e($footnote) ?> + - + = e($groupsTitle) ?> @@ -265,25 +310,7 @@ $soleNote = $single ? ($groups[0]['note'] ?? '') : ''; - - - - - = e($g['name']) ?> - - = e($g['level']) ?> - - - - - - - - - - - - + diff --git a/app/pages/turnen-trampolin.php b/app/pages/turnen-trampolin.php index 49ed352..3cf8d26 100644 --- a/app/pages/turnen-trampolin.php +++ b/app/pages/turnen-trampolin.php @@ -31,5 +31,6 @@ component('group-schedule', [ 'noticeTone' => $d['notice_tone'] ?? 'info', 'noticeIcon' => $d['notice_icon'] ?? 'info-circle', 'groups' => $d['groups'] ?? [], + 'groupsInDash' => true, 'footnote' => $d['footnote'] ?? '', ]); diff --git a/public/assets/css/components.css b/public/assets/css/components.css index a8c7d1e..c854040 100644 --- a/public/assets/css/components.css +++ b/public/assets/css/components.css @@ -2676,6 +2676,24 @@ /* Nur die Position im Bento-Raster — Fläche, Farbe und Innenaufbau kommen von .notice. */ .turnen-dash__notice { grid-area: notice; } +/* Schlichte Gruppen als volle Bodenreihe MIT im Dashboard ($groupsInDash, z. B. Trampolin): + ein zusammenhängender Block statt einer losgelösten Kartenreihe darunter. Selektor als + .turnen-dash.turnen-dash--groups (nicht nur .turnen-dash--groups), damit die Spezifität die + :not(--single)-Regeln oben trifft — gleiche Klassenzahl, gewinnt durch spätere Position. */ +.turnen-dash.turnen-dash--groups { + grid-template-areas: + "venue venue lead" + "groups groups groups"; +} +.turnen-dash.turnen-dash--notice.turnen-dash--groups { + grid-template-areas: + "notice notice notice" + "venue venue lead" + "groups groups groups"; +} +/* Die Reihe spannt alle drei Spalten; das interne Kartenraster liefert .group-list--grid. */ +.turnen-dash__groups { grid-area: groups; } + /* Trainingsort: Adresse links, Route-Button rechts (wie team-bento__venue). */ .turnen-dash__venue { flex-direction: row; @@ -2750,6 +2768,19 @@ "lead" "venue"; } + .turnen-dash.turnen-dash--groups { + grid-template-areas: + "venue" + "lead" + "groups"; + } + .turnen-dash.turnen-dash--notice.turnen-dash--groups { + grid-template-areas: + "notice" + "venue" + "lead" + "groups"; + } } /* === notice === */
= e($g['level']) ?>
= e($footnote) ?>