Commit Graph

192 Commits

Author SHA1 Message Date
kennethreitz c42d01d4f4 Add sticky header, font size controls, and page prefetch
1. Sticky header on scroll
   - Shows current page title and breadcrumb navigation
   - Appears when scrolling past the main breadcrumb
   - Smooth slide-down animation

2. Font size controls (A/A buttons)
   - Small, normal, large, x-large sizes
   - Persisted to localStorage
   - Positioned next to dark mode toggle

3. Prefetch next/prev pages
   - Uses requestIdleCallback for non-blocking prefetch
   - Prefetches chapter/verse/book navigation links
   - Makes page-to-page navigation feel instant

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 14:26:39 -05:00
kennethreitz 789fd68ad2 Make sidebar always visible on desktop, toggle only on mobile
- Remove sidebar toggle button on desktop (>1200px)
- Sidebar now always visible on desktop for better navigation
- Keep hamburger menu toggle on mobile/tablet (<1200px)
- Remove backtick keyboard shortcut for sidebar toggle
- Update accessibility page to remove backtick reference

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 14:18:05 -05:00
kennethreitz 9d989e2189 Add accessibility page and improve site-wide accessibility
- Create dedicated accessibility page at /about/accessibility
- Add skip link for keyboard/screen reader users
- Add keyboard navigation to interlinear landing page
- Implement 2D grid navigation for theological studies on homepage
- Add accessibility section to homepage with keyboard shortcut info
- Fix verse text color contrast on fruits of the spirit page
- Fix malformed proverbs commentary data
- Update about page with accessibility link

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 01:13:29 -05:00
kennethreitz 8342316752 Highlight Resources nav item for all resource pages
All resource pages (parables, christology, biblical-prophets, etc.)
now correctly highlight the Resources nav item in the sidebar.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 19:48:13 -05:00
kennethreitz e4ef72330a Fix sidebar X button overlapping search input
Add top padding when sidebar is open to make room for the close button.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 17:35:38 -05:00
kennethreitz 11163ba9c1 Highlight Books nav item when viewing any book page
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 17:28:56 -05:00
kennethreitz baaabfa648 Remove OT/NT book lists from sidebar navigation
Users can access books via the Books page. Cleaner nav focuses on
features and actions rather than duplicating book navigation.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 17:18:10 -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 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 7b6758c021 Add tooltip support for new chapter anchor verse links
Updated parseVerseUrl to recognize /book/{book}/chapter/{chapter}#verse-{verse} format in addition to the old /verse/ path format.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 12:46:33 -05:00
kennethreitz ec7fcf91ef Fix site-wide verse linking to use chapter anchors and skip already-linked content
- Updated base.html JavaScript to use chapter anchors instead of verse pages
- Added filter to skip text nodes inside anchor tags to prevent double-linking

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 12:32:19 -05:00
kennethreitz e2905cf9fe Redesign sidebar navigation and add current page highlighting
- Cleaner link styling with rounded corners and hover backgrounds
- CSS triangle expand arrows instead of text characters
- Refined typography, spacing, and search box styling
- Add 'n' key to activate sidebar navigation (j/k to navigate, Enter to select)
- Highlight current page in green on sidebar links

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 00:45:38 -05:00
kennethreitz 6a9cebae22 Improve keyboard navigation, PDFs, and add non-writing prophets
- Add KJVNav.initSimpleNav() for DRY keyboard navigation across site
- Fix broken keyboard nav on 10+ resource pages (orphaned JS code)
- Left arrow on chapters now does browser back
- Add non-writing prophets: Moses, Samuel, Nathan, Elijah, Elisha
- Redesign chapter PDFs with glossary, cross-refs, book intro
- Style sidenotes as inline notes in all PDFs (fix checkbox squares)
- More liberal word studies in PDF output (for_pdf parameter)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 00:28:25 -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 2163d56185 Add !important to mobile sidenote display rules
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 23:41:22 -05:00
kennethreitz f61a78a6c5 Hide sidenotes on mobile by default, expand on click
- Add mobile media query to hide sidenotes by default
- Show sidenotes when checkbox is clicked (tap on number)
- Style expanded sidenotes with background and border for clarity

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 23:33:49 -05:00
kennethreitz b11f6e9297 Add padding-bottom to asterism to prevent cutoff 2025-12-01 19:06:04 -05:00
kennethreitz 513577c143 Adjust asterism margin-top to -0.5rem 2025-12-01 19:05:37 -05:00
kennethreitz c26c603feb Add bottom margin to asterism in nav 2025-12-01 19:05:16 -05:00
kennethreitz 1855b3faca Make asterism smaller in nav 2025-12-01 19:04:55 -05:00
kennethreitz 0f11085d4e Move asterism directly below About KJV Study link 2025-12-01 19:04:35 -05:00
kennethreitz 45659aff00 Move red letters toggle from nav to keyboard shortcut
- Remove "Disable Red Letters" link from sidebar navigation
- Add Shift+R keyboard shortcut to toggle red letters
- Update keyboard help modal with new shortcut

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 18:47:48 -05:00
kennethreitz f0933b3bac Change navigation link text to 'About KJV Study'
More descriptive than just 'About' - makes it clear what the
link is about when viewing the navigation.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 18:15:07 -05:00
kennethreitz 2ba1d28efd Add About link to navigation and breadcrumbs to all about pages
- Added About link at bottom of sidebar navigation
- Added breadcrumbs to /about, /about/stats, /about/commentary, /about/cross-references
- Removed emoji from "Open Source & Free" heading on about page

All about-related pages now have proper navigation structure.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 18:13:45 -05:00
kennethreitz d439acbdea Add hidden analytics opt-out feature via ?kr=1 parameter
Users can now disable analytics by visiting homepage with ?kr=1:
- Detects ?kr=1 parameter and sets localStorage + cookie
- Analytics script checks both before loading
- Persists across sessions (10 year cookie + localStorage)
- ?kr=0 re-enables analytics if needed
- Clean URL redirect after setting preference
- Fully client-side, privacy-focused implementation

Technical details:
- localStorage primary (instant, no server traffic)
- Cookie fallback (315360000s = 10 years)
- window.analyticsDisabled flag for runtime checks
- Gauges analytics respects opt-out flag

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 17:27:43 -05:00
kennethreitz 9466da7cc0 Refactor resource reading logic to improve selection handling and enhance text extraction from articles 2025-11-30 13:26:25 -05:00
kennethreitz 3681359291 Enhance resource reader functionality and improve selection handling across templates 2025-11-30 12:59:41 -05:00
kennethreitz 937d98517b Refactor HTML templates to wrap descriptions in paragraph tags and enhance selection handling in JavaScript for improved accessibility and styling. 2025-11-30 12:34:38 -05:00
kennethreitz d4e7fd1a1d Read highlighted or first resource card on space 2025-11-30 12:19:19 -05:00
kennethreitz ac8c9020a1 Default resource reader to enabled (opt-out via data flag) 2025-11-30 12:17:31 -05:00
kennethreitz aa7445f9f3 Strip scripts/styles from resource speech text 2025-11-30 12:14:43 -05:00
kennethreitz 96c6eaf560 Read full article when no selection on resource pages 2025-11-30 12:02:20 -05:00
kennethreitz d5c10ac403 Implement dedicated resource speech playback 2025-11-30 12:00:28 -05:00
kennethreitz 0168e9fdba Make resource reader respect selected elements and body descriptions 2025-11-30 11:53:08 -05:00
kennethreitz cfc7d46f7c Read article-scoped content for resource spacebar 2025-11-30 11:50:36 -05:00
kennethreitz d358e3a832 Broaden resource reader selectors for div descriptions 2025-11-30 11:48:45 -05:00
kennethreitz a7cb9aee9f Expand resource reader to description divs 2025-11-30 11:48:12 -05:00
kennethreitz e88ef39a82 Include headings with content when reading resource pages 2025-11-30 11:46:45 -05:00
kennethreitz a4373efa58 Prepend page headings to resource spacebar reading 2025-11-30 11:44:46 -05:00
kennethreitz 619eaf8070 Make resource spacebar read full page when unselected 2025-11-30 11:43:30 -05:00
kennethreitz 04a693870b Add resource reader spacebar support on reference pages 2025-11-30 11:42:44 -05:00
kennethreitz 1f892978f8 Enhance theming support by updating color variables and ensuring consistent styling across sidenotes and marginnotes 2025-11-30 10:38:29 -05:00
kennethreitz 77ffc9ccbf Update sidenote and marginnote styles for improved theming support 2025-11-30 10:24:28 -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 09e7db70d9 Make cache progress indicator clickable
The 'Caching for offline' indicator is now a link to /offline page.
Also added toLocaleString() for page count formatting.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 01:55:35 -05:00
kennethreitz 365cef49c7 Disable PDF buttons when offline
- PDF links/buttons are greyed out (40% opacity) when offline
- Adds strikethrough and "not-allowed" cursor
- Shows tooltip "PDF unavailable offline"
- Prevents click events
- Re-enables automatically when back online

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 01:38:32 -05:00
kennethreitz 69be068188 Fix service worker registration by serving from root path
Service workers can only control URLs within their scope. A service worker
at /static/sw.js couldn't control the root scope (/) without special headers.

- Add /sw.js route that serves the service worker with Service-Worker-Allowed: /
- Update registration to use /sw.js instead of /static/sw.js

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 01:20:50 -05:00
kennethreitz 94f42ea751 Add 'Enable Offline' link to sidebar navigation
Adds a link to the /offline debug page at the bottom of the sidebar,
allowing users to easily access offline status and cached pages list.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 01:19:29 -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 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