From 6689dd30138f320bfb0ea42444f0b5d654c3f940 Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Sun, 14 Jun 2026 23:40:19 +0200 Subject: [PATCH] fix(standorte): fix layout and navigation structure --- app/[locale]/layout.tsx | 11 ++++---- app/[locale]/standorte/[slug]/page.tsx | 38 ++++++++++++++++---------- components/layout/Header.tsx | 12 +++++++- 3 files changed, 40 insertions(+), 21 deletions(-) diff --git a/app/[locale]/layout.tsx b/app/[locale]/layout.tsx index 55283ab4a..550b495ec 100644 --- a/app/[locale]/layout.tsx +++ b/app/[locale]/layout.tsx @@ -92,12 +92,13 @@ export default async function Layout(props: { url: `/${safeLocale}/${await mapFileSlugToTranslated('ueber-uns', safeLocale)}`, children: [ { label: safeLocale === 'de' ? 'Firma' : 'Company', url: `/${safeLocale}/${await mapFileSlugToTranslated('ueber-uns', safeLocale)}` }, - { label: safeLocale === 'de' ? 'Standorte Übersicht' : 'Locations Overview', url: `/${safeLocale}/standorte` }, - { label: 'Standort Guben', url: `/${safeLocale}/standorte/guben` }, - { label: 'Standort Kirchheilingen', url: `/${safeLocale}/standorte/kirchheilingen` }, - { label: 'Standort Bülstedt', url: `/${safeLocale}/standorte/buelstedt` }, { label: safeLocale === 'de' ? 'Unser Team' : 'Our Team', url: `/${safeLocale}/team` }, - { label: safeLocale === 'de' ? 'Zertifikate' : 'Certificates', url: `/${safeLocale}/zertifikate` } + { label: safeLocale === 'de' ? 'Zertifikate' : 'Certificates', url: `/${safeLocale}/zertifikate` }, + { label: safeLocale === 'de' ? 'Standorte' : 'Locations', url: '#', isGroupLabel: true }, + { label: safeLocale === 'de' ? 'Alle Standorte' : 'Locations Overview', url: `/${safeLocale}/standorte` }, + { label: 'Guben (HQ)', url: `/${safeLocale}/standorte/guben` }, + { label: 'Kirchheilingen', url: `/${safeLocale}/standorte/kirchheilingen` }, + { label: 'Bülstedt', url: `/${safeLocale}/standorte/buelstedt` } ] }, { diff --git a/app/[locale]/standorte/[slug]/page.tsx b/app/[locale]/standorte/[slug]/page.tsx index f1f2dff72..ab7f6df22 100644 --- a/app/[locale]/standorte/[slug]/page.tsx +++ b/app/[locale]/standorte/[slug]/page.tsx @@ -1,4 +1,4 @@ -import { Container } from '@/components/ui'; +import { Container, Badge, Heading } from '@/components/ui'; import { getTranslations, setRequestLocale } from 'next-intl/server'; import { Metadata } from 'next'; import { notFound } from 'next/navigation'; @@ -63,21 +63,29 @@ export default async function StandortDetail(props: { params: Promise<{ locale: } return ( -
- - {/* Header Section */} -
-
- - {standort.type === 'hq' ? (safeLocale === 'de' ? 'Hauptsitz' : 'Headquarters') : (safeLocale === 'de' ? 'Niederlassung' : 'Branch')} -
-

- {standort.name} -

-

- {standort.description[safeLocale]} -

+
+ {/* Industrial Hero Section */} +
+
+
+ +
+ + + {standort.type === 'hq' ? (safeLocale === 'de' ? 'Hauptsitz' : 'Headquarters') : (safeLocale === 'de' ? 'Niederlassung' : 'Branch')} + + + {standort.name} + +

+ {standort.description[safeLocale]} +

+
+
+
+ +
{/* Main Content (Images & Description) */} diff --git a/components/layout/Header.tsx b/components/layout/Header.tsx index 75140a047..629fa4f94 100644 --- a/components/layout/Header.tsx +++ b/components/layout/Header.tsx @@ -11,6 +11,7 @@ export interface NavLink { label: string; url: string; children?: NavLink[]; + isGroupLabel?: boolean; } interface HeaderProps { @@ -218,11 +219,20 @@ function NavItem({ link, currentLocale, pathname, isSolidMode }: { link: NavLink {/* Top glowing accent line */}
- {link.children.map((child) => { + {link.children.map((child, idx) => { const childUrl = child.url.startsWith('/') && !child.url.match(/^\/(en|de)/) ? `/${currentLocale}${child.url}` : child.url; const isChildActive = pathname === childUrl; + + if (child.isGroupLabel) { + return ( +
+ {child.label} +
+ ); + } + return (