fix(faith): calendar-slug language swap + gate detail to 1962

- 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.
This commit is contained in:
2026-04-21 11:10:03 +02:00
parent 57cd16085c
commit 38824cc054
5 changed files with 21 additions and 6 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "homepage",
"version": "1.40.0",
"version": "1.40.1",
"private": true,
"type": "module",
"scripts": {
+12 -3
View File
@@ -18,9 +18,18 @@
// Faith subroute mappings
const faithSubroutes: Record<string, Record<string, string>> = {
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)
@@ -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),
@@ -206,7 +206,12 @@
</aside>
{/if}
{#if hero}
<HeroCard day={hero} {lang} {todayIso} href={detailHref(hero.iso)} />
<HeroCard
day={hero}
{lang}
{todayIso}
href={rite === '1962' ? detailHref(hero.iso) : undefined}
/>
{/if}
<!-- Color legend + view switcher -->
@@ -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)