From ee4dad2a5f269f1678b088b1ad583cddb3ace0e8 Mon Sep 17 00:00:00 2001 From: Felix Schneider Date: Thu, 11 Jun 2026 22:53:34 +0200 Subject: [PATCH] Historie-Hero: Originaltext + Original-Hero-Bild der alten Seite (img-Komponente um Einzeldatei-Modus erweitert) Co-Authored-By: Claude Fable 5 --- app/components/img.php | 13 +++++++++++-- app/pages/historie.php | 5 ----- data/historie.json | 12 ++++++------ 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/app/components/img.php b/app/components/img.php index 6f717dc..180477d 100644 --- a/app/components/img.php +++ b/app/components/img.php @@ -3,8 +3,9 @@ declare(strict_types=1); /** - * Responsives Bild aus Varianten-Set. Props: - * $image array{base: string, widths: int[], alt: string} — base relativ zu assets/, Dateien: -.jpg + * Responsives Bild aus Varianten-Set ODER Einzeldatei. Props: + * $image array{base: string, widths: int[], alt: string} — Varianten -.jpg + * ODER array{src: string, width: int, height: int, alt: string} — Originaldatei 1:1 * $sizes string (optional, default '100vw') * $eager bool (optional) — above the fold: eager + fetchpriority high * $class string (optional) @@ -13,6 +14,14 @@ $sizes = $sizes ?? '100vw'; $eager = $eager ?? false; $class = $class ?? ''; +if (!empty($image['src'])): ?> + + src="" + alt="" + width="" height="" + > + $historie['hero']]); -?> -
-

-
- $historie['events']]); diff --git a/data/historie.json b/data/historie.json index a31e260..5b31979 100644 --- a/data/historie.json +++ b/data/historie.json @@ -2,15 +2,15 @@ "hero": { "align": "center", "compact": true, - "title": "Vereinshistorie", - "tagline": "Der Katzbachtaler Weg seit 1908", + "title": "Historie", + "text": "Wir sind seit über 100 Jahren dein Sportverein in der Kulmbacher Region. Erlebe unsere einzigartige Geschichte und die Entstehung der Hans-Rausch-Sportanlage.", "image": { - "base": "img/pages/vereinsgelaende", - "widths": [1000, 1600], - "alt": "Luftaufnahme der Hans-Rausch-Sportanlage im Katzbachtal" + "src": "img/historie/1972-sportheim.jpg", + "width": 519, + "height": 272, + "alt": "Einweihung des Sportheims im Katzbachtal 1972" } }, - "intro": "Erlebe die bewegte Geschichte des TSV 08 Kulmbach – von den ersten Spielen an der Bayreuther Straße bis zur Hans-Rausch-Sportanlage im Katzbachtal.", "events": [ { "year": "1947",