Neubau Fundament + Startseite: Designsystem, PHP-Komponenten, Brevo-Formular, Instagram-Sync
- Ordnerstruktur mit public/-Docroot, Deny-.htaccess für app/bin/config/data/storage
- CLAUDE.md mit Leitplanken (self-hosted only, Single Source of Truth, Component-first)
- Design-Tokens aus alter Seite extrahiert (Akzent #e20612, Coolvetica/Abel als woff2)
- Front Controller mit Routen-Register, Sitemap, Canonical, JSON-LD (SportsClub)
- Startseite: Hero, Instagram-Feed (lokaler Cache), Historie/Sportheim, Stats, Partner, Kontakt
- Kontaktformular via PHPMailer/Brevo mit Honeypot + HMAC-Time-Trap (kein reCAPTCHA)
- bin/instagram-sync.php: Scraper mit Strategie-Kette, flock, atomarem Cache, lokalen Bildern
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 21:16:25 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
// php -S Router-Modus: existierende Dateien (Assets) direkt ausliefern.
|
|
|
|
|
if (PHP_SAPI === 'cli-server') {
|
|
|
|
|
$file = __DIR__ . parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
|
|
|
|
|
if (is_file($file)) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
require dirname(__DIR__) . '/app/bootstrap.php';
|
|
|
|
|
|
|
|
|
|
$path = (string) parse_url($_SERVER['REQUEST_URI'] ?? '/', PHP_URL_PATH);
|
|
|
|
|
|
|
|
|
|
// Kanonisch ohne trailing slash (Root ausgenommen).
|
|
|
|
|
if ($path !== '/' && str_ends_with($path, '/')) {
|
|
|
|
|
$query = $_SERVER['QUERY_STRING'] ?? '';
|
|
|
|
|
header('Location: ' . rtrim($path, '/') . ($query !== '' ? '?' . $query : ''), true, 301);
|
|
|
|
|
exit;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$slug = trim($path, '/');
|
|
|
|
|
|
|
|
|
|
// Formular-Submits.
|
|
|
|
|
if ($_SERVER['REQUEST_METHOD'] === 'POST' && $slug === 'kontakt-senden') {
|
|
|
|
|
require APP_PATH . '/actions/contact-submit.php';
|
|
|
|
|
exit;
|
|
|
|
|
}
|
Neue Seiten: Mitglied/Partner werden, Sportheimbuchung & Ansprechpartner
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
2026-06-19 11:16:10 +02:00
|
|
|
if ($_SERVER['REQUEST_METHOD'] === 'POST' && $slug === 'mitglied-werden-senden') {
|
|
|
|
|
require APP_PATH . '/actions/membership-submit.php';
|
|
|
|
|
exit;
|
|
|
|
|
}
|
Neubau Fundament + Startseite: Designsystem, PHP-Komponenten, Brevo-Formular, Instagram-Sync
- Ordnerstruktur mit public/-Docroot, Deny-.htaccess für app/bin/config/data/storage
- CLAUDE.md mit Leitplanken (self-hosted only, Single Source of Truth, Component-first)
- Design-Tokens aus alter Seite extrahiert (Akzent #e20612, Coolvetica/Abel als woff2)
- Front Controller mit Routen-Register, Sitemap, Canonical, JSON-LD (SportsClub)
- Startseite: Hero, Instagram-Feed (lokaler Cache), Historie/Sportheim, Stats, Partner, Kontakt
- Kontaktformular via PHPMailer/Brevo mit Honeypot + HMAC-Time-Trap (kein reCAPTCHA)
- bin/instagram-sync.php: Scraper mit Strategie-Kette, flock, atomarem Cache, lokalen Bildern
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 21:16:25 +02:00
|
|
|
|
|
|
|
|
$routes = require APP_PATH . '/routes.php';
|
|
|
|
|
|
|
|
|
|
// Sitemap aus dem Routen-Register generieren.
|
|
|
|
|
if ($slug === 'sitemap.xml') {
|
|
|
|
|
header('Content-Type: application/xml; charset=utf-8');
|
|
|
|
|
echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
|
|
|
|
|
echo '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' . "\n";
|
|
|
|
|
foreach ($routes as $routeSlug => $route) {
|
|
|
|
|
if (empty($route['sitemap'])) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
$lastmod = date('Y-m-d', (int) filemtime(APP_PATH . '/pages/' . $route['file']));
|
|
|
|
|
echo " <url><loc>" . e(abs_url($routeSlug)) . "</loc><lastmod>{$lastmod}</lastmod></url>\n";
|
|
|
|
|
}
|
|
|
|
|
echo '</urlset>';
|
|
|
|
|
exit;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (isset($routes[$slug]) && $slug !== '404') {
|
|
|
|
|
$current = $slug;
|
|
|
|
|
} else {
|
|
|
|
|
http_response_code(404);
|
|
|
|
|
$current = '404';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[$meta, $content] = render_page(APP_PATH . '/pages/' . $routes[$current]['file']);
|
|
|
|
|
|
|
|
|
|
require APP_PATH . '/layout.php';
|