Header-Navigation: Logo links, Nav-Punkte zentriert (3-Spalten-Grid), CTAs rechts (Kontakt outline + Mitglied werden), responsiv: Burger + Overlay-CTAs unter 600px
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,7 @@ declare(strict_types=1);
|
||||
* Seitenkopf mit Logo und Navigation. Props: $current (Slug).
|
||||
*/
|
||||
$club = json_load('club');
|
||||
$nav = json_load('navigation');
|
||||
?>
|
||||
<header class="site-header">
|
||||
<div class="container site-header__inner">
|
||||
@@ -13,5 +14,12 @@ $club = json_load('club');
|
||||
<img class="site-header__logo" src="<?= e(asset('img/logo.svg')) ?>" alt="" width="75" height="97">
|
||||
</a>
|
||||
<?php component('nav', ['current' => $current]); ?>
|
||||
<?php if (!empty($nav['ctas'])): ?>
|
||||
<div class="site-header__actions">
|
||||
<?php foreach ($nav['ctas'] as $cta): ?>
|
||||
<?php component('cta', ['cta' => $cta]); ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
@@ -24,10 +24,10 @@ $href = static function (string $slug): string {
|
||||
<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>
|
||||
<?php foreach ($nav['ctas'] ?? [] as $cta): ?>
|
||||
<li class="site-nav__cta">
|
||||
<?php component('cta', ['cta' => $cta]); ?>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
Reference in New Issue
Block a user