From 38824cc05483960d3fac838d70b90d234150f690 Mon Sep 17 00:00:00 2001 From: Alexander Bocken Date: Tue, 21 Apr 2026 11:10:03 +0200 Subject: [PATCH] fix(faith): calendar-slug language swap + gate detail to 1962 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - LanguageSelector: add kalender/calendar/calendarium mappings so swapping language from /glaube/kalender/... produces /faith/calendar/... instead of the broken /faith/kalender/... URL. - HeroCard: move margin-bottom off the anchor so the plain (1969) variant keeps the same bottom spacing as the linked (1962) variant. - Calendar overview: omit detail href on 1969 so the hover chevron / hover elevation don't appear when no detail page exists. - Detail route: 404 any /detail/... under the 1969 rite — only 1962 has day-detail pages. --- package.json | 2 +- src/lib/components/LanguageSelector.svelte | 15 ++++++++++++--- .../[calendar=calendarLang]/HeroCard.svelte | 2 +- .../[[dd=calendarDay]]/+page.svelte | 7 ++++++- .../[dd=calendarDay]/+page.server.ts | 1 + 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 131b2252..2eb15575 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "homepage", - "version": "1.40.0", + "version": "1.40.1", "private": true, "type": "module", "scripts": { diff --git a/src/lib/components/LanguageSelector.svelte b/src/lib/components/LanguageSelector.svelte index cb5bf90b..5a76d2a0 100644 --- a/src/lib/components/LanguageSelector.svelte +++ b/src/lib/components/LanguageSelector.svelte @@ -18,9 +18,18 @@ // Faith subroute mappings const faithSubroutes: Record> = { - en: { gebete: 'prayers', rosenkranz: 'rosary', rosarium: 'rosary', orationes: 'prayers' }, - de: { prayers: 'gebete', rosary: 'rosenkranz', rosarium: 'rosenkranz', orationes: 'gebete' }, - la: { prayers: 'orationes', gebete: 'orationes', rosary: 'rosarium', rosenkranz: 'rosarium' } + en: { + gebete: 'prayers', rosenkranz: 'rosary', rosarium: 'rosary', orationes: 'prayers', + kalender: 'calendar', calendarium: 'calendar' + }, + de: { + prayers: 'gebete', rosary: 'rosenkranz', rosarium: 'rosenkranz', orationes: 'gebete', + calendar: 'kalender', calendarium: 'kalender' + }, + la: { + prayers: 'orationes', gebete: 'orationes', rosary: 'rosarium', rosenkranz: 'rosarium', + calendar: 'calendarium', kalender: 'calendarium' + } }; // Whether the current page is a faith route (show LA option) diff --git a/src/routes/[faithLang=faithLang]/[calendar=calendarLang]/HeroCard.svelte b/src/routes/[faithLang=faithLang]/[calendar=calendarLang]/HeroCard.svelte index bb4e2c77..40f57df3 100644 --- a/src/routes/[faithLang=faithLang]/[calendar=calendarLang]/HeroCard.svelte +++ b/src/routes/[faithLang=faithLang]/[calendar=calendarLang]/HeroCard.svelte @@ -105,12 +105,12 @@ display: block; text-decoration: none; color: inherit; - margin-bottom: 1.5rem; } .hero-banner { position: relative; border-radius: var(--radius-card); padding: 2rem 2.2rem 3rem; + margin-bottom: 1.5rem; box-shadow: var(--shadow-md); overflow: hidden; transition: transform var(--transition-normal), box-shadow var(--transition-normal), diff --git a/src/routes/[faithLang=faithLang]/[calendar=calendarLang]/[rite=calendarRite]/[[yyyy=calendarYear]]/[[mm=calendarMonth]]/[[dd=calendarDay]]/+page.svelte b/src/routes/[faithLang=faithLang]/[calendar=calendarLang]/[rite=calendarRite]/[[yyyy=calendarYear]]/[[mm=calendarMonth]]/[[dd=calendarDay]]/+page.svelte index 61330971..77549c8f 100644 --- a/src/routes/[faithLang=faithLang]/[calendar=calendarLang]/[rite=calendarRite]/[[yyyy=calendarYear]]/[[mm=calendarMonth]]/[[dd=calendarDay]]/+page.svelte +++ b/src/routes/[faithLang=faithLang]/[calendar=calendarLang]/[rite=calendarRite]/[[yyyy=calendarYear]]/[[mm=calendarMonth]]/[[dd=calendarDay]]/+page.svelte @@ -206,7 +206,12 @@ {/if} {#if hero} - + {/if} diff --git a/src/routes/[faithLang=faithLang]/[calendar=calendarLang]/[rite=calendarRite]/detail/[yyyy=calendarYear]/[mm=calendarMonth]/[dd=calendarDay]/+page.server.ts b/src/routes/[faithLang=faithLang]/[calendar=calendarLang]/[rite=calendarRite]/detail/[yyyy=calendarYear]/[mm=calendarMonth]/[dd=calendarDay]/+page.server.ts index ef0c9030..94c6b6c5 100644 --- a/src/routes/[faithLang=faithLang]/[calendar=calendarLang]/[rite=calendarRite]/detail/[yyyy=calendarYear]/[mm=calendarMonth]/[dd=calendarDay]/+page.server.ts +++ b/src/routes/[faithLang=faithLang]/[calendar=calendarLang]/[rite=calendarRite]/detail/[yyyy=calendarYear]/[mm=calendarMonth]/[dd=calendarDay]/+page.server.ts @@ -25,6 +25,7 @@ export const load: PageServerLoad = async ({ params, url, locals, fetch }) => { params.faithLang === 'faith' ? 'en' : params.faithLang === 'fides' ? 'la' : 'de'; const rite: Rite = params.rite === '1969' ? '1969' : '1962'; + if (rite !== '1962') await errorWithVerse(fetch, url.pathname, 404, 'Not found'); const dioceseParam = url.searchParams.get('diocese'); const diocese1962: Diocese1962 = isDiocese1962(dioceseParam)