Mitglied werden: Hub-Seite mit Online-Anmeldung (membership-form + membership-submit-Action, Honeypot + Time-Trap), Abteilungswahl (department-choice), Beitragstabelle (fee-table) und Turn-Aufnahmeantrag als PDF-Download. Daten in data/mitglied-werden.json. Partner werden & Sportheimbuchung: neue Seiten samt Routing und Navigation. Ansprechpartner: echter Hero (Vereinsgelände), Bereiche aus dem group-Feld der Single Source (Fußball / Turnen) zu zwei Sektionen gebündelt, Disziplin als Karten-Überschrift. Fehlende Turn-Disziplin-Leads (Frisque, Lorz, Kornatz, Trotzke) aus den Turnen-Unterseiten extrahiert und in data/ansprechpartner.json ergänzt (allgemeine Turnabteilungs-Mail als Kontakt). WhatsApp für alle Personen mit Telefonnummer. person-grid: kompaktere Karten, Hairline unter der Bereichsüberschrift, 5 Spalten am Desktop. Startseite auf die Haupt-Ansprechpartner je Bereich begrenzt. Dazu: neue Icons (check-circle, download, file-earmark-text, whatsapp), Anpassungen an Header/Footer/CTA/age-groups sowie tokens/layout/utilities. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RZsKTL5kRSG4KkK8w2LKkE
103 lines
4.3 KiB
PHP
103 lines
4.3 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* Footer: Brand-Block (Logo, Entity-Satz, Social), Seiten-Navigation,
|
|
* Kontakt (NAP aus club.json — identisch zu JSON-LD), Rechtliches.
|
|
* Alle Daten aus den Single-Source-Dateien (club.json / navigation.json).
|
|
*/
|
|
$club = json_load('club');
|
|
$nav = json_load('navigation');
|
|
|
|
$socialLabels = ['instagram' => 'Instagram', 'facebook' => 'Facebook', 'youtube' => 'YouTube'];
|
|
$socialIcons = ['instagram' => 'instagram', 'facebook' => 'facebook', 'youtube' => 'youtube'];
|
|
|
|
// Hauptnav in Spalten gruppieren: jeder Hauptpunkt mit Unterpunkten wird eine
|
|
// Footer-Spalte (Heading verlinkt die Übersicht, darunter die Kinder). Standalone-
|
|
// Hauptpunkte (ohne Kinder) und CTAs sammeln sich als „Mehr“-Spalte. Anker-Links raus.
|
|
$sections = [];
|
|
$extraLinks = [];
|
|
foreach ($nav['main'] as $item) {
|
|
if (str_starts_with($item['slug'], '#')) {
|
|
continue;
|
|
}
|
|
$children = [];
|
|
foreach ($item['children'] ?? [] as $child) {
|
|
if ($child['slug'] !== $item['slug']) { // „Übersicht“ dupliziert nur den Eltern-Slug = Heading
|
|
$children[] = $child;
|
|
}
|
|
}
|
|
if ($children) {
|
|
$sections[] = ['label' => $item['label'], 'slug' => $item['slug'], 'links' => $children];
|
|
} else {
|
|
$extraLinks[] = ['label' => $item['label'], 'slug' => $item['slug']];
|
|
}
|
|
}
|
|
$extraLinks = array_merge($extraLinks, $nav['ctas'] ?? []);
|
|
?>
|
|
<footer class="site-footer">
|
|
<div class="container site-footer__grid">
|
|
<div class="site-footer__brand">
|
|
<img src="<?= e(asset('img/logo.svg')) ?>" alt="" width="62" height="80" loading="lazy">
|
|
<p class="site-footer__claim"><?= e($club['description']) ?></p>
|
|
<ul class="site-footer__social" aria-label="Social Media">
|
|
<?php foreach ($club['social'] as $key => $socialUrl): ?>
|
|
<?php if ($socialUrl): ?>
|
|
<li>
|
|
<a href="<?= e($socialUrl) ?>" rel="noopener">
|
|
<?= icon($socialIcons[$key] ?? 'link-45deg') ?><?= e($socialLabels[$key] ?? ucfirst($key)) ?>
|
|
</a>
|
|
</li>
|
|
<?php endif; ?>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
</div>
|
|
<?php foreach ($sections as $section): ?>
|
|
<nav aria-label="<?= e($section['label']) ?>">
|
|
<h2 class="site-footer__heading">
|
|
<a href="<?= e(url($section['slug'])) ?>"><?= e($section['label']) ?></a>
|
|
</h2>
|
|
<ul class="site-footer__list">
|
|
<?php foreach ($section['links'] as $item): ?>
|
|
<li><a href="<?= e(url($item['slug'])) ?>"><?= e($item['label']) ?></a></li>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
</nav>
|
|
<?php endforeach; ?>
|
|
<div>
|
|
<h2 class="site-footer__heading">Kontakt</h2>
|
|
<address class="site-footer__address">
|
|
<p>
|
|
<?= icon('geo-alt') ?>
|
|
<span><?= e($club['address']['venue']) ?><br>
|
|
<?= e($club['address']['street']) ?><br>
|
|
<?= e($club['address']['zip']) ?> <?= e($club['address']['city']) ?></span>
|
|
</p>
|
|
<p>
|
|
<?= icon('envelope') ?>
|
|
<a href="mailto:<?= e($club['email']) ?>"><?= e($club['email']) ?></a>
|
|
</p>
|
|
</address>
|
|
<?php if ($extraLinks): ?>
|
|
<ul class="site-footer__list site-footer__list--extra">
|
|
<?php foreach ($extraLinks as $item): ?>
|
|
<li><a href="<?= e(url($item['slug'])) ?>"><?= e($item['label']) ?></a></li>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
<div class="site-footer__bottom">
|
|
<div class="container site-footer__bottom-inner">
|
|
<p>© <?= e(date('Y')) ?> <?= e($club['legal_name']) ?></p>
|
|
<ul class="site-footer__legal" aria-label="Rechtliches">
|
|
<?php foreach ($nav['legal'] as $item): ?>
|
|
<li><a href="<?= e(url($item['slug'])) ?>"><?= e($item['label']) ?></a></li>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
<p class="site-footer__memberships">Mitglied in: <?= e(implode(' · ', $club['memberships'])) ?></p>
|
|
</div>
|
|
</div>
|
|
</footer>
|