feat(app): layout-header lokalisiert + sprach-switcher eingebunden
This commit is contained in:
parent
617b3dfccc
commit
d256670b56
|
|
@ -2,8 +2,12 @@
|
||||||
import { onMount } from 'svelte';
|
import { onMount } from 'svelte';
|
||||||
import { page } from '$app/state';
|
import { page } from '$app/state';
|
||||||
import { bootstrapReadRelays } from '$lib/stores/readRelays';
|
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';
|
import CcZeroBadge from '$lib/components/CcZeroBadge.svelte';
|
||||||
|
|
||||||
|
initI18n();
|
||||||
|
|
||||||
let { children } = $props();
|
let { children } = $props();
|
||||||
|
|
||||||
// Normalisierter pfad ohne trailing slash für aktiv-erkennung ("/" bleibt "/")
|
// Normalisierter pfad ohne trailing slash für aktiv-erkennung ("/" bleibt "/")
|
||||||
|
|
@ -23,11 +27,12 @@
|
||||||
|
|
||||||
<header class="site-header">
|
<header class="site-header">
|
||||||
<div class="header-inner">
|
<div class="header-inner">
|
||||||
<a href="/" class="brand" aria-label="Zur Startseite">Jörg Lohrer</a>
|
<a href="/" class="brand" aria-label={$t('nav.brand_aria')}>Jörg Lohrer</a>
|
||||||
<nav aria-label="Hauptnavigation">
|
<nav aria-label={$t('nav.brand_aria')}>
|
||||||
<a href="/" class:active={isActive('/')}>Home</a>
|
<a href="/" class:active={isActive('/')}>{$t('nav.home')}</a>
|
||||||
<a href="/archiv/" class:active={isActive('/archiv/')}>Archiv</a>
|
<a href="/archiv/" class:active={isActive('/archiv/')}>{$t('nav.archive')}</a>
|
||||||
<a href="/impressum/" class:active={isActive('/impressum/')}>Impressum</a>
|
<a href="/impressum/" class:active={isActive('/impressum/')}>{$t('nav.imprint')}</a>
|
||||||
|
<LanguageSwitcher />
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
@ -52,7 +57,7 @@
|
||||||
Jörg Lohrer
|
Jörg Lohrer
|
||||||
</span>
|
</span>
|
||||||
<span class="footer-sep">·</span>
|
<span class="footer-sep">·</span>
|
||||||
<a href="/impressum/">Impressum</a>
|
<a href="/impressum/">{$t('nav.imprint')}</a>
|
||||||
<span class="footer-sep">·</span>
|
<span class="footer-sep">·</span>
|
||||||
<a
|
<a
|
||||||
href="https://github.com/joerglohrer/joerglohrerde"
|
href="https://github.com/joerglohrer/joerglohrerde"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue