2026-06-11 22:20:14 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
/**
|
2026-06-11 22:41:57 +02:00
|
|
|
* Ansprechpartner-Grid aus data/ansprechpartner.json (Single Source of Truth).
|
|
|
|
|
* Alle Props optional:
|
|
|
|
|
* $departments array — nur diese Abteilungen zeigen (z. B. ['Herrenfußball','Damenfußball']).
|
Unterseiten: Fußball-Übersicht, Mannschaften, Jugend, Verein, Rechtliches
Neue Seiten + Routen: fussball, fussball/{erste-mannschaft,zweite-mannschaft,
damen}, jugendfussball, verein, impressum, datenschutz. Dazu die Komponenten
team, team-cards/-roster/-photo/-bento, faq/faq-contact, key-facts, age-groups,
cta-band, training-location und der contact-slider.
Daten in teams/fussball/jugend/verein.json; club.json um Vorstand, Bankdaten,
Datenschutz-Kontakt erweitert. person-grid bekommt $names-Filter, partner-grid
einen Intro-Stil. Seiten setzen $meta['schema'] via team_/page_schema.
Styles für alle neuen Komponenten in components.css.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KDQZ6FuchNUh2bxSW9PeNv
2026-06-19 08:13:04 +02:00
|
|
|
* $names array — zusätzlich auf diese Namen einschränken (z. B. ['Benedikt Höfner']).
|
2026-06-11 22:41:57 +02:00
|
|
|
* $title string — Überschrift überschreiben (Default aus JSON).
|
|
|
|
|
* $intro string — Intro-Text überschreiben (Default aus JSON; '' = ausblenden).
|
|
|
|
|
* $anchor string — Sektions-ID (Default 'ansprechpartner').
|
|
|
|
|
* $tinted bool — aufgehelltes Vollbreite-Band (Default true).
|
2026-06-20 20:49:46 +02:00
|
|
|
* $columns int — Spaltenanzahl auf Desktop (null = automatisch bis 5).
|
2026-06-11 22:20:14 +02:00
|
|
|
*/
|
|
|
|
|
$data = json_load('ansprechpartner');
|
|
|
|
|
$anchor = $anchor ?? 'ansprechpartner';
|
2026-06-11 22:41:57 +02:00
|
|
|
$tinted = $tinted ?? true;
|
2026-06-20 20:49:46 +02:00
|
|
|
$columns = $columns ?? null;
|
2026-06-11 22:41:57 +02:00
|
|
|
$title = $title ?? $data['title'];
|
|
|
|
|
$intro = $intro ?? ($data['intro'] ?? '');
|
|
|
|
|
|
|
|
|
|
$persons = $data['persons'] ?? [];
|
|
|
|
|
if (!empty($departments)) {
|
|
|
|
|
$persons = array_values(array_filter(
|
|
|
|
|
$persons,
|
|
|
|
|
static fn (array $p): bool => in_array($p['department'] ?? '', $departments, true)
|
|
|
|
|
));
|
|
|
|
|
}
|
Unterseiten: Fußball-Übersicht, Mannschaften, Jugend, Verein, Rechtliches
Neue Seiten + Routen: fussball, fussball/{erste-mannschaft,zweite-mannschaft,
damen}, jugendfussball, verein, impressum, datenschutz. Dazu die Komponenten
team, team-cards/-roster/-photo/-bento, faq/faq-contact, key-facts, age-groups,
cta-band, training-location und der contact-slider.
Daten in teams/fussball/jugend/verein.json; club.json um Vorstand, Bankdaten,
Datenschutz-Kontakt erweitert. person-grid bekommt $names-Filter, partner-grid
einen Intro-Stil. Seiten setzen $meta['schema'] via team_/page_schema.
Styles für alle neuen Komponenten in components.css.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KDQZ6FuchNUh2bxSW9PeNv
2026-06-19 08:13:04 +02:00
|
|
|
if (!empty($names)) {
|
|
|
|
|
$persons = array_values(array_filter(
|
|
|
|
|
$persons,
|
|
|
|
|
static fn (array $p): bool => in_array($p['name'] ?? '', $names, true)
|
|
|
|
|
));
|
|
|
|
|
}
|
2026-06-11 22:41:57 +02:00
|
|
|
|
|
|
|
|
if ($persons === []) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
2026-06-11 22:20:14 +02:00
|
|
|
?>
|
2026-06-11 22:41:57 +02:00
|
|
|
<section class="section persons<?= $tinted ? ' section--tinted' : '' ?>" id="<?= e($anchor) ?>">
|
2026-06-11 22:20:14 +02:00
|
|
|
<div class="container">
|
2026-06-11 22:41:57 +02:00
|
|
|
<h2><?= e($title) ?></h2>
|
|
|
|
|
<?php if ($intro !== ''): ?>
|
|
|
|
|
<p class="persons__intro"><?= e($intro) ?></p>
|
2026-06-11 22:20:14 +02:00
|
|
|
<?php endif; ?>
|
2026-06-20 20:49:46 +02:00
|
|
|
<ul class="persons__grid<?= $columns ? ' persons__grid--cols-' . (int)$columns : '' ?>">
|
2026-06-11 22:41:57 +02:00
|
|
|
<?php foreach ($persons as $person): ?>
|
2026-06-11 22:20:14 +02:00
|
|
|
<li>
|
|
|
|
|
<?php component('person-card', ['person' => $person]); ?>
|
|
|
|
|
</li>
|
|
|
|
|
<?php endforeach; ?>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|