- Route/Page:
/bible(served bybible.html) - Core script:
assets/js/bible-reader.js - Dedicated styles:
assets/css/bible.css - Metadata source:
assets/data/bible-books.json - Scripture source:
bible-data/*.json
- Hero + Verse of the Day widget
- Sticky Quick Navigation (book/chapter jump + search/plans/audio anchors)
- Bible Index
- Chapter Grid
- Recently Viewed
- Chapter Reader
- Verse Modal Panel
- Search Panel
- Audio Bible Panel
- Reading Plans Panel
/bible/bible/:bookSlug/bible/:bookSlug/:chapter/bible/:bookSlug/:chapter/:verse
Static-host fallback is supported via hash routes:
bible.html#/bible/john/3bible.html#/bible/john/3/16
Stored in localStorage for standalone deployment:
zgm-bible-bookmarkszgm-bible-recentszgm-bible-progresszgm-bible-reading-planszgm-bible-last-reading
Base: /api
Bible content:
GET /api/bible/booksGET /api/bible/:bookSlugGET /api/bible/:bookSlug/:chapterGET /api/bible/:bookSlug/:chapter/:verseGET /api/bible/search?q=grace&scope=all&page=1&limit=20GET /api/bible/audio/:bookSlug/:chapter
User state:
GET /api/user/:userId/bible/statePATCH /api/user/:userId/bible/state
Example state payload:
{
"bookmarks": [
{"bookSlug": "john", "chapter": 3, "verse": 16}
],
"progress": {
"john:3": {"scrollTop": 240, "updatedAt": 1760066000000}
},
"plans": {
"one-year": {"completedDays": 12}
},
"recents": [
{"slug": "john", "book": "John", "chapter": 3, "ts": 1760066000000}
]
}- Async loading with loading placeholders for chapter/search.
- Graceful error messaging for failed fetches.
- Chapter-level loading (lazy) to reduce initial payload.
- Paginated search results.
- Cached book chapter responses in-memory on frontend and API.
- Supports SEO-friendly canonical route design.
- Keyboard-accessible buttons and controls.
- ARIA labels for verse controls and quick navigation.
- Skip-link and modal close with Escape.
- Sufficient semantic structure with headings and nav regions.