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
36 lines
1.2 KiB
PHP
36 lines
1.2 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* FAQ-Accordion. Props:
|
|
* $faq array [{q, a}, …]
|
|
* $title string (optional, Default 'Häufige Fragen')
|
|
* $anchor string (optional, Default 'faq')
|
|
* Natives <details>/<summary> → ohne JS bedienbar. Das FAQPage-Schema liefert
|
|
* die Seite über $meta['schema'] (helpers: faq_schema/team_schema), nicht diese Komponente.
|
|
*/
|
|
$title = $title ?? 'Häufige Fragen';
|
|
$anchor = $anchor ?? 'faq';
|
|
$faq = array_values(array_filter(
|
|
$faq ?? [],
|
|
static fn (array $i): bool => !empty($i['q']) && !empty($i['a'])
|
|
));
|
|
if ($faq === []) {
|
|
return;
|
|
}
|
|
?>
|
|
<section class="section faq" id="<?= e($anchor) ?>">
|
|
<div class="container faq__inner">
|
|
<h2><?= e($title) ?></h2>
|
|
<div class="faq__list">
|
|
<?php foreach ($faq as $item): ?>
|
|
<details class="faq__item">
|
|
<summary class="faq__q"><span><?= e($item['q']) ?></span><?= icon('chevron-down', 'faq__chevron') ?></summary>
|
|
<div class="faq__a"><p><?= e($item['a']) ?></p></div>
|
|
</details>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
</div>
|
|
</section>
|