Trampolin: echte Trainingszeiten, Trainerinnen und Kontakt vom Hallen-Aushang

Drei Karten nach Zielgruppe (Kinder+Erwachsene Mo, Kinder ab 5 Do,
Kinder ab 10 und Fortgeschrittene Do) mit Tag/Zeit und Trainerteam je
Session, Schnupper-Hinweis auf "nach Absprache" umgestellt, Fußnote zu
den Schulferien. group-schedule bekommt zwei optionale Props
(contactEmail/contactPhone) fuer Tinas persoenlichen Kontakt in der
Kontaktkachel (tel:-Muster wie person-card, keine neue CSS-Regel).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HXDvgRDHQ9iGjs4KCXykEj
This commit is contained in:
2026-08-03 19:49:25 +02:00
parent 133c3f926e
commit d410c0bedf
3 changed files with 44 additions and 18 deletions

View File

@@ -6,6 +6,11 @@ declare(strict_types=1);
* Turn-Disziplin im einheitlichen Bento-Look (wie die Mannschaftsseiten). Props:
* $location array{venue, street?, zip?, city?} (optional) — Trainingsort + „Route planen"
* $lead string (optional) — Ansprechperson der Disziplin (Akzent-Kachel)
* $contactEmail string (optional) — persönliche E-Mail der Ansprechperson für die
* Kontakt-Kachel. Überschreibt die Abteilungs-Mail (club.email_turnen), falls
* gesetzt — genutzt, wenn eine Disziplin einen eigenen direkten Draht angibt.
* $contactPhone string (optional) — Telefonnummer der Ansprechperson (Anzeige-Form). Ergibt
* einen zusätzlichen tel:-Link in der Kontakt-Kachel. tel:-Href wie in person-card.php.
* $notice string (optional) — hervorgehobener Hinweis (z. B. Wartelisten-Status)
* $noticeTitle string (optional) — Überschrift dazu
* $noticeTone 'info' (Default) | 'stop' — Tonlage, siehe components/notice.php
@@ -42,6 +47,8 @@ $groupsTitle = $groupsTitle ?? 'Unsere Gruppen';
$groupsTitleHidden = $groupsTitleHidden ?? false;
$layout = ($layout ?? 'tabs') === 'stacked' ? 'stacked' : 'tabs';
$lead = $lead ?? '';
$contactEmail = $contactEmail ?? '';
$contactPhone = $contactPhone ?? '';
$notice = $notice ?? '';
$noticeTitle = $noticeTitle ?? '';
$noticeTone = $noticeTone ?? 'info';
@@ -55,7 +62,8 @@ if ($groups === []) {
}
$club = json_load('club');
$email = $club['email_turnen'] ?? ($club['email'] ?? '');
$email = $contactEmail !== '' ? $contactEmail : ($club['email_turnen'] ?? ($club['email'] ?? ''));
$telHref = $contactPhone !== '' ? 'tel:' . preg_replace('/[^+\d]/', '', $contactPhone) : '';
$single = count($groups) === 1;
$rich = false;
@@ -185,7 +193,7 @@ $soleNote = $single ? ($groups[0]['note'] ?? '') : '';
</article>
<?php endif; ?>
<?php if ($lead !== '' || $email !== ''): ?>
<?php if ($lead !== '' || $email !== '' || $telHref !== ''): ?>
<article class="bento__tile bento__tile--accent turnen-dash__contact">
<span class="bento__stat-label">Kontakt</span>
<?php if ($lead !== ''): ?>
@@ -193,6 +201,9 @@ $soleNote = $single ? ($groups[0]['note'] ?? '') : '';
<?php endif; ?>
<?php if ($email !== ''): ?>
<a class="turnen-dash__mail" href="mailto:<?= e($email) ?>"><?= icon('envelope', 'turnen-dash__mail-icon') ?>E-Mail schreiben</a>
<?php endif; ?>
<?php if ($telHref !== ''): ?>
<a class="turnen-dash__mail" href="<?= e($telHref) ?>"><?= icon('telephone', 'turnen-dash__mail-icon') ?><?= e($contactPhone) ?></a>
<?php endif; ?>
</article>
<?php endif; ?>