diff --git a/app/components/footer.php b/app/components/footer.php index 437c04d..5b2afd9 100644 --- a/app/components/footer.php +++ b/app/components/footer.php @@ -13,10 +13,20 @@ $nav = json_load('navigation'); $socialLabels = ['instagram' => 'Instagram', 'facebook' => 'Facebook', 'youtube' => 'YouTube']; $socialIcons = ['instagram' => 'instagram', 'facebook' => 'facebook', 'youtube' => 'youtube']; -$footerNav = array_merge( - array_filter($nav['main'], static fn (array $item): bool => !str_starts_with($item['slug'], '#')), - $nav['ctas'] ?? [] -); +// Hauptnav flach ausrollen (Unterpunkte wie Matchcenter einreihen), Anker-Links raus. +$footerNav = []; +foreach ($nav['main'] as $item) { + if (str_starts_with($item['slug'], '#')) { + continue; + } + $footerNav[] = ['label' => $item['label'], 'slug' => $item['slug']]; + foreach ($item['children'] ?? [] as $child) { + if ($child['slug'] !== $item['slug']) { // „Übersicht“ dupliziert nur den Eltern-Slug + $footerNav[] = $child; + } + } +} +$footerNav = array_merge($footerNav, $nav['ctas'] ?? []); ?>