feat: Gregorian default calendar, Hymnal label, day header cleanup
- Default calendar type julian -> gregorian (new installs only) - EN nav 'Sbornik' -> 'Hymnal', section title -> 'Liturgical Hymnal' - Day header: text-sm on date lines, weekday dropped from Julian line, order: Julian / day-title / Gregorian
This commit is contained in:
1 parent
ea09993df9
commit
c8e11f0af7
4 files changed
+11
-11
No files matched your search
+2
-2
@@ -548,7 +548,7 @@ const translations: Record<LanguageCode, Translations> = {
|
|||||||
akathists: '📜 Canons & Akathists',
|
akathists: '📜 Canons & Akathists',
|
||||||
parimii: '📖 Paroemia',
|
parimii: '📖 Paroemia',
|
||||||
horologion: '⏰ Horologion',
|
horologion: '⏰ Horologion',
|
||||||
sbornik: '📚 Sbornik',
|
sbornik: '📚 Hymnal',
|
||||||
paraclete: '📗 Paraclete',
|
paraclete: '📗 Paraclete',
|
||||||
irmologion: '🎵 Irmologion',
|
irmologion: '🎵 Irmologion',
|
||||||
menaion: '📕 Menaion',
|
menaion: '📕 Menaion',
|
||||||
@@ -601,7 +601,7 @@ const translations: Record<LanguageCode, Translations> = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
sbornik: {
|
sbornik: {
|
||||||
title: 'Богослужебный сборник',
|
title: 'Liturgical Hymnal',
|
||||||
subtitle: 'Reference collection: troparia, kontakia, theotokia and biblical songs (Church Slavonic)',
|
subtitle: 'Reference collection: troparia, kontakia, theotokia and biblical songs (Church Slavonic)',
|
||||||
sections: {
|
sections: {
|
||||||
sunday: 'Troparia and Kontakia: Sunday',
|
sunday: 'Troparia and Kontakia: Sunday',
|
||||||
|
|||||||
+1
-1
@@ -231,7 +231,7 @@ export class App {
|
|||||||
// Re-read settings fresh on each navigation
|
// Re-read settings fresh on each navigation
|
||||||
this.settings = loadSettings();
|
this.settings = loadSettings();
|
||||||
const lang = this.settings.language as LanguageCode;
|
const lang = this.settings.language as LanguageCode;
|
||||||
const calendarType = this.settings.calendarType || 'julian';
|
const calendarType = this.settings.calendarType || 'gregorian';
|
||||||
|
|
||||||
switch (this.currentView) {
|
switch (this.currentView) {
|
||||||
case 'calendar':
|
case 'calendar':
|
||||||
|
|||||||
@@ -398,7 +398,7 @@ export class CalendarView {
|
|||||||
private t: ReturnType<typeof getTranslations>;
|
private t: ReturnType<typeof getTranslations>;
|
||||||
private calendarType: 'julian' | 'gregorian';
|
private calendarType: 'julian' | 'gregorian';
|
||||||
|
|
||||||
constructor(container: HTMLElement, date: JDate, onDateChange: (d: JDate) => void, language: LanguageCode = 'en', calendarType: 'julian' | 'gregorian' = 'julian') {
|
constructor(container: HTMLElement, date: JDate, onDateChange: (d: JDate) => void, language: LanguageCode = 'en', calendarType: 'julian' | 'gregorian' = 'gregorian') {
|
||||||
this.container = container;
|
this.container = container;
|
||||||
this.currentDate = date;
|
this.currentDate = date;
|
||||||
this.onDateChange = onDateChange;
|
this.onDateChange = onDateChange;
|
||||||
@@ -550,10 +550,9 @@ export class CalendarView {
|
|||||||
const gregorianDayName = this.t.calendar.dayNamesFull[gregorianDate.getDay()];
|
const gregorianDayName = this.t.calendar.dayNamesFull[gregorianDate.getDay()];
|
||||||
const gregorianStr = `${gregorianDayName}, ${gregorianDate.getDate()} ${this.t.calendar.monthsGenitive[gregorianDate.getMonth()]} ${gregorianDate.getFullYear()} г.`;
|
const gregorianStr = `${gregorianDayName}, ${gregorianDate.getDate()} ${this.t.calendar.monthsGenitive[gregorianDate.getMonth()]} ${gregorianDate.getFullYear()} г.`;
|
||||||
// Julian date (church calendar)
|
// Julian date (church calendar)
|
||||||
const julianDayName = this.t.calendar.dayNamesFull[this.currentDate.getDayOfWeek()];
|
|
||||||
// Anno Mundi year (Old Slavonic year = year + 5508)
|
// Anno Mundi year (Old Slavonic year = year + 5508)
|
||||||
const annoMundi = julianYear + 5508;
|
const annoMundi = julianYear + 5508;
|
||||||
const julianStr = `${julianDayName}, ${this.currentDate.getDay()} ${this.t.calendar.monthsGenitive[this.currentDate.getMonth() - 1]}, год ${julianYear} ${this.t.calendar.fromYear}, ${annoMundi} ${this.t.calendar.fromAdam}`;
|
const julianStr = `${this.currentDate.getDay()} ${this.t.calendar.monthsGenitive[this.currentDate.getMonth() - 1]}, год ${julianYear} ${this.t.calendar.fromYear}, ${annoMundi} ${this.t.calendar.fromAdam}`;
|
||||||
|
|
||||||
this.container.innerHTML = `
|
this.container.innerHTML = `
|
||||||
<div class="flex flex-col lg:flex-row h-full justify-center">
|
<div class="flex flex-col lg:flex-row h-full justify-center">
|
||||||
@@ -574,15 +573,16 @@ export class CalendarView {
|
|||||||
|
|
||||||
<div class="flex-1 p-3 overflow-auto">
|
<div class="flex-1 p-3 overflow-auto">
|
||||||
<div class="max-w-2xl lg:max-w-3xl xl:max-w-4xl mx-auto">
|
<div class="max-w-2xl lg:max-w-3xl xl:max-w-4xl mx-auto">
|
||||||
<h2 class="text-base font-bold text-red mb-1">
|
<h2 class="text-sm font-bold text-red mb-1">
|
||||||
${julianStr}
|
${julianStr}
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
<div id="day-title" class="mb-2"></div>
|
||||||
|
|
||||||
<div class="text-sm text-navy-light mb-2">
|
<div class="text-sm text-navy-light mb-2">
|
||||||
${this.t.calendar.gregorianDate[0].toLowerCase() + this.t.calendar.gregorianDate.slice(1)}: ${gregorianStr}
|
${this.t.calendar.gregorianDate[0].toLowerCase() + this.t.calendar.gregorianDate.slice(1)}: ${gregorianStr}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="day-title" class="mb-2"></div>
|
|
||||||
|
|
||||||
<div id="astro-panel" class="mb-2 p-2 bg-surface/50 border border-gold/20 rounded-lg text-sm text-navy">
|
<div id="astro-panel" class="mb-2 p-2 bg-surface/50 border border-gold/20 rounded-lg text-sm text-navy">
|
||||||
<span class="text-navy-light italic">${this.t.loading}</span>
|
<span class="text-navy-light italic">${this.t.loading}</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -754,7 +754,7 @@ export class CalendarView {
|
|||||||
const toneSuffix = tone > 0 ? `; ${this.t.calendar.tone}${tone}` : '';
|
const toneSuffix = tone > 0 ? `; ${this.t.calendar.tone}${tone}` : '';
|
||||||
const feastSuffix = feastName && feastCid !== periodCid ? `; ${feastName}` : '';
|
const feastSuffix = feastName && feastCid !== periodCid ? `; ${feastName}` : '';
|
||||||
const titleColor = feastName ? 'text-red-700' : 'text-navy';
|
const titleColor = feastName ? 'text-red-700' : 'text-navy';
|
||||||
titleEl.innerHTML = `<span class="text-base font-semibold ${titleColor} italic">${periodName}${toneSuffix}${feastSuffix}</span>`;
|
titleEl.innerHTML = `<span class="text-sm font-semibold ${titleColor} italic">${periodName}${toneSuffix}${feastSuffix}</span>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (feastCid) this.skipCids.add(feastCid);
|
if (feastCid) this.skipCids.add(feastCid);
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ const DEFAULT_SETTINGS: Settings = {
|
|||||||
defaultBibleVersion: 'kjv',
|
defaultBibleVersion: 'kjv',
|
||||||
showVerseNumbers: true,
|
showVerseNumbers: true,
|
||||||
verseNewLine: false,
|
verseNewLine: false,
|
||||||
calendarType: 'julian',
|
calendarType: 'gregorian',
|
||||||
serviceRole: 'priest',
|
serviceRole: 'priest',
|
||||||
latitude: 55.7558,
|
latitude: 55.7558,
|
||||||
longitude: 37.6176,
|
longitude: 37.6176,
|
||||||
|
|||||||
Reference in new issue
Block a user