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
This commit is contained in:
41
app/components/key-facts.php
Normal file
41
app/components/key-facts.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* Kompakte Faktenleiste (Icon + Label + Wert). Props:
|
||||
* $facts array [{icon, label, value}, …] — Einträge mit leerem 'value' werden übersprungen.
|
||||
* $anchor string (optional) — Sektions-ID.
|
||||
* $tinted bool (optional, Default false) — aufgehelltes Band.
|
||||
* GEO/SEO: kompakte, zitierfähige Fakten. Rendert nichts, wenn keine Werte vorliegen.
|
||||
*/
|
||||
$anchor = $anchor ?? null;
|
||||
$tinted = $tinted ?? false;
|
||||
|
||||
$facts = array_values(array_filter(
|
||||
$facts ?? [],
|
||||
static fn (array $f): bool => isset($f['value']) && $f['value'] !== ''
|
||||
));
|
||||
if ($facts === []) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<section class="section key-facts<?= $tinted ? ' section--tinted' : '' ?>"<?= $anchor ? ' id="' . e($anchor) . '"' : '' ?>>
|
||||
<div class="container">
|
||||
<ul class="key-facts__grid">
|
||||
<?php foreach ($facts as $fact): ?>
|
||||
<li class="key-facts__item">
|
||||
<?php if (!empty($fact['icon'])): ?>
|
||||
<span class="key-facts__icon"><?= icon($fact['icon']) ?></span>
|
||||
<?php endif; ?>
|
||||
<span class="key-facts__text">
|
||||
<?php if (!empty($fact['label'])): ?>
|
||||
<span class="key-facts__label"><?= e($fact['label']) ?></span>
|
||||
<?php endif; ?>
|
||||
<span class="key-facts__value"><?= e($fact['value']) ?></span>
|
||||
</span>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
Reference in New Issue
Block a user