feat: add Latin language notice and German link on catechesis pages

Show language-appropriate notice for non-German users with an
underlined link to the German version of the same page.
This commit is contained in:
2026-04-06 00:01:55 +02:00
parent 8f31cf94a8
commit c5d54acd0d
3 changed files with 17 additions and 7 deletions
@@ -2,7 +2,8 @@
import { ArrowDown, ArrowLeft } from 'lucide-svelte';
import { page } from '$app/stores';
let expanded = $state(null);
const isEnglish = $derived($page.url.pathname.startsWith('/faith'));
const isGerman = $derived($page.url.pathname.startsWith('/glaube'));
const isLatin = $derived($page.url.pathname.startsWith('/fides'));
function toggle(id) {
expanded = expanded === id ? null : id;
@@ -58,8 +59,8 @@
<p class="subtitle">Glaubenskurs, 3. Hauptteil &mdash; P. Martin Ramm FSSP</p>
</header>
{#if isEnglish}
<p class="lang-notice">This catechesis is only available in German.</p>
{#if !isGerman}
<p class="lang-notice">{isLatin ? 'Haec catechesis tantum in ' : 'This catechesis is only available in '}<a href="/glaube/katechese/zehn-gebote">{isLatin ? 'lingua Germanica' : 'German'}</a>{isLatin ? ' praesto est.' : '.'}</p>
{/if}
<section id="ursprung">
@@ -302,6 +303,10 @@
font-size: 0.85rem;
margin-bottom: 1rem;
}
.lang-notice a {
color: var(--nord10);
text-decoration: underline;
}
.disclaimer {
text-align: center;
color: var(--color-text-tertiary);