From 601e2f6513424e511336a01c863974f2a6a530b4 Mon Sep 17 00:00:00 2001 From: Alexander Bocken Date: Fri, 13 Feb 2026 14:52:40 +0100 Subject: [PATCH] prayers: add 5 new prayers, move Angelus route, liturgical seasons Add Guardian Angel, Apostles' Creed, Tantum Ergo, Angelus, and Regina Caeli to the prayers collection. Move standalone Angelus route into the prayers system with a 301 redirect from the old path. Extract Easter computation into shared utility ($lib/js/easter.svelte.ts) and use it for liturgical season awareness: during Eastertide the rosary defaults to Glorious mysteries and swaps Salve Regina for Regina Caeli; during Lent it defaults to Sorrowful mysteries. Seasonal badges shown on both the mystery selector and prayer sections. --- src/lib/components/LanguageSelector.svelte | 4 +- .../components/faith/prayers/Angelus.svelte | 86 +++++++ .../faith/prayers/ApostlesCreed.svelte | 68 +++++ .../faith/prayers/GuardianAngel.svelte | 25 ++ .../faith/prayers/ReginaCaeli.svelte | 46 ++++ .../faith/prayers/TantumErgo.svelte | 48 ++++ src/lib/js/easter.svelte.ts | 56 ++++ .../[faithLang=faithLang]/+layout.svelte | 2 +- src/routes/[faithLang=faithLang]/+page.svelte | 2 +- .../[prayers=prayersLang]/+page.server.ts | 8 +- .../[prayers=prayersLang]/+page.svelte | 240 ++++++++++++++++-- .../[prayer]/+page.server.ts | 13 +- .../[prayer]/+page.svelte | 43 +++- .../[rosary=rosaryLang]/+page.server.ts | 13 +- .../[rosary=rosaryLang]/+page.svelte | 35 ++- .../MysterySelector.svelte | 64 ++++- .../[rosary=rosaryLang]/rosaryData.js | 4 +- .../angelus/+page.server.ts | 13 +- .../angelus/+page.svelte | 236 ----------------- 19 files changed, 711 insertions(+), 295 deletions(-) create mode 100644 src/lib/components/faith/prayers/Angelus.svelte create mode 100644 src/lib/components/faith/prayers/ApostlesCreed.svelte create mode 100644 src/lib/components/faith/prayers/GuardianAngel.svelte create mode 100644 src/lib/components/faith/prayers/ReginaCaeli.svelte create mode 100644 src/lib/components/faith/prayers/TantumErgo.svelte create mode 100644 src/lib/js/easter.svelte.ts delete mode 100644 src/routes/[faithLang=faithLang]/angelus/+page.svelte diff --git a/src/lib/components/LanguageSelector.svelte b/src/lib/components/LanguageSelector.svelte index 82abaf7..a8cbe81 100644 --- a/src/lib/components/LanguageSelector.svelte +++ b/src/lib/components/LanguageSelector.svelte @@ -16,8 +16,8 @@ // Faith subroute mappings const faithSubroutes: Record> = { - en: { gebete: 'prayers', rosenkranz: 'rosary', angelus: 'angelus' }, - de: { prayers: 'gebete', rosary: 'rosenkranz', angelus: 'angelus' } + en: { gebete: 'prayers', rosenkranz: 'rosary' }, + de: { prayers: 'gebete', rosary: 'rosenkranz' } }; $effect(() => { diff --git a/src/lib/components/faith/prayers/Angelus.svelte b/src/lib/components/faith/prayers/Angelus.svelte new file mode 100644 index 0000000..0533f4c --- /dev/null +++ b/src/lib/components/faith/prayers/Angelus.svelte @@ -0,0 +1,86 @@ + + + + {#snippet children(showLatin, urlLang)} +

+ {#if showLatin}℣. Ángelus Dómini nuntiávit Maríæ.{/if} + {#if urlLang === 'de'}℣. Der Engel des Herrn brachte Maria die Botschaft{/if} + {#if urlLang === 'en'}℣. The Angel of the Lord declared unto Mary.{/if} + {#if showLatin}℟. Et concépit de Spíritu Sancto.{/if} + {#if urlLang === 'de'}℟. und sie empfing vom Heiligen Geist.{/if} + {#if urlLang === 'en'}℟. And she conceived of the Holy Spirit.{/if} +

+ {/snippet} +
+ + + + + {#snippet children(showLatin, urlLang)} +

+ {#if showLatin}℣. Ecce ancílla Dómini,{/if} + {#if urlLang === 'de'}℣. Maria sprach: Siehe, ich bin die Magd des Herrn{/if} + {#if urlLang === 'en'}℣. Behold the handmaid of the Lord.{/if} + {#if showLatin}℟. Fiat mihi secúndum verbum tuum.{/if} + {#if urlLang === 'de'}℟. mir geschehe nach Deinem Wort.{/if} + {#if urlLang === 'en'}℟. Be it done unto me according to thy word.{/if} +

+ {/snippet} +
+ + + + + {#snippet children(showLatin, urlLang)} +

+ {#if showLatin}℣. Et Verbum caro factum est,{/if} + {#if urlLang === 'de'}℣. Und das Wort ist Fleisch geworden{/if} + {#if urlLang === 'en'}℣. And the Word was made flesh.{/if} + {#if showLatin}℟. Et habitávit in nobis.{/if} + {#if urlLang === 'de'}℟. und hat unter uns gewohnt.{/if} + {#if urlLang === 'en'}℟. And dwelt among us.{/if} +

+ {/snippet} +
+ + + + + {#snippet children(showLatin, urlLang)} +

+ {#if showLatin}℣. Ora pro nobis, sancta Dei Génetrix,{/if} + {#if urlLang === 'de'}℣. Bitte für uns, heilige Gottesmutter,{/if} + {#if urlLang === 'en'}℣. Pray for us, O holy Mother of God.{/if} + {#if showLatin}℟. Ut digni efficiámur promissiónibus Christi.{/if} + {#if urlLang === 'de'}℟. auf dass wir würdig werden der Verheissungen Christi.{/if} + {#if urlLang === 'en'}℟. That we may be made worthy of the promises of Christ.{/if} +

+ {/snippet} +
+ + + {#snippet children(showLatin, urlLang)} +

+ {#if showLatin}℣. Orémus.{/if} + {#if urlLang === 'de'}℣. Lasset uns beten.{/if} + {#if urlLang === 'en'}℣. Let us pray:{/if} +

+

+ {#if showLatin}Grátiam tuam, quǽsumus, Dómine, méntibus nostris infúnde;{/if} + {#if urlLang === 'de'}Allmächtiger Gott, giesse deine Gnade in unsere Herzen ein.{/if} + {#if urlLang === 'en'}Pour forth, we beseech Thee, O Lord, Thy grace into our hearts,{/if} + {#if showLatin}ut qui, Ángelo nuntiánte, Christi Fílii tui incarnatiónem cognóvimus,{/if} + {#if urlLang === 'de'}Durch die Botschaft des Engels haben wir die Menschwerdung Christi, deines Sohnes, erkannt.{/if} + {#if urlLang === 'en'}that we to whom the Incarnation of Christ Thy Son was made known by the message of an angel,{/if} + {#if showLatin}per passiónem eius et crucem ad resurrectiónis glóriam perducámur.{/if} + {#if urlLang === 'de'}Lass uns durch sein Leiden und Kreuz zur Herrlichkeit der Auferstehung gelangen.{/if} + {#if urlLang === 'en'}may by His Passion and Cross be brought to the glory of His Resurrection.{/if} + {#if showLatin}Per eúmdem Christum Dóminum nostrum. Amen.{/if} + {#if urlLang === 'de'}Darum bitten wir durch Christus, unseren Herrn. Amen.{/if} + {#if urlLang === 'en'}Through the same Christ Our Lord. Amen.{/if} +

+ {/snippet} +
diff --git a/src/lib/components/faith/prayers/ApostlesCreed.svelte b/src/lib/components/faith/prayers/ApostlesCreed.svelte new file mode 100644 index 0000000..d7d1d16 --- /dev/null +++ b/src/lib/components/faith/prayers/ApostlesCreed.svelte @@ -0,0 +1,68 @@ + + + + {#snippet children(showLatin, urlLang)} +

+ {#if showLatin}Credo in Deum Patrem omnipoténtem,{/if} + {#if urlLang === 'de'}Ich glaube an Gott, den Vater, den Allmächtigen,{/if} + {#if urlLang === 'en'}I believe in God, the Father almighty,{/if} + {#if showLatin}Creatórem cæli et terræ.{/if} + {#if urlLang === 'de'}den Schöpfer des Himmels und der Erde.{/if} + {#if urlLang === 'en'}Creator of heaven and earth.{/if} +

+

+ {#if showLatin}Et in Iesum Christum, Fílium eius únicum, Dóminum nostrum,{/if} + {#if urlLang === 'de'}Und an Jesus Christus, seinen eingeborenen Sohn, unsern Herrn,{/if} + {#if urlLang === 'en'}And in Jesus Christ, His only Son, our Lord,{/if} + {#if showLatin}qui concéptus est de Spíritu Sancto,{/if} + {#if urlLang === 'de'}der empfangen ist vom Heiligen Geist,{/if} + {#if urlLang === 'en'}who was conceived by the Holy Spirit,{/if} + {#if showLatin}natus ex María Vírgine,{/if} + {#if urlLang === 'de'}geboren von der Jungfrau Maria,{/if} + {#if urlLang === 'en'}born of the Virgin Mary,{/if} + {#if showLatin}passus sub Póntio Piláto,{/if} + {#if urlLang === 'de'}gelitten unter Pontius Pilatus,{/if} + {#if urlLang === 'en'}suffered under Pontius Pilate,{/if} + {#if showLatin}crucifíxus, mórtuus, et sepúltus,{/if} + {#if urlLang === 'de'}gekreuzigt, gestorben und begraben,{/if} + {#if urlLang === 'en'}was crucified, died, and was buried.{/if} + {#if showLatin}descéndit ad ínferos,{/if} + {#if urlLang === 'de'}hinabgestiegen in das Reich des Todes,{/if} + {#if urlLang === 'en'}He descended into hell.{/if} + {#if showLatin}tértia die resurréxit a mórtuis,{/if} + {#if urlLang === 'de'}am dritten Tage auferstanden von den Toten,{/if} + {#if urlLang === 'en'}On the third day He rose again from the dead.{/if} + {#if showLatin}ascéndit ad cælos,{/if} + {#if urlLang === 'de'}aufgefahren in den Himmel,{/if} + {#if urlLang === 'en'}He ascended into heaven,{/if} + {#if showLatin}sedet ad déxteram Dei Patris omnipoténtis,{/if} + {#if urlLang === 'de'}er sitzet zur Rechten Gottes, des allmächtigen Vaters;{/if} + {#if urlLang === 'en'}and sits at the right hand of God the Father almighty.{/if} + {#if showLatin}inde ventúrus est iudicáre vivos et mórtuos.{/if} + {#if urlLang === 'de'}von dort wird er kommen, zu richten die Lebenden und die Toten.{/if} + {#if urlLang === 'en'}From thence He shall come to judge the living and the dead.{/if} +

+

+ {#if showLatin}Credo in Spíritum Sanctum,{/if} + {#if urlLang === 'de'}Ich glaube an den Heiligen Geist,{/if} + {#if urlLang === 'en'}I believe in the Holy Spirit,{/if} + {#if showLatin}sanctam Ecclésiam cathólicam,{/if} + {#if urlLang === 'de'}die heilige katholische Kirche,{/if} + {#if urlLang === 'en'}the holy catholic Church,{/if} + {#if showLatin}sanctórum communiónem,{/if} + {#if urlLang === 'de'}Gemeinschaft der Heiligen,{/if} + {#if urlLang === 'en'}the communion of saints,{/if} + {#if showLatin}remissiónem peccatórum,{/if} + {#if urlLang === 'de'}Vergebung der Sünden,{/if} + {#if urlLang === 'en'}the forgiveness of sins,{/if} + {#if showLatin}carnis resurrectiónem,{/if} + {#if urlLang === 'de'}Auferstehung der Toten{/if} + {#if urlLang === 'en'}the resurrection of the body,{/if} + {#if showLatin}vitam ætérnam. Amen.{/if} + {#if urlLang === 'de'}und das ewige Leben. Amen.{/if} + {#if urlLang === 'en'}and life everlasting. Amen.{/if} +

+ {/snippet} +
diff --git a/src/lib/components/faith/prayers/GuardianAngel.svelte b/src/lib/components/faith/prayers/GuardianAngel.svelte new file mode 100644 index 0000000..0ee5923 --- /dev/null +++ b/src/lib/components/faith/prayers/GuardianAngel.svelte @@ -0,0 +1,25 @@ + + + + {#snippet children(showLatin, urlLang)} +

+ {#if showLatin}Ángele Dei,{/if} + {#if urlLang === 'de'}Engel Gottes,{/if} + {#if urlLang === 'en'}Angel of God,{/if} + {#if showLatin}qui custos es mei,{/if} + {#if urlLang === 'de'}mein Beschützer,{/if} + {#if urlLang === 'en'}my guardian dear,{/if} + {#if showLatin}me, tibi commíssum pietáte supérna,{/if} + {#if urlLang === 'de'}dir hat Gottes Vorsehung mich anvertraut;{/if} + {#if urlLang === 'en'}to whom God's love commits me here,{/if} + {#if showLatin}illúmina, custódi, rege et gubérna.{/if} + {#if urlLang === 'de'}erleuchte, beschütze, leite und führe mich.{/if} + {#if urlLang === 'en'}ever this day be at my side, to light and guard, to rule and guide.{/if} + {#if showLatin}Amen.{/if} + {#if urlLang === 'de'}Amen.{/if} + {#if urlLang === 'en'}Amen.{/if} +

+ {/snippet} +
diff --git a/src/lib/components/faith/prayers/ReginaCaeli.svelte b/src/lib/components/faith/prayers/ReginaCaeli.svelte new file mode 100644 index 0000000..2e6ed7c --- /dev/null +++ b/src/lib/components/faith/prayers/ReginaCaeli.svelte @@ -0,0 +1,46 @@ + + + + {#snippet children(showLatin, urlLang)} +

+ {#if showLatin}Regína Cæli, lætáre, allelúia.{/if} + {#if urlLang === 'de'}Freu dich, du Himmelskönigin, alleluja.{/if} + {#if urlLang === 'en'}Queen of Heaven, rejoice, alleluia.{/if} + {#if showLatin}Quia quem meruísti portáre, allelúia.{/if} + {#if urlLang === 'de'}Den du zu tragen würdig warst, alleluja.{/if} + {#if urlLang === 'en'}For He whom thou didst merit to bear, alleluia.{/if} + {#if showLatin}Resurréxit, sicut dixit, allelúia.{/if} + {#if urlLang === 'de'}Er ist auferstanden, wie er gesagt hat, alleluja.{/if} + {#if urlLang === 'en'}Has risen, as He said, alleluia.{/if} + {#if showLatin}Ora pro nobis Deum, allelúia.{/if} + {#if urlLang === 'de'}Bitt Gott für uns, alleluja.{/if} + {#if urlLang === 'en'}Pray for us to God, alleluia.{/if} +

+

+ {#if showLatin}℣. Gaude et lætáre, Virgo María, allelúia.{/if} + {#if urlLang === 'de'}℣. Freu dich und frohlocke, Jungfrau Maria, alleluja.{/if} + {#if urlLang === 'en'}℣. Rejoice and be glad, O Virgin Mary, alleluia.{/if} + {#if showLatin}℟. Quia surréxit Dóminus vere, allelúia.{/if} + {#if urlLang === 'de'}℟. Denn der Herr ist wahrhaft auferstanden, alleluja.{/if} + {#if urlLang === 'en'}℟. For the Lord has truly risen, alleluia.{/if} +

+

+ {#if showLatin}℣. Orémus.{/if} + {#if urlLang === 'de'}℣. Lasset uns beten.{/if} + {#if urlLang === 'en'}℣. Let us pray:{/if} +

+

+ {#if showLatin}Deus, qui per resurrectiónem Fílii tui Dómini nostri Iesu Christi mundum lætificáre dignátus es,{/if} + {#if urlLang === 'de'}O Gott, der du durch die Auferstehung deines Sohnes, unseres Herrn Jesus Christus, die Welt zu erfreuen dich gewürdigt hast,{/if} + {#if urlLang === 'en'}O God, who through the resurrection of Thy Son our Lord Jesus Christ didst vouchsafe to give joy to the world,{/if} + {#if showLatin}præsta, quǽsumus, ut per eius Genetrícem Vírginem Maríam perpétuæ capiámus gáudia vitæ.{/if} + {#if urlLang === 'de'}verleihe uns, wir bitten dich, dass wir durch seine Mutter, die Jungfrau Maria, die Freuden des ewigen Lebens erlangen.{/if} + {#if urlLang === 'en'}grant, we beseech Thee, that through His Mother the Virgin Mary we may obtain the joys of everlasting life.{/if} + {#if showLatin}Per eúmdem Christum Dóminum nostrum. Amen.{/if} + {#if urlLang === 'de'}Durch Christus, unseren Herrn. Amen.{/if} + {#if urlLang === 'en'}Through the same Christ our Lord. Amen.{/if} +

+ {/snippet} +
diff --git a/src/lib/components/faith/prayers/TantumErgo.svelte b/src/lib/components/faith/prayers/TantumErgo.svelte new file mode 100644 index 0000000..5a5fb32 --- /dev/null +++ b/src/lib/components/faith/prayers/TantumErgo.svelte @@ -0,0 +1,48 @@ + + + + {#snippet children(showLatin, urlLang)} +

+ {#if showLatin}Tantum ergo Sacraméntum{/if} + {#if urlLang === 'de'}Darum lasst uns tief verehren{/if} + {#if urlLang === 'en'}Therefore so great a Sacrament{/if} + {#if showLatin}venerémur cérnui:{/if} + {#if urlLang === 'de'}ein so grosses Sakrament;{/if} + {#if urlLang === 'en'}let us venerate with bowed heads;{/if} + {#if showLatin}et antíquum documéntum{/if} + {#if urlLang === 'de'}dieser Bund soll ewig währen{/if} + {#if urlLang === 'en'}and the old rite{/if} + {#if showLatin}novo cedat rítui:{/if} + {#if urlLang === 'de'}und den neuen Bund ersetzt.{/if} + {#if urlLang === 'en'}give way to the new:{/if} + {#if showLatin}præstet fides suppleméntum{/if} + {#if urlLang === 'de'}Unser Glaube soll uns lehren,{/if} + {#if urlLang === 'en'}let faith provide a supplement{/if} + {#if showLatin}sénsuum deféctui.{/if} + {#if urlLang === 'de'}was das Auge nicht erkennt.{/if} + {#if urlLang === 'en'}for the failure of the senses.{/if} +

+

+ {#if showLatin}Genitóri, Genitóque{/if} + {#if urlLang === 'de'}Gott dem Vater und dem Sohne{/if} + {#if urlLang === 'en'}To the Begetter and the Begotten{/if} + {#if showLatin}laus et iubilátio,{/if} + {#if urlLang === 'de'}sei Lob und Preis und Ehre,{/if} + {#if urlLang === 'en'}be praise and jubilation,{/if} + {#if showLatin}salus, honor, virtus quoque{/if} + {#if urlLang === 'de'}Heil und Ruhm und Macht und Wonne{/if} + {#if urlLang === 'en'}salvation, honour, virtue also{/if} + {#if showLatin}sit et benedíctio:{/if} + {#if urlLang === 'de'}und Segen immerdar,{/if} + {#if urlLang === 'en'}and blessing too:{/if} + {#if showLatin}procedénti ab utróque{/if} + {#if urlLang === 'de'}und dem der von beiden ausgeht,{/if} + {#if urlLang === 'en'}to Him proceeding from both{/if} + {#if showLatin}compar sit laudátio. Amen.{/if} + {#if urlLang === 'de'}sei gleiche Ehre. Amen.{/if} + {#if urlLang === 'en'}let there be equal praise. Amen.{/if} +

+ {/snippet} +
diff --git a/src/lib/js/easter.svelte.ts b/src/lib/js/easter.svelte.ts new file mode 100644 index 0000000..50339e3 --- /dev/null +++ b/src/lib/js/easter.svelte.ts @@ -0,0 +1,56 @@ +/** + * Compute Easter Sunday for a given year (Anonymous Gregorian algorithm). + */ +export function computeEaster(year: number): Date { + const a = year % 19; + const b = Math.floor(year / 100); + const c = year % 100; + const d = Math.floor(b / 4); + const e = b % 4; + const f = Math.floor((b + 8) / 25); + const g = Math.floor((b - f + 1) / 3); + const h = (19 * a + b - d - g + 15) % 30; + const i = Math.floor(c / 4); + const k = c % 4; + const l = (32 + 2 * e + 2 * i - h - k) % 7; + const m = Math.floor((a + 11 * h + 22 * l) / 451); + const month = Math.floor((h + l - 7 * m + 114) / 31); + const day = ((h + l - 7 * m + 114) % 31) + 1; + return new Date(year, month - 1, day); +} + +/** + * Check if a date falls within Eastertide (Easter Sunday to Pentecost Sunday, inclusive). + */ +export function isEastertide(date: Date = new Date()): boolean { + const year = date.getFullYear(); + const easter = computeEaster(year); + const pentecost = new Date(easter); + pentecost.setDate(pentecost.getDate() + 49); + return date >= easter && date <= pentecost; +} + +/** + * Check if a date falls within Lent (Ash Wednesday to Holy Saturday, inclusive). + * Ash Wednesday = Easter − 46 days; Holy Saturday = Easter − 1 day. + */ +export function isLent(date: Date = new Date()): boolean { + const year = date.getFullYear(); + const easter = computeEaster(year); + const ashWednesday = new Date(easter); + ashWednesday.setDate(ashWednesday.getDate() - 46); + const holySaturday = new Date(easter); + holySaturday.setDate(holySaturday.getDate() - 1); + return date >= ashWednesday && date <= holySaturday; +} + +export type LiturgicalSeason = 'eastertide' | 'lent' | null; + +/** + * Get the current liturgical season relevant for rosary mystery selection. + */ +export function getLiturgicalSeason(date: Date = new Date()): LiturgicalSeason { + if (isEastertide(date)) return 'eastertide'; + if (isLent(date)) return 'lent'; + return null; +} diff --git a/src/routes/[faithLang=faithLang]/+layout.svelte b/src/routes/[faithLang=faithLang]/+layout.svelte index a003047..c0fe310 100644 --- a/src/routes/[faithLang=faithLang]/+layout.svelte +++ b/src/routes/[faithLang=faithLang]/+layout.svelte @@ -28,7 +28,7 @@ function isActive(path) { {/snippet} diff --git a/src/routes/[faithLang=faithLang]/+page.svelte b/src/routes/[faithLang=faithLang]/+page.svelte index 2c038cb..9431631 100644 --- a/src/routes/[faithLang=faithLang]/+page.svelte +++ b/src/routes/[faithLang=faithLang]/+page.svelte @@ -71,7 +71,7 @@

{labels.rosary}

- +

Angelus

diff --git a/src/routes/[faithLang=faithLang]/[prayers=prayersLang]/+page.server.ts b/src/routes/[faithLang=faithLang]/[prayers=prayersLang]/+page.server.ts index 50bb977..2f66231 100644 --- a/src/routes/[faithLang=faithLang]/[prayers=prayersLang]/+page.server.ts +++ b/src/routes/[faithLang=faithLang]/[prayers=prayersLang]/+page.server.ts @@ -5,8 +5,14 @@ export const load: PageServerLoad = async ({ url }) => { const hasUrlLatin = latinParam !== null; const initialLatin = hasUrlLatin ? latinParam !== '0' : true; + const categoryParam = url.searchParams.get('category'); + const hasUrlCategory = categoryParam !== null; + const initialCategory = hasUrlCategory ? categoryParam : null; + return { initialLatin, - hasUrlLatin + hasUrlLatin, + initialCategory, + hasUrlCategory }; }; diff --git a/src/routes/[faithLang=faithLang]/[prayers=prayersLang]/+page.svelte b/src/routes/[faithLang=faithLang]/[prayers=prayersLang]/+page.svelte index dbbc9de..8bacd0f 100644 --- a/src/routes/[faithLang=faithLang]/[prayers=prayersLang]/+page.svelte +++ b/src/routes/[faithLang=faithLang]/[prayers=prayersLang]/+page.svelte @@ -19,8 +19,13 @@ import BruderKlausGebet from "$lib/components/faith/prayers/BruderKlausGebet.svelte"; import JosephGebet from "$lib/components/faith/prayers/JosephGebet.svelte"; import Confiteor from "$lib/components/faith/prayers/Confiteor.svelte"; - import AblassGebete from "$lib/components/faith/prayers/AblassGebete.svelte"; + import GuardianAngel from "$lib/components/faith/prayers/GuardianAngel.svelte"; + import ApostlesCreed from "$lib/components/faith/prayers/ApostlesCreed.svelte"; + import TantumErgo from "$lib/components/faith/prayers/TantumErgo.svelte"; + import Angelus from "$lib/components/faith/prayers/Angelus.svelte"; + import ReginaCaeli from "$lib/components/faith/prayers/ReginaCaeli.svelte"; import Prayer from "$lib/components/faith/prayers/Prayer.svelte"; + import { isEastertide as checkEastertide } from "$lib/js/easter.svelte"; let { data } = $props(); @@ -58,13 +63,66 @@ searchPlaceholder: isEnglish ? 'Search prayers...' : 'Gebete suchen...', clearSearch: isEnglish ? 'Clear search' : 'Suche löschen', textMatch: isEnglish ? 'Match in prayer text' : 'Treffer im Gebetstext', - ablassgebete: 'Ablassgebete' + postcommunio: isEnglish ? 'Postcommunio Prayers' : 'Nachkommuniongebete', + animachristi: 'Ánima Christi', + prayerbeforeacrucifix: isEnglish ? 'Prayer Before a Crucifix' : 'Gebet vor einem Kruzifix', + guardianAngel: isEnglish ? 'Guardian Angel Prayer' : 'Schutzengel-Gebet', + apostlesCreed: isEnglish ? "Apostles' Creed" : 'Apostolisches Glaubensbekenntnis', + tantumErgo: 'Tantum Ergo', + angelus: 'Angelus', + reginaCaeli: 'Regína Cæli' }); + // TODO: Add categories: 'meal' (Tischgebete/Meal) and 'morning_evening' (Morgen-/Abendgebete/Morning & Evening) + // when corresponding prayers are added to the collection + + const categories = [ + { id: 'essential', de: 'Grundgebete', en: 'Essential' }, + { id: 'marian', de: 'Marianisch', en: 'Marian' }, + { id: 'saints', de: 'Heilige', en: 'Saints' }, + { id: 'eucharistic', de: 'Eucharistie', en: 'Eucharistic' }, + { id: 'praise', de: 'Lobpreis', en: 'Praise' }, + { id: 'penitential', de: 'Busse', en: 'Penitential' }, + ]; + + const prayerCategories = { + signOfCross: ['essential'], + gloriaPatri: ['essential', 'praise'], + paternoster: ['essential'], + credo: ['essential'], + aveMaria: ['essential', 'marian'], + salveRegina: ['marian'], + fatima: ['marian', 'penitential'], + gloria: ['praise'], + michael: ['saints'], + bruderKlaus: ['saints'], + joseph: ['saints'], + confiteor: ['penitential'], + guardianAngel: ['essential'], + apostlesCreed: ['essential'], + tantumErgo: ['eucharistic', 'praise'], + angelus: ['marian'], + reginaCaeli: ['marian'], + }; + + let selectedCategory = $state(data.initialCategory); + // JS-only search (hidden without JS) let jsEnabled = $state(false); let searchQuery = $state(''); + /** + * Build href for category filter, preserving latin param state + * @param {string|null} categoryId + */ + function buildFilterHref(categoryId) { + const params = new URLSearchParams(); + if (categoryId) params.set('category', categoryId); + if (!data.initialLatin) params.set('latin', '0'); + const qs = params.toString(); + return qs ? `?${qs}` : '?'; + } + onMount(() => { jsEnabled = true; @@ -92,7 +150,11 @@ { id: 'bruderKlaus', searchTerms: ['bruder klaus', 'nicholas', 'niklaus', 'flüe'], slug: isEnglish ? 'prayer-of-st-nicholas-of-flue' : 'bruder-klaus-gebet' }, { id: 'joseph', searchTerms: ['joseph', 'josef', 'pius'], slug: isEnglish ? 'prayer-to-st-joseph-by-pope-st-pius-x' : 'josephgebet-des-hl-papst-pius-x' }, { id: 'confiteor', searchTerms: ['confiteor', 'i confess', 'ich bekenne', 'mea culpa'], slug: isEnglish ? 'the-confiteor' : 'das-confiteor' }, - { id: 'ablassgebete', searchTerms: ['ablass', 'kommunion'], slug: 'ablassgebete' } + { id: 'guardianAngel', searchTerms: ['schutzengel', 'guardian angel', 'angele dei', 'engel gottes'], slug: isEnglish ? 'guardian-angel-prayer' : 'schutzengel-gebet' }, + { id: 'apostlesCreed', searchTerms: ['apostolisches glaubensbekenntnis', "apostles' creed", 'symbolum apostolorum', 'ich glaube an gott'], slug: isEnglish ? 'apostles-creed' : 'apostolisches-glaubensbekenntnis' }, + { id: 'tantumErgo', searchTerms: ['tantum ergo', 'genitori', 'sakrament', 'sacrament'], slug: 'tantum-ergo' }, + { id: 'angelus', searchTerms: ['angelus', 'engel des herrn', 'angel of the lord'], slug: 'angelus' }, + { id: 'reginaCaeli', searchTerms: ['regina caeli', 'regina coeli', 'himmelskönigin', 'queen of heaven'], slug: 'regina-caeli' } ]); // Base URL for prayer links @@ -113,7 +175,11 @@ bruderKlaus: labels.bruderKlaus, joseph: labels.joseph, confiteor: labels.confiteor, - ablassgebete: labels.ablassgebete + guardianAngel: labels.guardianAngel, + apostlesCreed: labels.apostlesCreed, + tantumErgo: labels.tantumErgo, + angelus: labels.angelus, + reginaCaeli: labels.reginaCaeli }; return nameMap[id] || id; } @@ -189,11 +255,15 @@ return 'no-match'; } - // Sorted prayers array - primary matches first, then secondary, then hidden - const sortedPrayers = $derived.by(() => { - if (!searchQuery.trim()) return prayers; + // Filtered by category, then sorted by search match + const filteredPrayers = $derived.by(() => { + let result = prayers; + if (selectedCategory) { + result = result.filter(p => prayerCategories[p.id]?.includes(selectedCategory)); + } + if (!searchQuery.trim()) return result; - return [...prayers].sort((a, b) => { + return [...result].sort((a, b) => { const matchA = matchResults.get(a.id); const matchB = matchResults.get(b.id); @@ -204,6 +274,8 @@ }); }); + const showPostcommunio = $derived(!selectedCategory || selectedCategory === 'eucharistic'); + // Prayer metadata (bilingue status) const prayerMeta = { signOfCross: { bilingue: true }, @@ -217,9 +289,16 @@ michael: { bilingue: true }, bruderKlaus: { bilingue: false }, joseph: { bilingue: false }, - confiteor: { bilingue: true } + confiteor: { bilingue: true }, + guardianAngel: { bilingue: true }, + apostlesCreed: { bilingue: true }, + tantumErgo: { bilingue: true }, + angelus: { bilingue: true }, + reginaCaeli: { bilingue: true } }; + const isEastertide = $derived(checkEastertide()); + // Toggle href for no-JS fallback (navigates to opposite latin state) const latinToggleHref = $derived(data.initialLatin ? '?latin=0' : '?'); @@ -254,6 +333,49 @@ h1{ margin-bottom: 2rem; } +/* Category filters */ +.category-filters { + display: flex; + flex-wrap: wrap; + justify-content: center; + gap: 0.5em; + margin-bottom: 1.5rem; + padding: 0 1em; +} +.category-pill { + padding: 0.35em 0.9em; + border: 1.5px solid var(--nord3); + border-radius: 999px; + color: var(--nord4); + text-decoration: none; + font-size: 0.9em; + transition: border-color 0.15s, color 0.15s, background-color 0.15s; +} +.category-pill:hover { + border-color: var(--nord8); + color: var(--nord8); +} +.category-pill.selected { + border-color: var(--nord8); + background-color: var(--nord8); + color: var(--nord0); +} +@media(prefers-color-scheme: light) { + .category-pill { + border-color: var(--nord4); + color: var(--nord3); + } + .category-pill:hover { + border-color: var(--nord10); + color: var(--nord10); + } + .category-pill.selected { + border-color: var(--nord10); + background-color: var(--nord10); + color: var(--nord6); + } +} + /* Search result styling */ .prayer-wrapper { position: relative; @@ -285,6 +407,57 @@ h1{ } } +/* Postcommunio section */ +.postcommunio-section { + max-width: 600px; + margin: 2rem auto; + padding: 1.5em; + background-color: var(--accent-dark); + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); +} +@media(prefers-color-scheme: light) { + .postcommunio-section { + background-color: var(--nord5); + } +} +.postcommunio-section h2 { + text-align: center; + padding-bottom: 0.5em; +} +.postcommunio-links { + list-style: none; + padding: 0; + margin: 0; + text-align: center; +} +.postcommunio-links li { + margin: 0.75em 0; +} +.postcommunio-links a { + color: var(--nord8); + text-decoration: none; + font-size: 1.15em; +} +.postcommunio-links a:hover { + text-decoration: underline; +} +@media(prefers-color-scheme: light) { + .postcommunio-links a { + color: var(--nord10); + } +} + +/* Seasonal badge */ +.seasonal-badge { + display: inline-block; + margin-top: 0.5em; + padding: 0.2em 0.7em; + font-size: 0.75em; + border-radius: 999px; + background-color: var(--nord14); + color: var(--nord0); +} + /* Search is hidden without JS */ .js-only { display: none; @@ -304,6 +477,23 @@ h1{ /> + +
-{#each sortedPrayers as prayer (prayer.id)} +{#each filteredPrayers as prayer (prayer.id)}
{#if prayer.id === 'gloria'}

{labels.gloriaIntro}

- {:else if prayer.id === 'ablassgebete'} - {#if data.lang === 'de'} - - - - {/if} {:else} {#if prayer.id === 'signOfCross'} @@ -351,11 +535,35 @@ h1{ {:else if prayer.id === 'confiteor'} + {:else if prayer.id === 'guardianAngel'} + + {:else if prayer.id === 'apostlesCreed'} + + {:else if prayer.id === 'tantumErgo'} + + {:else if prayer.id === 'angelus'} + + {:else if prayer.id === 'reginaCaeli'} + + {/if} + {#if prayer.id === 'reginaCaeli' && isEastertide} + {isEnglish ? 'Eastertide' : 'Osterzeit'} {/if} {/if}
{/each}
+ +{#if showPostcommunio} +
+

{labels.postcommunio}

+ +
+{/if}
diff --git a/src/routes/[faithLang=faithLang]/[prayers=prayersLang]/[prayer]/+page.server.ts b/src/routes/[faithLang=faithLang]/[prayers=prayersLang]/[prayer]/+page.server.ts index 71cbf22..fa966f2 100644 --- a/src/routes/[faithLang=faithLang]/[prayers=prayersLang]/[prayer]/+page.server.ts +++ b/src/routes/[faithLang=faithLang]/[prayers=prayersLang]/[prayer]/+page.server.ts @@ -15,7 +15,14 @@ const validSlugs = new Set([ 'bruder-klaus-gebet', 'prayer-of-st-nicholas-of-flue', 'josephgebet-des-hl-papst-pius-x', 'prayer-to-st-joseph-by-pope-st-pius-x', 'das-confiteor', 'the-confiteor', - 'ablassgebete', + 'postcommunio', + 'anima-christi', + 'prayer-before-a-crucifix', 'gebet-vor-einem-kruzifix', + 'schutzengel-gebet', 'guardian-angel-prayer', + 'apostolisches-glaubensbekenntnis', 'apostles-creed', + 'tantum-ergo', + 'angelus', + 'regina-caeli', ]); export const load: PageServerLoad = async ({ params, url }) => { @@ -23,10 +30,6 @@ export const load: PageServerLoad = async ({ params, url }) => { throw error(404, 'Prayer not found'); } - if (params.faithLang === 'faith' && params.prayer === 'ablassgebete') { - throw error(404, 'Prayer not found'); - } - const latinParam = url.searchParams.get('latin'); const hasUrlLatin = latinParam !== null; const initialLatin = hasUrlLatin ? latinParam !== '0' : true; diff --git a/src/routes/[faithLang=faithLang]/[prayers=prayersLang]/[prayer]/+page.svelte b/src/routes/[faithLang=faithLang]/[prayers=prayersLang]/[prayer]/+page.svelte index 6ab80ef..b25dfaf 100644 --- a/src/routes/[faithLang=faithLang]/[prayers=prayersLang]/[prayer]/+page.svelte +++ b/src/routes/[faithLang=faithLang]/[prayers=prayersLang]/[prayer]/+page.svelte @@ -16,7 +16,14 @@ import BruderKlausGebet from "$lib/components/faith/prayers/BruderKlausGebet.svelte"; import JosephGebet from "$lib/components/faith/prayers/JosephGebet.svelte"; import Confiteor from "$lib/components/faith/prayers/Confiteor.svelte"; - import AblassGebete from "$lib/components/faith/prayers/AblassGebete.svelte"; + import Postcommunio from "$lib/components/faith/prayers/Postcommunio.svelte"; + import AnimaChristi from "$lib/components/faith/prayers/AnimaChristi.svelte"; + import PrayerBeforeACrucifix from "$lib/components/faith/prayers/PrayerBeforeACrucifix.svelte"; + import GuardianAngel from "$lib/components/faith/prayers/GuardianAngel.svelte"; + import ApostlesCreed from "$lib/components/faith/prayers/ApostlesCreed.svelte"; + import TantumErgo from "$lib/components/faith/prayers/TantumErgo.svelte"; + import AngelusComponent from "$lib/components/faith/prayers/Angelus.svelte"; + import ReginaCaeli from "$lib/components/faith/prayers/ReginaCaeli.svelte"; import StickyImage from "$lib/components/faith/StickyImage.svelte"; let { data } = $props(); @@ -52,7 +59,17 @@ 'prayer-to-st-joseph-by-pope-st-pius-x': { id: 'joseph', name: isEnglish ? 'Prayer to St. Joseph by Pope St. Pius X' : 'Josephgebet des hl. Papst Pius X', bilingue: false }, 'das-confiteor': { id: 'confiteor', name: isEnglish ? 'The Confiteor' : 'Das Confiteor', bilingue: true }, 'the-confiteor': { id: 'confiteor', name: isEnglish ? 'The Confiteor' : 'Das Confiteor', bilingue: true }, - 'ablassgebete': { id: 'ablassgebete', name: 'Ablassgebete', bilingue: true } + 'postcommunio': { id: 'postcommunio', name: isEnglish ? 'Postcommunio Prayers' : 'Nachkommuniongebete', bilingue: true }, + 'anima-christi': { id: 'animachristi', name: 'Ánima Christi', bilingue: true }, + 'prayer-before-a-crucifix': { id: 'prayerbeforeacrucifix', name: isEnglish ? 'Prayer Before a Crucifix' : 'Gebet vor einem Kruzifix', bilingue: true }, + 'gebet-vor-einem-kruzifix': { id: 'prayerbeforeacrucifix', name: isEnglish ? 'Prayer Before a Crucifix' : 'Gebet vor einem Kruzifix', bilingue: true }, + 'schutzengel-gebet': { id: 'guardianAngel', name: isEnglish ? 'Guardian Angel Prayer' : 'Schutzengel-Gebet', bilingue: true }, + 'guardian-angel-prayer': { id: 'guardianAngel', name: isEnglish ? 'Guardian Angel Prayer' : 'Schutzengel-Gebet', bilingue: true }, + 'apostolisches-glaubensbekenntnis': { id: 'apostlesCreed', name: isEnglish ? "Apostles' Creed" : 'Apostolisches Glaubensbekenntnis', bilingue: true }, + 'apostles-creed': { id: 'apostlesCreed', name: isEnglish ? "Apostles' Creed" : 'Apostolisches Glaubensbekenntnis', bilingue: true }, + 'tantum-ergo': { id: 'tantumErgo', name: 'Tantum Ergo', bilingue: true }, + 'angelus': { id: 'angelus', name: 'Angelus', bilingue: true }, + 'regina-caeli': { id: 'reginaCaeli', name: 'Regína Cæli', bilingue: true } }); const prayer = $derived(prayerDefs[data.prayer]); @@ -136,7 +153,7 @@ h1 { } } - {#if prayerId === 'ablassgebete'} + {#if prayerId === 'postcommunio' || prayerId === 'prayerbeforeacrucifix'}

{prayerName}

@@ -151,7 +168,11 @@ h1 {
- + {#if prayerId === 'postcommunio'} + + {:else} + + {/if}
@@ -197,6 +218,20 @@ h1 { {:else if prayerId === 'confiteor'} + {:else if prayerId === 'animachristi'} + + {:else if prayerId === 'prayerbeforeacrucifix'} + + {:else if prayerId === 'guardianAngel'} + + {:else if prayerId === 'apostlesCreed'} + + {:else if prayerId === 'tantumErgo'} + + {:else if prayerId === 'angelus'} + + {:else if prayerId === 'reginaCaeli'} + {/if} diff --git a/src/routes/[faithLang=faithLang]/[rosary=rosaryLang]/+page.server.ts b/src/routes/[faithLang=faithLang]/[rosary=rosaryLang]/+page.server.ts index 646782d..8f23f3d 100644 --- a/src/routes/[faithLang=faithLang]/[rosary=rosaryLang]/+page.server.ts +++ b/src/routes/[faithLang=faithLang]/[rosary=rosaryLang]/+page.server.ts @@ -1,4 +1,5 @@ import { mysteryVerseDataDe, mysteryVerseDataEn } from '$lib/data/mysteryVerseData'; +import { getLiturgicalSeason } from '$lib/js/easter.svelte'; import type { PageServerLoad, Actions } from './$types'; interface StreakData { @@ -8,6 +9,11 @@ interface StreakData { const validMysteries = ['freudenreich', 'schmerzhaften', 'glorreichen', 'lichtreichen'] as const; +const seasonalMysteryMap: Record = { + eastertide: 'glorreichen', + lent: 'schmerzhaften', +}; + function getMysteryForWeekday(date: Date, includeLuminous: boolean): string { const dayOfWeek = date.getDay(); @@ -55,14 +61,17 @@ export const load: PageServerLoad = async ({ url, fetch, locals, params }) => { const initialShowImages = hasUrlImages ? imagesParam !== '0' : true; const todaysMystery = getMysteryForWeekday(new Date(), initialLuminous); + const season = getLiturgicalSeason(); + const seasonalMystery = season ? seasonalMysteryMap[season] ?? null : null; + const defaultMystery = seasonalMystery ?? todaysMystery; let initialMystery = (validMysteries as readonly string[]).includes(mysteryParam ?? '') ? mysteryParam! - : todaysMystery; + : defaultMystery; // If luminous is off and luminous mystery was selected, fall back if (!initialLuminous && initialMystery === 'lichtreichen') { - initialMystery = todaysMystery; + initialMystery = defaultMystery; } // Fetch streak data for logged-in users via API route diff --git a/src/routes/[faithLang=faithLang]/[rosary=rosaryLang]/+page.svelte b/src/routes/[faithLang=faithLang]/[rosary=rosaryLang]/+page.svelte index bf9f683..df71008 100644 --- a/src/routes/[faithLang=faithLang]/[rosary=rosaryLang]/+page.svelte +++ b/src/routes/[faithLang=faithLang]/[rosary=rosaryLang]/+page.svelte @@ -12,6 +12,7 @@ import AveMaria from "$lib/components/faith/prayers/AveMaria.svelte"; import GloriaPatri from "$lib/components/faith/prayers/GloriaPatri.svelte"; import FatimaGebet from "$lib/components/faith/prayers/FatimaGebet.svelte"; import SalveRegina from "$lib/components/faith/prayers/SalveRegina.svelte"; +import ReginaCaeli from "$lib/components/faith/prayers/ReginaCaeli.svelte"; import RosaryFinalPrayer from "$lib/components/faith/prayers/RosaryFinalPrayer.svelte"; import MichaelGebet from "$lib/components/faith/prayers/MichaelGebet.svelte"; import CounterButton from "$lib/components/CounterButton.svelte"; @@ -23,6 +24,7 @@ import RosarySvg from "./RosarySvg.svelte"; import MysterySelector from "./MysterySelector.svelte"; import MysteryImageColumn from "./MysteryImageColumn.svelte"; import { mysteries, mysteriesLatin, mysteriesEnglish, mysteryTitles, mysteryTitlesEnglish, allMysteryImages, getLabels, getMysteryForWeekday, BEAD_SPACING, DECADE_OFFSET, sectionPositions } from "./rosaryData.js"; +import { isEastertide, getLiturgicalSeason } from "$lib/js/easter.svelte"; import { setupScrollSync } from "./rosaryScrollSync.js"; let { data } = $props(); @@ -98,7 +100,9 @@ let imagesToggleHref = $derived(buildHref({ images: !showImages })); $effect(() => { todaysMystery = getMysteryForWeekday(new Date(), includeLuminous); if (!includeLuminous && selectedMystery === 'lichtreichen') { - selectedMystery = todaysMystery; + const season = getLiturgicalSeason(); + const seasonalMap = { eastertide: 'glorreichen', lent: 'schmerzhaften' }; + selectedMystery = (season ? seasonalMap[season] : null) ?? todaysMystery; } }); @@ -276,7 +280,9 @@ onMount(() => { // If no mystery was specified in URL, recompute based on loaded preferences if (!data.hasUrlMystery) { todaysMystery = getMysteryForWeekday(new Date(), includeLuminous); - selectMystery(todaysMystery); + const season = getLiturgicalSeason(); + const seasonalMap = { eastertide: 'glorreichen', lent: 'schmerzhaften' }; + selectMystery(season ? seasonalMap[season] ?? todaysMystery : todaysMystery); } // Clean up URL params after hydration (state is now in component state) @@ -493,6 +499,19 @@ onMount(() => { font-size: 1.8rem; } +.eastertide-badge { + position: absolute; + top: 0.5rem; + right: 0.5rem; + padding: 0.25em 0.6em; + font-size: 0.75rem; + font-weight: 600; + border-radius: 999px; + background-color: var(--nord14); + color: var(--nord0); + z-index: 1; +} + .prayer-section h3 { color: var(--nord11); margin-top: 1.5rem; @@ -696,7 +715,7 @@ h1 {

{labels.mysteries}

- +
@@ -905,8 +924,14 @@ h1 { bind:this={sectionElements.final_salve} data-section="final_salve" > -

Salve Regina

- + {#if isEastertide()} + {labels.eastertide} +

Regína Cæli

+ + {:else} +

Salve Regina

+ + {/if}
import MysteryIcon from "$lib/components/faith/MysteryIcon.svelte"; - let { selectedMystery, todaysMystery, includeLuminous, labels, mysteryHref, selectMystery } = $props(); + let { selectedMystery, todaysMystery, includeLuminous, labels, mysteryHref, selectMystery, season = null } = $props(); + + const seasonalMystery = $derived( + season === 'eastertide' ? 'glorreichen' + : season === 'lent' ? 'schmerzhaften' + : null + ); + + const seasonLabel = $derived( + season === 'eastertide' ? labels.eastertide + : season === 'lent' ? labels.lent + : '' + );
@@ -168,10 +198,13 @@ href={mysteryHref('freudenreich')} onclick={(e) => { e.preventDefault(); selectMystery('freudenreich'); }} > - {#if todaysMystery === 'freudenreich'} - {labels.today} + {#if seasonalMystery === 'freudenreich' || todaysMystery === 'freudenreich'} +
+ {#if seasonalMystery === 'freudenreich'}{seasonLabel}{/if} + {#if todaysMystery === 'freudenreich'}{labels.today}{/if} +
{/if} - +

{labels.joyful}

@@ -181,8 +214,11 @@ href={mysteryHref('schmerzhaften')} onclick={(e) => { e.preventDefault(); selectMystery('schmerzhaften'); }} > - {#if todaysMystery === 'schmerzhaften'} - {labels.today} + {#if seasonalMystery === 'schmerzhaften' || todaysMystery === 'schmerzhaften'} +
+ {#if seasonalMystery === 'schmerzhaften'}{seasonLabel}{/if} + {#if todaysMystery === 'schmerzhaften'}{labels.today}{/if} +
{/if}

{labels.sorrowful}

@@ -194,10 +230,13 @@ href={mysteryHref('glorreichen')} onclick={(e) => { e.preventDefault(); selectMystery('glorreichen'); }} > - {#if todaysMystery === 'glorreichen'} - {labels.today} + {#if seasonalMystery === 'glorreichen' || todaysMystery === 'glorreichen'} +
+ {#if seasonalMystery === 'glorreichen'}{seasonLabel}{/if} + {#if todaysMystery === 'glorreichen'}{labels.today}{/if} +
{/if} - +

{labels.glorious}

@@ -209,10 +248,11 @@ onclick={(e) => { e.preventDefault(); selectMystery('lichtreichen'); }} > {#if todaysMystery === 'lichtreichen'} - {labels.today} +
+ {labels.today} +
{/if} - - +

{labels.luminous}

{/if} diff --git a/src/routes/[faithLang=faithLang]/[rosary=rosaryLang]/rosaryData.js b/src/routes/[faithLang=faithLang]/[rosary=rosaryLang]/rosaryData.js index 1c126b3..e26fabd 100644 --- a/src/routes/[faithLang=faithLang]/[rosary=rosaryLang]/rosaryData.js +++ b/src/routes/[faithLang=faithLang]/[rosary=rosaryLang]/rosaryData.js @@ -191,7 +191,9 @@ export function getLabels(isEnglish) { showBibleVerse: isEnglish ? 'Show Bible verse' : 'Bibelstelle anzeigen', mysteryFaith: isEnglish ? 'Jesus, who may increase our faith' : 'Jesus, der in uns den Glauben vermehre', mysteryHope: isEnglish ? 'Jesus, who may strengthen our hope' : 'Jesus, der in uns die Hoffnung stärke', - mysteryLove: isEnglish ? 'Jesus, who may kindle our love' : 'Jesus, der in uns die Liebe entzünde' + mysteryLove: isEnglish ? 'Jesus, who may kindle our love' : 'Jesus, der in uns die Liebe entzünde', + eastertide: isEnglish ? 'Eastertide' : 'Osterzeit', + lent: isEnglish ? 'Lent' : 'Fastenzeit' }; } diff --git a/src/routes/[faithLang=faithLang]/angelus/+page.server.ts b/src/routes/[faithLang=faithLang]/angelus/+page.server.ts index 50bb977..31b7629 100644 --- a/src/routes/[faithLang=faithLang]/angelus/+page.server.ts +++ b/src/routes/[faithLang=faithLang]/angelus/+page.server.ts @@ -1,12 +1,7 @@ +import { redirect } from '@sveltejs/kit'; import type { PageServerLoad } from './$types'; -export const load: PageServerLoad = async ({ url }) => { - const latinParam = url.searchParams.get('latin'); - const hasUrlLatin = latinParam !== null; - const initialLatin = hasUrlLatin ? latinParam !== '0' : true; - - return { - initialLatin, - hasUrlLatin - }; +export const load: PageServerLoad = async ({ params }) => { + const prayersPath = params.faithLang === 'faith' ? 'prayers' : 'gebete'; + redirect(301, `/${params.faithLang}/${prayersPath}/angelus`); }; diff --git a/src/routes/[faithLang=faithLang]/angelus/+page.svelte b/src/routes/[faithLang=faithLang]/angelus/+page.svelte deleted file mode 100644 index 83073a5..0000000 --- a/src/routes/[faithLang=faithLang]/angelus/+page.svelte +++ /dev/null @@ -1,236 +0,0 @@ - - - - Angelus - The Angel of the Lord - - - -
-

Angelus

-
- -
- -
-
- - {#snippet children(showLatin, urlLang)} - -

- {#if showLatin}℣. Angelus Domini nuntiavit Mariæ.{/if} - {#if urlLang === 'de'}℣. Der Engel des Herrn brachte Maria die Botschaft{/if} - {#if urlLang === 'en'}℣. The Angel of the Lord declared unto Mary.{/if} - {#if showLatin}℟. Et concepit de Spiritu Sancto.{/if} - {#if urlLang === 'de'}℟. und sie empfing vom Heiligen Geist.{/if} - {#if urlLang === 'en'}℟. And she conceived of the Holy Spirit.{/if} -

- {/snippet} -
-
-
- -
-
- -
- - {#snippet children(showLatin, urlLang)} - -

- {#if showLatin}℣. Ecce ancilla Domini,{/if} - {#if urlLang === 'de'}℣. Maria sprach: Siehe, ich bin die Magd des Herrn{/if} - {#if urlLang === 'en'}℣. Behold the handmaid of the Lord.{/if} - {#if showLatin}℟. Fiat mihi secundum verbum tuum.{/if} - {#if urlLang === 'de'}℟. mir geschehe nach Deinem Wort.{/if} - {#if urlLang === 'en'}℟. Be it done unto me according to thy word.{/if} -

- {/snippet} -
-
- -
- -
- -
- - {#snippet children(showLatin, urlLang)} - -

- {#if showLatin}℣. Et Verbum caro factum est,{/if} - {#if urlLang === 'de'}℣. Und das Wort ist Fleisch geworden{/if} - {#if urlLang === 'en'}℣. And the Word was made flesh.{/if} - {#if showLatin}℟. Et habitavit in nobis.{/if} - {#if urlLang === 'de'}℟. und hat unter uns gewohnt.{/if} - {#if urlLang === 'en'}℟. And dwelt among us.{/if} -

- {/snippet} -
-
- -
- -
- -
- - {#snippet children(showLatin, urlLang)} - -

- {#if showLatin}℣. Ora pro nobis, sancta Dei Genetrix,{/if} - {#if urlLang === 'de'}℣. Bitte für uns Heilige Gottesmutter{/if} - {#if urlLang === 'en'}℣. Pray for us, O holy Mother of God.{/if} - {#if showLatin}℟. Ut digni efficiamur promissionibus Christi.{/if} - {#if urlLang === 'de'}℟. auf dass wir würdig werden der Verheißungen Christi.{/if} - {#if urlLang === 'en'}℟. That we may be made worthy of the promises of Christ.{/if} -

- {/snippet} -
-
-
- - {#snippet children(showLatin, urlLang)} - -

- {#if showLatin}℣. Oremus.{/if} - {#if urlLang === 'de'}℣. Lasset uns beten.{/if} - {#if urlLang === 'en'}℣. Let us pray:{/if} -

- -

- {#if showLatin} - Gratiam tuam, quaesumus, Domine, mentibus nostris infunde; - {/if} - {#if urlLang === 'de'} - Allmächtiger Gott, gieße deine Gnade in unsere Herzen ein. - {/if} - {#if urlLang === 'en'} - Pour forth, we beseech Thee, O Lord, Thy grace into our hearts, - {/if} - {#if showLatin} - ut qui, Angelo nuntiante, Christi Filii tui incarnationem cognovimus, - {/if} - {#if urlLang === 'de'} - Durch die Botschaft des Engels haben wir die Menschwerdung Christi, deines Sohnes, erkannt. - {/if} - {#if urlLang === 'en'} - that we to whom the Incarnation of Christ Thy Son was made known by the message of an angel, - {/if} - {#if showLatin} - per passionem eius et crucem ad resurrectionis gloriam perducamur. - {/if} - {#if urlLang === 'de'} - Lass uns durch sein Leiden und Kreuz zur Herrlichkeit der Auferstehung gelangen. - {/if} - {#if urlLang === 'en'} - may by His Passion and Cross be brought to the glory of His Resurrection. - {/if} - {#if showLatin} - Per eumdem Christum Dominum nostrum. Amen. - {/if} - {#if urlLang === 'de'} - Darum bitten wir durch Christus, unseren Herrn. Amen. - {/if} - {#if urlLang === 'en'} - Through the same Christ Our Lord. Amen. - {/if} -

- {/snippet} -
-
- - -
-