|null $openGraph OG meta map: ogTitle, ogDescription, ogImage, ogUrl * @var string|null $structuredData JSON-LD blob * @var string|null $extraCss Optional inline CSS */ use App\Core\I18n; use App\Core\Locale; $currentPath = parse_url($_SERVER['REQUEST_URI'] ?? '/', PHP_URL_PATH) ?: '/'; $ogLocale = Locale::toOgLocale($locale); $title = $pageTitle ?? I18n::t('site.title', [], $locale); $description = $pageDescription ?? I18n::t('site.description', [], $locale); $canonicalBase = I18n::t('site.canonical_base', [], $locale); $canonical = $canonical ?? $canonicalBase . ($currentPath === '/' ? '/' : $currentPath); $siteName = I18n::t('site.name', [], $locale); $ogTitle = $openGraph['ogTitle'] ?? $title; $ogDescription = $openGraph['ogDescription'] ?? $description; $ogImage = $openGraph['ogImage'] ?? 'https://haus-schleusingen.de/bilder/Außenansicht-2.png'; $ogUrl = $openGraph['ogUrl'] ?? $canonical; $hreflangs = Locale::hreflangAlternates($currentPath === '/' ? '/' : $currentPath, $canonicalBase); $homeUrl = $canonicalBase . '/'; $isHome = $currentPath === '/' || $currentPath === ''; $isImpr = $currentPath === '/impressum'; $isPriv = $currentPath === '/datenschutz'; $navItems = [ ['href' => '/#galerie', 'label' => 'nav.gallery', 'active' => false], ['href' => '/#grundriss','label' => 'nav.layout', 'active' => false], ['href' => '/#miete', 'label' => 'nav.rent', 'active' => false], ['href' => '/#lage', 'label' => 'nav.location', 'active' => false], ]; ?>