Turnkontakte zum Formular führen und Fitness-II-Zeit aktualisieren

This commit is contained in:
2026-09-14 13:47:26 +02:00
parent d57017072f
commit e6ac00b248
8 changed files with 16 additions and 3 deletions

View File

@@ -6,6 +6,7 @@ declare(strict_types=1);
* Kontaktformular (Felder wie auf der alten Seite). Props: * Kontaktformular (Felder wie auf der alten Seite). Props:
* $intro array{title, text}|null — optionaler Intro-Block (Überschrift, Teaser, Direkt-Mail). * $intro array{title, text}|null — optionaler Intro-Block (Überschrift, Teaser, Direkt-Mail).
* Weglassen → nur das Formular (z. B. auf /kontakt, wo der Hero den Kontext liefert). * Weglassen → nur das Formular (z. B. auf /kontakt, wo der Hero den Kontext liefert).
* $showDirectMail bool (optional, Default true) — Direkt-Mail im Intro anzeigen.
* $return string optional — Slug der absendenden Seite (Default '' = Startseite). Die Action * $return string optional — Slug der absendenden Seite (Default '' = Startseite). Die Action
* leitet nach PRG hierher zurück (whitelist-validiert), damit /kontakt nicht auf die * leitet nach PRG hierher zurück (whitelist-validiert), damit /kontakt nicht auf die
* Startseite springt. * Startseite springt.
@@ -30,6 +31,7 @@ declare(strict_types=1);
$club = json_load('club'); $club = json_load('club');
$return = $return ?? ''; $return = $return ?? '';
$intro = $intro ?? null; $intro = $intro ?? null;
$showDirectMail = $showDirectMail ?? true;
$notice = $notice ?? ''; $notice = $notice ?? '';
$noticeTitle = $noticeTitle ?? ''; $noticeTitle = $noticeTitle ?? '';
$noticeTone = $noticeTone ?? 'info'; $noticeTone = $noticeTone ?? 'info';
@@ -79,7 +81,9 @@ $f = [
<div class="contact__intro"> <div class="contact__intro">
<h2><?= e($intro['title']) ?></h2> <h2><?= e($intro['title']) ?></h2>
<p><?= e($intro['text']) ?></p> <p><?= e($intro['text']) ?></p>
<?php if ($showDirectMail): ?>
<p class="text-muted">Oder direkt per Mail an <a href="mailto:<?= e($directMail) ?>"><?= e($directMail) ?></a></p> <p class="text-muted">Oder direkt per Mail an <a href="mailto:<?= e($directMail) ?>"><?= e($directMail) ?></a></p>
<?php endif; ?>
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php if ($notice !== ''): ?> <?php if ($notice !== ''): ?>

View File

@@ -9,6 +9,7 @@ declare(strict_types=1);
* $contactEmail string (optional) — persönliche E-Mail der Ansprechperson für die * $contactEmail string (optional) — persönliche E-Mail der Ansprechperson für die
* Kontakt-Kachel. Überschreibt die Abteilungs-Mail (club.email_turnen), falls * Kontakt-Kachel. Überschreibt die Abteilungs-Mail (club.email_turnen), falls
* gesetzt — genutzt, wenn eine Disziplin einen eigenen direkten Draht angibt. * gesetzt — genutzt, wenn eine Disziplin einen eigenen direkten Draht angibt.
* $contactHref string (optional) — Formular-Link statt E-Mail-Link in der Kontakt-Kachel.
* $contactPhone string (optional) — Telefonnummer der Ansprechperson (Anzeige-Form). Ergibt * $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. * 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) * $notice string (optional) — hervorgehobener Hinweis (z. B. Wartelisten-Status)
@@ -54,6 +55,7 @@ $groupsTitleHidden = $groupsTitleHidden ?? false;
$layout = ($layout ?? 'tabs') === 'stacked' ? 'stacked' : 'tabs'; $layout = ($layout ?? 'tabs') === 'stacked' ? 'stacked' : 'tabs';
$lead = $lead ?? ''; $lead = $lead ?? '';
$contactEmail = $contactEmail ?? ''; $contactEmail = $contactEmail ?? '';
$contactHref = $contactHref ?? '';
$contactPhone = $contactPhone ?? ''; $contactPhone = $contactPhone ?? '';
$notice = $notice ?? ''; $notice = $notice ?? '';
$noticeTitle = $noticeTitle ?? ''; $noticeTitle = $noticeTitle ?? '';
@@ -230,13 +232,15 @@ $soleNote = $single ? ($groups[0]['note'] ?? '') : '';
</article> </article>
<?php endif; ?> <?php endif; ?>
<?php if ($lead !== '' || $email !== '' || $telHref !== ''): ?> <?php if ($lead !== '' || $contactHref !== '' || $email !== '' || $telHref !== ''): ?>
<article class="bento__tile bento__tile--accent turnen-dash__contact"> <article class="bento__tile bento__tile--accent turnen-dash__contact">
<span class="bento__stat-label">Kontakt</span> <span class="bento__stat-label">Kontakt</span>
<?php if ($lead !== ''): ?> <?php if ($lead !== ''): ?>
<span class="bento__stat-value"><?= e($lead) ?></span> <span class="bento__stat-value"><?= e($lead) ?></span>
<?php endif; ?> <?php endif; ?>
<?php if ($email !== ''): ?> <?php if ($contactHref !== ''): ?>
<a class="turnen-dash__mail" href="<?= e($contactHref) ?>"><?= icon('envelope', 'turnen-dash__mail-icon') ?>Zum Kontaktformular</a>
<?php elseif ($email !== ''): ?>
<a class="turnen-dash__mail" href="mailto:<?= e($email) ?>"><?= icon('envelope', 'turnen-dash__mail-icon') ?>E-Mail schreiben</a> <a class="turnen-dash__mail" href="mailto:<?= e($email) ?>"><?= icon('envelope', 'turnen-dash__mail-icon') ?>E-Mail schreiben</a>
<?php endif; ?> <?php endif; ?>
<?php if ($telHref !== ''): ?> <?php if ($telHref !== ''): ?>

View File

@@ -25,6 +25,7 @@ $meta = [
component('hero', ['hero' => $d['hero']]); component('hero', ['hero' => $d['hero']]);
component('group-schedule', [ component('group-schedule', [
'contactHref' => url('turnen') . '#kontakt',
'location' => $d['location'] ?? [], 'location' => $d['location'] ?? [],
'lead' => $d['lead'] ?? '', 'lead' => $d['lead'] ?? '',
'notice' => $d['notice'] ?? '', 'notice' => $d['notice'] ?? '',

View File

@@ -22,6 +22,7 @@ $meta = [
component('hero', ['hero' => $d['hero']]); component('hero', ['hero' => $d['hero']]);
component('group-schedule', [ component('group-schedule', [
'contactHref' => url('turnen') . '#kontakt',
'location' => $d['location'] ?? [], 'location' => $d['location'] ?? [],
'lead' => $d['lead'] ?? '', 'lead' => $d['lead'] ?? '',
'groups' => $d['groups'] ?? [], 'groups' => $d['groups'] ?? [],

View File

@@ -29,6 +29,7 @@ $meta = [
component('hero', ['hero' => $d['hero']]); component('hero', ['hero' => $d['hero']]);
component('group-schedule', [ component('group-schedule', [
'contactHref' => url('turnen') . '#kontakt',
'groupsTitle' => 'Unsere Kurse', 'groupsTitle' => 'Unsere Kurse',
'location' => $d['location'] ?? [], 'location' => $d['location'] ?? [],
'lead' => $d['lead'] ?? '', 'lead' => $d['lead'] ?? '',

View File

@@ -28,6 +28,7 @@ $meta = [
component('hero', ['hero' => $d['hero']]); component('hero', ['hero' => $d['hero']]);
component('group-schedule', [ component('group-schedule', [
'contactHref' => url('turnen') . '#kontakt',
'location' => $d['location'] ?? [], 'location' => $d['location'] ?? [],
'lead' => $d['lead'] ?? '', 'lead' => $d['lead'] ?? '',
'groups' => $d['groups'] ?? [], 'groups' => $d['groups'] ?? [],

View File

@@ -119,6 +119,7 @@ component('faq', ['faq' => $page['faq'] ?? []]);
(disciplines.eltern-kind-turnen.notice), ein Hinweis und eine Quelle. */ (disciplines.eltern-kind-turnen.notice), ein Hinweis und eine Quelle. */
$kinderturnen = json_load('turnen')['disciplines']['eltern-kind-turnen'] ?? []; $kinderturnen = json_load('turnen')['disciplines']['eltern-kind-turnen'] ?? [];
component('contact-form', [ component('contact-form', [
'showDirectMail' => false,
'intro' => $page['contact'], 'intro' => $page['contact'],
'return' => 'turnen', 'return' => 'turnen',
'department' => 'turnen', 'department' => 'turnen',

View File

@@ -192,7 +192,7 @@
{ "heading": "Was dich erwartet", "text": "Dich erwartet ein abwechslungsreicher Mix aus Pilates, Mobility, funktionellem Krafttraining und Bodyweight-Übungen. Je nach Schwerpunkt kommen auch Kleingeräte wie Kurzhanteln oder Pilates-Bälle zum Einsatz." }, { "heading": "Was dich erwartet", "text": "Dich erwartet ein abwechslungsreicher Mix aus Pilates, Mobility, funktionellem Krafttraining und Bodyweight-Übungen. Je nach Schwerpunkt kommen auch Kleingeräte wie Kurzhanteln oder Pilates-Bälle zum Einsatz." },
{ "heading": "Im Mittelpunkt", "text": "Stabilität, Balance und absolute Körperkontrolle. Alle Übungen lassen sich flexibel an dein individuelles Trainingslevel anpassen, für mehr Kraft, Beweglichkeit und ein rundum gutes Körpergefühl." } { "heading": "Im Mittelpunkt", "text": "Stabilität, Balance und absolute Körperkontrolle. Alle Übungen lassen sich flexibel an dein individuelles Trainingslevel anpassen, für mehr Kraft, Beweglichkeit und ein rundum gutes Körpergefühl." }
], ],
"sessions": [ { "day": "Donnerstag", "time": "abends", "note": "Die genaue Uhrzeit geben wir in Kürze bekannt." } ], "sessions": [ { "day": "Donnerstag", "time": "19:30–20:30 Uhr" } ],
"trainers": ["Karola Lorz", "Eva Wünsch"] "trainers": ["Karola Lorz", "Eva Wünsch"]
} }
] ]