feat: color themes, dark mode, HC/sepia themes, moon tooltip, docs update

This commit is contained in:
catarrh committed 2026-08-02 23:45:56 +03:00
1 parent 857adce5da
commit f45791579b
16 files changed
+389 -240

No files matched your search

+48 -20
View File
@@ -12,14 +12,14 @@ CIds are identifiers for saints, feasts, and liturgical elements. They follow th
| `02XX-02ZZ` | `02.json` | `023456`, `027890` | February saints |
| ... | ... | ... | ... |
| `12XX-12ZZ` | `12.json` | `123456`, `127890` | December saints |
| Other CIds | `misc.json` | `772426`, `373`, `868` | Non-month-prefixed |
| Other CIds | `misc/{first-digit}.json` | `772426→misc/7.json`, `373→misc/3.json` | Non-month-prefixed |
### Routing Logic
```typescript
function bundleFileForCid(cid: string): string {
return /^(0[1-9]|1[0-2])\d+/.test(cid)
? `${cid.substring(0, 2)}.json`
: 'misc.json';
: `misc/${cid.charAt(0)}.json`;
}
```
@@ -79,7 +79,7 @@ function bundleFileForCid(cid: string): string {
### Optional Fields
- **`name.short`**: Short name variant
- **`life.text`**: HTML content (only written when empty)
- **`life.id`**: Source identifier (e.g., "minei-0101-772426")
- **`life.id`**: Source identifier (e.g., "minei-0101-772426" or "bulgakov-...")
- **`life.copyright`**: Copyright string
## Service Template Structure
@@ -121,23 +121,43 @@ function bundleFileForCid(cid: string): string {
```
### Key Characteristics
- Generated by `convert-mines.ts` from EPUB source
- Generated by `convert-minei.ts` from EPUB source
- Stored in `scripts/output/minei.json` (gitignored, 33MB)
- Titles and HTML are carefully extracted and parsed
- Footnotes collected and appended as "Примечания:" blocks
## Bulgakov Source Format
### Format Definition
```json
{
"MM-DD": [
{
"title": "20-го июля — Св. пророк Илия",
"html": "<p>Content paragraphs...</p>"
}
]
}
```
### Key Characteristics
- Generated by `convert-bulgakov.ts` from "Настольная книга для священно-церковнослужителей" EPUB
- Stored in `scripts/output/bulgakov.json` (gitignored)
- Menaion section only (306 days, 332 entries)
- Secondary source: fills gaps, never overrides existing Minei content
## File Organization Rules
### Lives Files
- **Location**: `static/data/{lang}/lives/`
- **Files**:
- `01.json` through `12.json` (month-prefixed CIds)
- `misc.json` (non-month-prefixed CIds)
- **Routing**: Based on first two digits of CId
- `misc/0.json` through `misc/9.json` (non-month-prefixed CIds, split by first digit)
- **Routing**: Based on first two digits of CId (month) or first digit (misc)
### Menaion Files
- **Location**: `static/data/{lang}/menaion/`
- **Files**: `01-01.json` through `12-31.json` (daily entries)
- **Files**: bundied into `menaion-bundle.json` per language
- **Purpose**: Daily liturgical readings by date
### Service Templates
@@ -145,9 +165,15 @@ function bundleFileForCid(cid: string): string {
- **Shared**: `static/data/shared/services/templates/`
### Calendar Data
- **Location**: `static/data/{lang}/calendar/` and `static/data/shared/calendar/`
- **Location**: `static/data/shared/calendar/`
- **Purpose**: Movable feast calculations and metadata
### Scripture / Paremia Data
- **Location**: `static/data/shared/parimii/`
- **Monthly files**: `jan/full.json` through `dec/full.json`
- **Common files**: `common-saints/full.json`, `cheese-week/full.json`, etc.
- **Purpose**: Old Testament readings for Vespers
## Data Invariants
### CId Consistency Rules
@@ -158,7 +184,7 @@ function bundleFileForCid(cid: string): string {
### File Organization Invariants
- No month file contains CIds with different month prefix
- `misc.json` contains all CIds outside the 01-12 prefix range
- `misc/{n}.json` contains all CIds with matching first digit
- All data files are tracked in `static/data/`
### Content Validation Invariants
@@ -181,7 +207,7 @@ function bundleFileForCid(cid: string): string {
- ⚠️ Don't leave trailing commas in JSON
### File Organization Mistakes
- ⚠️ Don't place month-prefixed CIds in misc.json
- ⚠️ Don't place month-prefixed CIds in misc files
- ⚠️ Don't create inconsistent JSON indentation
- ⚠️ Don't mix languages in incorrect directories
@@ -190,7 +216,7 @@ function bundleFileForCid(cid: string): string {
### Valid CId Examples
- `010101` → `01.json` (January saint)
- `1253` → `12.json` (December saint)
- `772426` → `misc.json` (non-prefixed saint)
- `772426` → `misc/7.json` (non-prefixed saint)
### Invalid CId Examples
- `00501` → Should not exist (prefix `00` → misc)
@@ -198,8 +224,8 @@ function bundleFileForCid(cid: string): string {
### File Routing Examples
- CId `1253` routes to `12.json`
- CId `772426` routes to `misc.json`
- CId `010101` routes to `01.json`
- CId `772426` routes to `misc/7.json`
- CId `373` routes to `misc/3.json`
### Bundle Entry Examples
```json
@@ -232,15 +258,17 @@ function bundleFileForCid(cid: string): string {
### Coverage Statistics
- Total CIds: 3046
- Lives with text: 1190 (39% coverage)
- Empty lives: 1856 (61% remain)
- Lives with text: 1203 (39% coverage)
- Sources: Chetyi-Minei (1190) + Bulgakov (13)
- Empty lives: 1843 (61% remain)
### Data Files
- Total validated files: 274
- Main source files: 6 Lives bundle files (misc, 01-12)
- Lives bundle files: 12 month files (01-12) + 10 misc split files (0-9)
- Service template files: Multiple per language
- Parimii files: 12 monthly + common saints + triodion periods
### Recent Changes
- Bundle fix: 868 Иаков Боровицký moved from 05-22 to 10-23
- Enrichment: 64 manual fixes added to enrich-lives.ts
- Coverage increase: 1009→1190 lives with text (191 new)
- Bundle fix: 868 Иаков Боровицкий moved from 05-22 to 10-23
- Minei enrichment: 64 manual fixes added
- Bulgakov enrichment: 9 manual fixes added, 13 new lives
- Coverage increase: 1009→1190→1203 lives with text