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>
This commit is contained in:
33
app/components/nav.php
Normal file
33
app/components/nav.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* Hauptnavigation aus data/navigation.json. Props: $current (Slug).
|
||||
* Burger-Toggle übernimmt assets/js/nav.js (aria-expanded/aria-controls).
|
||||
*/
|
||||
$nav = json_load('navigation');
|
||||
|
||||
$href = static function (string $slug): string {
|
||||
// Anker-Slugs ("#aktuelles") zeigen auf Startseiten-Sektionen.
|
||||
return str_starts_with($slug, '#') ? url() . $slug : url($slug);
|
||||
};
|
||||
?>
|
||||
<nav class="site-nav" aria-label="Hauptnavigation">
|
||||
<button class="site-nav__toggle" type="button" aria-expanded="false" aria-controls="site-nav-list">
|
||||
<span class="site-nav__toggle-bar" aria-hidden="true"></span>
|
||||
<span class="visually-hidden">Menü öffnen</span>
|
||||
</button>
|
||||
<ul class="site-nav__list" id="site-nav-list">
|
||||
<?php foreach ($nav['main'] as $item): ?>
|
||||
<li>
|
||||
<a href="<?= e($href($item['slug'])) ?>"<?= $item['slug'] === $current ? ' aria-current="page"' : '' ?>><?= e($item['label']) ?></a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php if (!empty($nav['cta'])): ?>
|
||||
<li>
|
||||
<a class="btn" href="<?= e($href($nav['cta']['slug'])) ?>"><?= e($nav['cta']['label']) ?></a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</nav>
|
||||
Reference in New Issue
Block a user