Commit Graph

83 Commits

Author SHA1 Message Date
kennethreitz 9139def397 Improve dark mode contrast for verse text
- Increase --text-secondary from #a3a3a3 to #c4c4c4 for better readability
- Update verse text to use text-primary with 0.85 opacity for clearer Scripture
- Change verse item border to accent-color for better visual hierarchy

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 17:03:34 -05:00
kennethreitz faeea81f07 Add keyboard shortcuts for quick navigation to Genesis and Matthew; update help text 2025-12-02 13:20:50 -05:00
kennethreitz c22000287c Simplify chapter nav tip and change 'p' shortcut to PDF
- Shortened nav help to "Tip: ↑/↓ to select verses • ? for more shortcuts"
- Changed 'p' keyboard shortcut from Reading Plans to PDF download

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 13:04:27 -05:00
kennethreitz 8322a88edd Extract base.html inline JS to separate file and update test expectations
- Extracted ~1250 lines of JavaScript from base.html to static/base.js
- Reduced base.html from ~2700 lines to ~1440 lines
- Updated tests to expect 404 (not 500) for invalid resources
- Updated CLAUDE.md to reflect proper error handling

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 12:57:57 -05:00
kennethreitz 28f37f68c3 Fix dark mode conflict when OS is dark but site theme is light
- Wrap prefers-color-scheme dark styles with html:not([data-theme="light"])
- Fixes interlinear text being white on yellowish background
- Updated verse.html, chapter_interlinear.html, tufte.css, base.html,
  and family-tree-expansions.css

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 23:51:57 -05:00
kennethreitz 8537fb548f Remove offline functionality and PWA features
Removed service worker, PWA manifest, offline page, and all related UI components to simplify the application and reduce bloat.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 08:51:54 -05:00
kennethreitz c5712d06f8 Reduce service worker concurrency to 80
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 02:10:35 -05:00
kennethreitz 014fb0b2fa Set progress interval to 200
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 01:52:32 -05:00
kennethreitz 3df9a95acb Increase download concurrency to 200 workers
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 01:52:16 -05:00
kennethreitz be2a2f0c62 Add collapsible URL list with keyboard navigation
- Collapsible category sections for cached pages
- Categories: Main Pages, Bible Chapters, Verse Commentary,
  Interlinear, Stories, Topics, Study Guides, etc.
- Clean URL display: %20 replaced with spaces, paths cleaned up
- Keyboard navigation: j/k to navigate, Enter/Space to expand,
  h/l for left/right, Esc to back out, u to enter URL nav mode
- Increased download concurrency from 50 to 100 workers
- Progress notifications every 250 completions (was 100)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 01:51:58 -05:00
kennethreitz 6dc6c60ec6 Use concurrent worker pool for faster offline caching
Replace sequential batch downloads with a concurrent pool pattern
using 50 simultaneous workers. This dramatically speeds up the
caching of ~48,000 pages for offline use.

- Each worker pulls URLs from a shared queue
- Progress notifications sent every 100 pages
- Workers run in parallel using Promise.all()

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 01:50:14 -05:00
kennethreitz 47b74af662 Show offline caching progress on page load
- Service worker now responds to GET_CACHE_STATUS message
- /offline page queries caching status when it loads
- If download is in progress, shows progress bar immediately without requiring click

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 01:42:45 -05:00
kennethreitz c33dc5813b Dynamic sitemap-based offline caching
Major improvements to offline caching:
- Service worker now parses sitemaps dynamically instead of hardcoded URL lists
- Fetches /sitemap.xml and any child sitemaps (sitemap-main.xml, sitemap-verses.xml)
- Caches ALL pages found in sitemaps including 31,102 individual verse pages
- Much cleaner, smaller service worker (~300 lines vs ~1800 lines)
- Added status messages during sitemap parsing
- Better error handling with retry option

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 01:33:09 -05:00
kennethreitz b8124033bf Improve offline fallback: redirect uncached pages to /offline reader
- Interlinear pages now redirect to offline reader with book/chapter params
- All uncached HTML pages now go to /offline instead of homepage
- Bumped cache version to v5

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 01:30:49 -05:00
kennethreitz c6ae359e16 On-demand offline caching with all stories
Changes:
- Caching now only starts when user clicks "Download for Offline Use" on /offline page
- Added all 186 Bible stories (including kids mode) to cache list
- Added progress bar and status indicators on /offline page
- Bumped cache version to v4
- Total cacheable pages: ~1,500 (1189 chapters + 186 stories + 66 books + resources)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 01:27:24 -05:00
kennethreitz 357243c396 Cache entire site offline: all 1189 Bible chapters + resources
Updated service worker to pre-cache:
- All 1189 chapter pages (Genesis 1 through Revelation 22)
- All 66 book overview pages
- All resource/reference pages (topics, stories, study guides, etc.)
- Total: ~1300+ pages for complete offline access

Also bumped cache version to v3 and increased batch size for faster caching.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 01:24:51 -05:00
kennethreitz e21ecfdf44 Fix service worker URL list with 388 verified pages
- Verified all URLs actually return 200 status
- Fixed topic URLs (need capital letters: /topics/Faith not /topics/faith)
- Fixed story URLs (use slugs like /stories/god-creates-the-world)
- Fixed resource URLs (e.g. /fruits-of-the-spirit not /fruits-of-spirit)
- Added all parables, reading plans, study guides
- Total: 388 pages now pre-cached in background

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 01:14:10 -05:00
kennethreitz bc8149ceb7 Add background pre-caching for full offline support
- Service worker now pre-caches ~160 pages in background after install
- Includes all resource pages, topics, study guides, stories, book pages
- Caches in batches of 5 with 1-second delays to avoid overwhelming server
- Progress indicator shows "Caching for offline: X%" in bottom-left
- Shows "Ready for offline! (X pages)" when complete, then fades out
- Bumped cache version to v2 to trigger re-cache

Combined with the Bible JSON (~4.7MB), the entire site is now
available offline after first visit.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 01:09:35 -05:00
kennethreitz 87926fa83c Add offline Bible reader with full 31,102 verses
- Created /offline route with client-side Bible renderer
- Loads verses from cached JSON (verses-1769.json)
- Full book/chapter navigation with dropdowns
- Keyboard navigation (← → for chapters)
- Service worker redirects to offline reader when Bible pages fail
- Pre-caches offline reader page on install
- Auto-parses URL params (?book=Genesis&chapter=1)

When offline, users can read any chapter of the Bible using
the cached JSON data - no need to have visited the page before.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 01:04:32 -05:00
kennethreitz 677f8f05b7 Add Service Worker for offline Bible access
- Created sw.js with caching strategies:
  - Static assets (CSS, JS, fonts) - cache first
  - Bible pages - network first, cache fallback
  - API requests - network first with offline cache
- Pre-caches verses-1769.json (~4.7MB) on install
- Added service worker registration to base.html
- Added offline indicator (red badge in bottom-right)
- Linked manifest.json for PWA support

Users can now read the Bible offline after first visit.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 01:00:29 -05:00
kennethreitz 70f8e97f67 Add sidenote spacing in style.css (0.6rem)
Reverted tufte.css change and added override in custom styles.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 15:31:00 -05:00
kennethreitz f6a4b94022 Add slight spacing between sidenotes (0.6rem)
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 15:30:22 -05:00
kennethreitz 1e1d561c26 Add Open Graph image for better social media previews
Created a clean, Tufte-style og-image.png (1200x630) featuring "KJV Study" branding. This eliminates the 404 spam in logs from bots and social media crawlers trying to fetch the missing image, and provides proper preview images when the site is shared on social media platforms.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 12:23:21 -05:00
kennethreitz 3493c43144 Fix verse sitemap generation - suppress WeasyPrint warnings
The sitemap-verses.xml file was contaminated with WeasyPrint import
warnings, causing "Document is empty" errors in Google Search Console.

Fixes:
- Suppress stdout/stderr during imports to prevent warnings in output
- Add error handling to sitemap-verses endpoint
- Regenerate clean sitemap-verses.xml (6.3MB, 31,102 verses)

The file now starts with proper XML declaration instead of error messages.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 19:37:34 -05:00
kennethreitz e931dae83f Implement static verse sitemap for maximum SEO discoverability
Previously, verse URLs (31,102 pages) were excluded from the sitemap
to improve generation speed. This left SEO value on the table - Google
prioritizes URLs in sitemaps for crawling, and verse pages are 3-4
clicks deep, making discovery slow.

Solution: Static sitemap + sitemap index
-----------------------------------------
- Created generate_verse_sitemap.py to generate verse sitemap once
- Generated sitemap-verses.xml (6 MB, 31,102 verse URLs)
- Converted /sitemap.xml to a sitemap index
- Split into sitemap-main.xml (dynamic) and sitemap-verses.xml (static)

Benefits:
---------
- Zero runtime cost for verse sitemap (served as static file)
- Full SEO coverage of all 31k verse pages
- Google gets complete URL list immediately
- Main sitemap stays fast (no verse URL generation)
- CDN can cache verse sitemap indefinitely

Why this works:
---------------
Verse URLs are completely static - Genesis 1:1 will always be at the
same URL. The Bible hasn't changed in 2000+ years, so these URLs
never change. Generate once, commit to repo, infinite caching.

This trades "optimize build speed" for "optimize discoverability."
Build speed is a one-time cost; search rankings compound over time.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 19:22:39 -05:00
kennethreitz 9ec7885dce Make PDF generation async to prevent event loop blocking
Convert all PDF generation endpoints from synchronous to async to
prevent blocking FastAPI's event loop during CPU-intensive operations.

Changes:
- Add render_html_to_pdf_async() using ThreadPoolExecutor (2 workers)
- Convert all PDF endpoints to async def
- Use await render_html_to_pdf_async() instead of blocking calls
- Keep render_html_to_pdf() for backward compatibility

Performance impact:
- Prevents event loop blocking during PDF generation
- Allows other requests to be processed while PDFs are rendering
- Limits concurrent PDF generation to 2 workers to control CPU usage

Files updated:
- kjvstudy_org/utils/pdf.py (new async implementation)
- kjvstudy_org/server.py (5 PDF endpoints)
- kjvstudy_org/routes/api.py (4 PDF endpoints)
- kjvstudy_org/routes/resources.py (7 PDF endpoints)
- kjvstudy_org/routes/stories.py (2 PDF endpoints)
- kjvstudy_org/routes/study_guides.py (1 PDF endpoint)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 11:44:35 -05:00
kennethreitz f4c53d4170 Revert "Remove max-height constraint on sidenote numbers"
This reverts commit 24e69f0397.
2025-11-23 19:39:25 -05:00
kennethreitz 24e69f0397 Remove max-height constraint on sidenote numbers
Allow sidenote numbers to display at their natural height instead
of being constrained to 2rem.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 19:39:08 -05:00
kennethreitz ae65209864 Add data-theme dark mode support alongside system preference
Fix dark mode for both system preference and manual toggle:
- Support both @media (prefers-color-scheme: dark) and [data-theme="dark"]
- Fix interlinear word cards showing white in dark mode
- Fix sidenotes/marginnotes showing white boxes in dark mode

This ensures dark mode works whether users have system dark mode
enabled OR use the manual dark mode toggle button.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 15:16:16 -05:00
kennethreitz 2566299a33 Fix dark mode styling for sidenotes and interlinear cards
Add comprehensive dark mode support for:
- Sidenotes and marginnotes (fixing white box issue)
- Interlinear word cards and all text elements
- Links, headings, and borders in dark mode
- Buttons, inputs, and navigation elements

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 15:14:13 -05:00
kennethreitz 981e8a7405 Update to latest Tufte CSS with dark mode support
- Updated to latest version from tufte-css repository
- Kept existing font paths (/static/fonts/)
- Adds dark mode support via prefers-color-scheme
- Minor improvements and updates from upstream

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 17:18:55 -05:00
kennethreitz 9fe291f7af updates 2025-11-11 12:24:34 -05:00
kennethreitz 417c392b26 Remove Scofield commentary and sidebar
The commit removes the Scofield commentary feature and sidebar navigation, switching to a cleaner mobile-first layout. The main content is now centered with a max-width, and navigation is handled through a bottom bar.
2025-06-02 12:49:31 -04:00
kennethreitz b422984fa2 Add custom scrollbar and scroll behavior to sidebar
The changes add a custom scrollbar and enhanced scroll functionality to
the sidebar, with cross-browser support, accessibility features, and
device-specific optimizations.
2025-06-01 12:53:29 -04:00
kennethreitz 8cda9e84db Remove feature documentation files
The changes remove several documentation files and simplify the iPad sidebar behavior to always show on non-mobile devices.

Key changes:
- Remove unused documentation markdown files
- Remove keyboard shortcut to toggle sidebar
- Make sidebar always visible on non-mobile devices
- Fix CSS and JavaScript to prevent sidebar from hiding
- Simplify sidebar positioning and transitions
2025-06-01 12:43:37 -04:00
kennethreitz 5ad6ef495a Add iPad and tablet keyboard navigation support
This commit adds comprehensive keyboard and touch support for iPad and tablet
devices, including enhanced navigation shortcuts, improved focus indicators,
and optimized sidebar behavior.

The changes include:

- Cmd+B shortcut for sidebar toggle on tablets
- Enhanced keyboard navigation with arrow keys
- Improved focus styles and touch targets
- Optimized layouts for different iPad models
- Better support for hybrid touch/keyboard usage
- Accessibility improvements for
2025-06-01 12:27:02 -04:00
kennethreitz 0076a9a01d additions 2025-05-30 20:24:06 -04:00
kennethreitz 64356ad018 Add GEDCOM parser for family tree visualization 2025-05-30 20:20:44 -04:00
kennethreitz fda2680c54 Add FamilySearch-style interactive family tree
The commit adds a new FamilySearch-style interactive family tree visualization with person cards, smooth animations, and hierarchical layout. Includes navigation controls, multiple view modes, and responsive design.
2025-05-30 20:18:45 -04:00
kennethreitz 13fba60637 Add comprehensive family tree feature expansion 2025-05-30 19:53:20 -04:00
kennethreitz 7c92e5ce18 Add family tree visualization features and analytics
The changes introduce three new JavaScript files that add comprehensive family tree visualization and analysis capabilities:

1. Advanced tree layouts with multiple visualization modes (hierarchical, radial, force-directed, timeline, and circular pedigree)
2. Detailed analytics and statistics with interactive charts
3. Advanced search functionality with tree highlighting and navigation features

The additions provide users with richer ways to explore and analyze biblical family relationships.
2025-05-30 19:46:13 -04:00
kennethreitz f33371ffe3 Add Scofield Commentary JSON data
The reason I chose this commit message:
- Clearly states what is being added (Scofield Commentary data)
- Specifies the format (JSON)
- Short and to the point
- No need for a message body since the subject line fully captures the change
2025-05-30 16:11:51 -04:00
kennethreitz 98fd3a7cc1 back it uppp 2025-05-30 15:39:17 -04:00
kennethreitz 73ffb273e2 changes 2025-05-30 15:25:32 -04:00
kennethreitz 322571e535 Create adameve.ged 2025-05-30 15:14:15 -04:00
kennethreitz 6d0781de94 Remove biblical maps feature
Delete map functionality and associated templates/files
2025-05-30 14:36:11 -04:00
kennethreitz 80b4738422 Refactor biblical maps for better reliability
This commit simplifies and improves the biblical maps implementation by:

- Replacing complex client-side map with clean tile-based solution
- Adding fallback tile providers for better reliability
- Simplifying markers and popup styling
- Improving error handling and user feedback
- Using circle markers instead of custom icons for better performance
- Streamlining location data structure and management

The changes make the maps more robust while maintaining core functionality.
2025-05-30 14:18:37 -04:00
kennethreitz 5abadcd165 Add dark theme support and new biblical locations
The commit adds dark theme support for the biblical maps, including a new
CARTO dark basemap option. Also adds several new biblical locations like
Hebron, Samaria, Caesarea, Philippi and Thessalonica. Updates popup
styling to match dark theme colors and moves CSS to template file.
2025-05-30 13:49:47 -04:00
kennethreitz 5e2edcd822 Add interactive biblical maps feature 2025-05-30 13:40:16 -04:00
kennethreitz 227d0f2e53 Update style.css 2025-05-30 13:10:32 -04:00