feat(app): layout-header lokalisiert + sprach-switcher eingebunden

This commit is contained in:
Jörg Lohrer 2026-04-21 14:00:26 +02:00
parent 617b3dfccc
commit d256670b56
1 changed files with 11 additions and 6 deletions

View File

@ -2,8 +2,12 @@
import { onMount } from 'svelte';
import { page } from '$app/state';
import { bootstrapReadRelays } from '$lib/stores/readRelays';
import { initI18n, t } from '$lib/i18n';
import LanguageSwitcher from '$lib/components/LanguageSwitcher.svelte';
import CcZeroBadge from '$lib/components/CcZeroBadge.svelte';
initI18n();
let { children } = $props();
// Normalisierter pfad ohne trailing slash für aktiv-erkennung ("/" bleibt "/")
@ -23,11 +27,12 @@
<header class="site-header">
<div class="header-inner">
<a href="/" class="brand" aria-label="Zur Startseite">Jörg Lohrer</a>
<nav aria-label="Hauptnavigation">
<a href="/" class:active={isActive('/')}>Home</a>
<a href="/archiv/" class:active={isActive('/archiv/')}>Archiv</a>
<a href="/impressum/" class:active={isActive('/impressum/')}>Impressum</a>
<a href="/" class="brand" aria-label={$t('nav.brand_aria')}>Jörg Lohrer</a>
<nav aria-label={$t('nav.brand_aria')}>
<a href="/" class:active={isActive('/')}>{$t('nav.home')}</a>
<a href="/archiv/" class:active={isActive('/archiv/')}>{$t('nav.archive')}</a>
<a href="/impressum/" class:active={isActive('/impressum/')}>{$t('nav.imprint')}</a>
<LanguageSwitcher />
</nav>
</div>
</header>
@ -52,7 +57,7 @@
Jörg Lohrer
</span>
<span class="footer-sep">·</span>
<a href="/impressum/">Impressum</a>
<a href="/impressum/">{$t('nav.imprint')}</a>
<span class="footer-sep">·</span>
<a
href="https://github.com/joerglohrer/joerglohrerde"