diff --git a/src/ui/app.ts b/src/ui/app.ts index 789af15..24bc944 100644 --- a/src/ui/app.ts +++ b/src/ui/app.ts @@ -124,25 +124,15 @@ export class App { ${t.nav.library} ▾
${t.nav.bible} - - + ${t.nav.prayer} + ${t.nav.akathists} + ${t.nav.horologion} + ${t.nav.sbornik} + ${t.nav.parimii} + ${t.nav.paraclete} + ${t.nav.irmologion} + ${t.nav.menaion} + ${t.nav.triodion}
${t.nav.settings} diff --git a/src/ui/menaion-view.ts b/src/ui/menaion-view.ts index aedcf81..851408f 100644 --- a/src/ui/menaion-view.ts +++ b/src/ui/menaion-view.ts @@ -56,7 +56,10 @@ export class MenaionView { this.container.innerHTML = `
-

${this.t.menaion.title}

+
+ + +

${this.t.prayer.selectSection}

@@ -65,6 +68,15 @@ export class MenaionView { `; this.renderCalendar(this.currentMonth); + this.setupChips(); + } + + private setupChips() { + this.container.querySelectorAll('.sub-nav-chip[data-view]').forEach(btn => { + btn.addEventListener('click', () => { + window.location.hash = btn.getAttribute('data-view')!; + }); + }); } private renderCalendar(month: number) { diff --git a/src/ui/prayer-view.ts b/src/ui/prayer-view.ts index c8edfcf..a23b203 100644 --- a/src/ui/prayer-view.ts +++ b/src/ui/prayer-view.ts @@ -190,34 +190,41 @@ export class PrayerView { async render() { const sections = this.getSections(); - const isAkathists = this.collection === 'akathists'; - const isParimii = this.collection === 'parimii'; - const isHorologion = this.collection === 'horologion'; - const isSbornik = this.collection === 'sbornik'; - const isParaclete = this.collection === 'paraclete'; - const isIrmologion = this.collection === 'irmologion'; const isTriodion = this.collection === 'triodion'; - const title = isTriodion ? this.t.triodion.title - : isAkathists ? this.t.akathists.title - : isParimii ? this.t.parimii.title - : isHorologion ? this.t.horologion.title - : isSbornik ? this.t.sbornik.title - : isParaclete ? this.t.paraclete.title - : isIrmologion ? this.t.irmologion.title - : this.t.prayer.title; const subtitle = isTriodion ? this.t.triodion.subtitle - : isAkathists ? this.t.akathists.subtitle - : isParimii ? this.t.parimii.subtitle - : isHorologion ? this.t.horologion.subtitle - : isSbornik ? this.t.sbornik.subtitle - : isParaclete ? this.t.paraclete.subtitle - : isIrmologion ? this.t.irmologion.subtitle + : this.collection === 'akathists' ? this.t.akathists.subtitle + : this.collection === 'parimii' ? this.t.parimii.subtitle + : this.collection === 'horologion' ? this.t.horologion.subtitle + : this.collection === 'sbornik' ? this.t.sbornik.subtitle + : this.collection === 'paraclete' ? this.t.paraclete.subtitle + : this.collection === 'irmologion' ? this.t.irmologion.subtitle : this.t.prayer.subtitle; + const subNavItems: { id: string; view: string; label: string }[] = [ + { id: 'prayer', view: 'prayer', label: this.t.nav.prayer }, + { id: 'akathists', view: 'akathists', label: this.t.nav.akathists }, + { id: 'horologion', view: 'horologion', label: this.t.nav.horologion }, + { id: 'sbornik', view: 'sbornik', label: this.t.nav.sbornik }, + { id: 'parimii', view: 'parimii', label: this.t.nav.parimii }, + { id: 'paraclete', view: 'paraclete', label: this.t.nav.paraclete }, + { id: 'irmologion', view: 'irmologion', label: this.t.nav.irmologion }, + { id: 'triodion', view: 'triodion', label: this.t.nav.triodion }, + ]; + this.container.innerHTML = `
-

${title}

-

${subtitle}

+
+ ${subNavItems.map(item => ` + + `).join('')} +
+

${subtitle}