Commit Graph

449 Commits

Author SHA1 Message Date
kennethreitz f3bd35b832 Filter API docs to only show /api endpoints
Add custom OpenAPI schema generation to filter documentation
to only include routes starting with /api/. This keeps the
API docs clean and focused on the actual API endpoints without
cluttering them with web page routes.

The /api/docs will now only show:
- /api/search
- /api/verse-of-the-day
- /api/verse/{book}/{chapter}/{verse}
- /api/verse-range/{book}/{chapter}/{start}/{end}

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 12:26:10 -05:00
kennethreitz 298bf16f54 Configure API documentation at /api/docs
Move FastAPI automatic documentation to /api/* endpoints:
- /api/docs - Swagger UI (interactive API documentation)
- /api/redoc - ReDoc (alternative documentation format)
- /api/openapi.json - OpenAPI schema

Updated API title and description to better reflect the
RESTful API nature of the endpoints.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 12:24:37 -05:00
kennethreitz 0dc7c94cdc Add comprehensive book abbreviation support
Add extensive abbreviation mappings to normalize_book_name function
to handle common Bible book abbreviations. URLs like /book/Gen/...
will now automatically redirect to /book/Genesis/...

Supports all standard abbreviations including:
- Gen, Ge for Genesis
- Ex, Exo for Exodus
- Mt, Mat for Matthew
- And many more...

This improves URL flexibility and user experience when typing
abbreviated book names directly in the address bar.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 12:23:09 -05:00
kennethreitz 947e275a91 Add Angelology to Quick Access links
Add a quick link to the Biblical Angels (Angelology) study
resource, providing direct access to teachings about angels
from Scripture.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 12:19:21 -05:00
kennethreitz 51f72828e2 Convert Quick Access to card grid and move above welcome
Transform Quick Access from inline links to a card-based grid
layout for better visual hierarchy and easier navigation. Move
the section above the welcome text so visitors see navigation
options immediately after the search box.

Card styling includes:
- Responsive grid layout (auto-fit with min 200px cards)
- Bordered cards with hover effects
- Mobile-optimized with larger touch targets

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 12:18:35 -05:00
kennethreitz 89959b4dac Position verse of the day after title, before search
Place the daily verse after the title page but before the
search box. This provides a natural reading flow: title,
daily verse, then navigation tools.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 12:16:46 -05:00
kennethreitz 9893f3313d Move verse of the day to the very top of homepage
Place the daily verse as the first element visitors see,
before the title and search box. This immediately presents
Scripture to visitors when they arrive at the site.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 12:16:16 -05:00
kennethreitz 8dd3a04bf8 Simplify study guide breadcrumbs
Remove category level from breadcrumbs for cleaner navigation.
Breadcrumb trail now shows: Home > Study Guides > Guide Title

This is simpler and more direct, as the category is already
visible on the study guides listing page.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 11:34:00 -05:00
kennethreitz 0680b22a9e Add proper breadcrumbs to study guide pages
Implement breadcrumb navigation using the established breadcrumb
system in base.html. Breadcrumb trail shows:
Home > Study Guides > Category > Guide Title

The server-side code determines the category for each guide slug
and builds the appropriate breadcrumb structure. Base.html renders
the breadcrumbs with proper styling and separators.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 11:33:07 -05:00
kennethreitz 48e799d20c Add breadcrumbs to study guide detail pages
Replace subtitle with breadcrumb navigation showing:
Home › Study Guides › Category

This improves site navigation by showing users their location
in the site hierarchy and providing quick links back to the
study guides listing and homepage.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 11:30:49 -05:00
kennethreitz bb131edbd3 Reorder Quick Access and add Study Guides link
Move Random Verse to the first position in Quick Access for
immediate discoverability - encouraging spontaneous Scripture
exploration. Add Study Guides as the second link, providing
quick access to in-depth theological studies.

The reordered navigation prioritizes exploration (Random Verse)
and study depth (Study Guides) before browsing and topical access.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 11:28:59 -05:00
kennethreitz df2ed86bbc Add 'Browse All 66 Books' link below search
Add a prominent, centered call-to-action link immediately after
the search box, providing quick access to the books listing page.
This gives visitors an immediate alternative to searching - they
can browse the complete Bible structure instead.

The link is bold, centered, and uses an arrow (→) to indicate
navigation, making it visually distinct from the search help text.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 11:26:23 -05:00
kennethreitz 831f18e449 Move Quick Access section below Verse of the Day
Reorder homepage sections to provide immediate navigation options
after the devotional element:

1. Title
2. Search box
3. Welcome introduction
4. Verse of the Day
5. Quick Access (moved up from position 8)
6. Sacred Scriptures
7. Study Resources
8. Study Guides
9. About the Translation

This places key navigation links earlier in the page flow, making
them more discoverable for visitors while maintaining the devotional
and informational content.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 11:25:30 -05:00
kennethreitz ef78aeb4e7 Make all Study Resources links bold
Bold all navigation links in the Study Resources section to
increase their visibility and make it clearer which items are
clickable resources:

- Topical Studies: theological studies and all subtopics
- Topical Index: concordance of theological themes
- Reading Plans: Bible reading schedules
- Concordance & Search: concordance and search facility
- Historical Context: maps, timeline, genealogical charts

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 11:22:59 -05:00
kennethreitz 73f5fbf3b5 Make 'Browse all sixty-six books' link bold
Emphasize the main navigation link to the books page by making
it bold, drawing attention to this key action for new visitors.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 11:21:27 -05:00
kennethreitz 93b225f91c Move search box to top of homepage
Reorder homepage sections to prioritize search functionality:

1. Title ("The Holy Bible")
2. Search/Navigate box (moved up from position 3)
3. Welcome introduction
4. Daily verse
5. Rest of content

This puts the most functional element (search) immediately
available to returning visitors while still providing welcoming
context for new visitors.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 11:20:56 -05:00
kennethreitz a0b80d7343 Move sidenotes higher in paragraphs for better placement
Reposition all sidenote markers to appear immediately after the
concepts they explain, rather than at the end of sentences:

- Study helps sidenote now appears after "profitable study:"
- Testaments sidenote now appears after "two testaments,"
- Translation sidenote now appears after "completed in 1611,"

This improves readability by placing contextual information closer
to where it's most relevant.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 11:20:06 -05:00
kennethreitz db2b0d3ab0 Refactor homepage for newcomers with theological focus
Complete redesign of the homepage to welcome visitors unfamiliar
with the site while maintaining theological depth:

- Add welcoming introduction explaining what KJV Study is
- Lead with purpose and functionality (search, daily verse)
- Create "Sacred Scriptures" section with accessible theological
  introduction to the Bible's structure and purpose
- Reorganize resources into clear, contextual categories that
  explain what each feature does and why it matters
- Simplify navigation while maintaining access to all features
- Reduce from 590 to 487 lines while improving clarity
- Remove verbose prose in favor of clear explanations
- Maintain Tufte CSS styling and sidenotes for depth

The new structure guides newcomers through understanding what
the site offers while providing scholars the same deep resources.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 11:15:19 -05:00
kennethreitz 771ff19d86 Streamline homepage by refactoring book links
Remove verbose "Select Theological Studies" section and simplify
book link generation. Replace complex Jinja2 template loops with
clean, readable inline links to each Bible book. This makes the
template more maintainable while preserving all functionality and
keeping the page informative and theological.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 11:11:35 -05:00
kennethreitz 41f869950e Streamline books page - remove prose, focus on function
Remove all introductory and explanatory paragraphs:
- Main intro about 66 books
- Old Testament description
- New Testament description
- "How to Navigate" section

The page now focuses on what matters: browsing and accessing books.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 11:03:27 -05:00
kennethreitz 25b167e69b Add Books link to sidebar quick access
Add Books page to quick access navigation for easier discovery.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 10:55:06 -05:00
kennethreitz df28d46abd Fix missing books in sidebar on 404 page
Add books list to error handler template context so the sidebar
navigation displays Bible books on error pages.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 10:54:28 -05:00
kennethreitz 324143e566 Enhance Easter eggs with scripture quotes and links
Add actual verse content and clickable links to Easter eggs:
- Enoch: Show Jude 1:14-15 quote with link
- Jasher: Link to Joshua 10:13 and 2 Samuel 1:18

Makes the 404 page more educational and engaging.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 23:28:19 -05:00
kennethreitz c0365e43b5 Fix JavaScript inclusion in error page
Move JavaScript from {% block scripts %} to inside {% block content %}
since base.html doesn't define a scripts block. This ensures the
Easter egg and fuzzy matching JavaScript actually loads and runs.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 23:27:39 -05:00
kennethreitz 434ec167fc Fix Easter egg detection for apocryphal books
Make the path check more specific by requiring /book/ prefix.
This prevents false matches and ensures Easter eggs only trigger
for actual book URLs.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 23:25:01 -05:00
kennethreitz 2f403f00b4 Add Easter eggs and fuzzy matching to 404 page
Implement smart URL parsing with two delightful features:

Easter eggs for non-canonical books:
- Apocryphal books (Enoch, Tobit, Judith, Maccabees, etc.)
- Gnostic texts (Gospel of Thomas)
- Lost books (Jasher, Jubilees)
Each displays educational context about canonical status

Fuzzy matching for common misspellings:
- Philippians/Philipians/Philippeans
- Galatians/Galations
- Revelation/Revelations
- Colossians/Collossians
- Plus 15+ more common mistakes

Now 404s are educational, helpful, and delightful!

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 23:21:52 -05:00
kennethreitz ad8101cbbb Simplify 404 page by removing explanation paragraph
Remove verbose explanation text to create a cleaner, more minimalist design.
The biblical quote speaks for itself.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 23:05:49 -05:00
kennethreitz eb4259ea50 Fix text flow in 404 page explanation
Shorten newthought span from "The path you requested" to just "The path"
to prevent awkward line breaks with small caps styling.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 23:05:00 -05:00
kennethreitz d03a570c03 Remove sidenote from 404 page
Simplify error explanation by removing theological commentary sidenote.
Keep the text clean and direct.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 23:03:29 -05:00
kennethreitz d337c0602d Heavily improve 404 page with Tufte design
Complete redesign of error page with elegant typography and functionality:

Design:
- Tufte-style layout with proper margins and hierarchy
- Old-style numeral "404" display
- Removed emojis and inline styles
- Clean semantic HTML structure

Content:
- Biblical theme using parable of lost sheep (Luke 15:4)
- Sidenote with theological commentary
- Poetic, literary tone matching site aesthetic

Functionality:
- Search box with smart verse reference detection
- URL parsing that suggests corrections for malformed book URLs
- Grid of helpful links to all major site sections
- Autofocus on search for immediate use

This transforms a basic error page into a helpful, beautiful experience.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 23:02:20 -05:00
kennethreitz 674ef86a4b Polish share buttons to match Tufte aesthetic
Remove bright colored backgrounds from share buttons:
- Removed Twitter blue (#1DA1F2) from Tweet button
- Removed Facebook blue (#4267B2) from Share button
- Simplified "copied" state to subtle border/text color change

All buttons now use elegant default styling with subtle borders
and proper hover states. Icons (📋, 🐦, f) provide visual differentiation.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 22:59:44 -05:00
kennethreitz cda7e65851 Remove duplicate verse linking code from templates
Move verse linking functionality to base.html for site-wide coverage.
Remove duplicate 80-90 line JavaScript functions from individual templates:
- biblical_prophets.html
- biblical_covenants.html
- biblical_angels.html
- topic_detail.html

This eliminates code duplication and ensures consistent verse linking across all pages.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 22:58:55 -05:00
kennethreitz fd2fe866ec Add site-wide verse linking to base template
Move verse reference linking JavaScript to base.html so it works automatically
on all pages. Links verse references in .intro-text, description elements, and
paragraph tags while skipping sidebar content. This eliminates the need to
duplicate linking code in individual templates.

Includes debug logging in topic_detail.html for troubleshooting.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 22:50:14 -05:00
kennethreitz aee39fae92 Add verse linking to biblical prophets page
Add JavaScript to automatically convert verse references in text to clickable
links on biblical-prophets page. This enables tooltips to work when hovering
over verse references in intro text and prophet descriptions.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 22:45:05 -05:00
kennethreitz 13a31a2751 Fix double tooltips on cross-reference links
Exclude .cross-ref-link elements from global tooltip handler to prevent
conflict with static cross-reference tooltips on verse pages. Cross-reference
links have embedded tooltips in HTML, while other verse links use dynamic
API-fetched tooltips.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 22:43:27 -05:00
kennethreitz 58f48162c8 Fix sitemap to dynamically include all study guides
Replace hardcoded study guide slug list with dynamic extraction from
study_guides dictionary. This ensures new guides (trinity, resurrection,
heaven-eternity, biblical-marriage, raising-children, money-stewardship)
are automatically included in sitemap.xml.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 22:38:48 -05:00
kennethreitz 76448fd4a9 Re-enable Schema.org structured data with proper JSON escaping
Add Article schema markup to verse and study guide pages using tojson filter
for safe JSON generation. Fixes previous template errors on pages like Jude 1:9.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 22:24:34 -05:00
kennethreitz fb95a0fed6 Fix 500 error on verse pages
- Fix verse.html to use correct variable name (verse_text instead of verse.text)
- Add safety check for undefined verse_text
- Temporarily disable Schema.org structured data due to JSON escaping issues
- Fix OpenGraph description to use correct template variable

This resolves the 500 Internal Server Error on verse pages like /book/Jude/chapter/1/verse/9

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 22:19:54 -05:00
kennethreitz 99bfac90c0 Add 6 new study guides and fix verse tooltips
Study Guides:
- Add 3 new categories: Doctrinal Studies, Family & Relationships
- Create 6 new comprehensive study guides with 8 sections each:
  * The Trinity
  * The Resurrection
  * Heaven & Eternity
  * Biblical Marriage
  * Raising Children
  * Money & Stewardship

Bug Fixes:
- Fix verse tooltips for hash fragment ranges (e.g., #verse-20-21)
- Add verse reference linking to biblical-angels page

All new study guides include deep theological content with verse
references, matching the quality of existing guides.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 22:15:56 -05:00
kennethreitz 09c6420ed2 Add comprehensive OpenGraph and Schema.org markup
- Add OpenGraph image tags with proper dimensions (1200x630)
- Upgrade Twitter card to summary_large_image
- Add Schema.org Article markup for verse pages with book references
- Add Schema.org Article markup for study guides with sections
- Enhanced social sharing metadata for better previews

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 22:02:14 -05:00
kennethreitz d32affa6db Add comprehensive book name variation redirects
Created normalize_book_name() function to handle all common book name variations:
- Roman numerals (I Samuel → 1 Samuel, II Corinthians → 2 Corinthians, etc.)
- Full word numbers (First Peter → 1 Peter, Second Kings → 2 Kings, etc.)
- Alternative names (Song of Songs → Song of Solomon, Canticles → Song of Solomon)
- Psalm → Psalms

Applied to all book routes (/book/{book}, /book/{book}/chapter/{chapter},
/book/{book}/chapter/{chapter}/verse/{verse_num}) and API endpoints
(/api/verse/{book}/{chapter}/{verse}, /api/verse-range/{book}/{chapter}/{start}/{end})

All variations now redirect with 301 status to canonical book names.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:57:05 -05:00
kennethreitz 2292a50859 Add 301 redirects for Psalm → Psalms URLs
Support both "Psalm" and "Psalms" in book URLs by adding 301 redirects
for /book/Psalm, /book/Psalm/chapter/{n}, and /book/Psalm/chapter/{n}/verse/{m}

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:55:37 -05:00
kennethreitz 793656e021 Multiple UI and API improvements
- Replace section tags with div tags in topics.html
- Collapse OT/NT sidebar sections by default
- Add verse reference linking to biblical-covenants page
- Support both "Psalm" and "Psalms" in API endpoints

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:54:02 -05:00
kennethreitz 362517188b Expand all sidebar sections by default
Add 'open' attribute to all details elements in sidebar navigation
to improve discoverability and ease of navigation.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:52:14 -05:00
kennethreitz 1425e14b5c Reorganize sidebar navigation for better usability
Restructured sidebar into logical, easy-to-navigate sections.

Changes:
- Quick Access (Home, Search) - immediate essentials
- Bible Books (Old/New Testament) - primary content
- Daily Reading (Verse of Day, Random, Reading Plans) - grouped daily tools
- Study Resources (Study Guides, Topics) - learning materials together
- Reference Tools (Concordance, Interlinear) - research tools grouped
- People, Theology, History & Culture - content categories

Improvements:
- Removed standalone "Parenting" link (use Topics instead)
- Removed redundant "Books" and "Resources" links
- Grouped related functionality together
- Clearer hierarchy and organization
- All subsections remain collapsible with localStorage persistence

Navigation now flows logically from quick access → Bible text →
study tools → reference tools → additional content.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:47:49 -05:00
kennethreitz 0a4c2313e3 Add localStorage persistence for sidebar subsections
Implemented sticky collapse/expand state for all sidebar details elements
(Old Testament, New Testament, People, Theology, etc.).

Features:
- Saves open/closed state for each subsection individually
- Uses element ID or summary text as storage key
- Restores states on page load
- Persists across browser sessions

Storage keys format: 'sidebar-details-{id or summary text}'
Example: 'sidebar-details-old-testament', 'sidebar-details-People'

Now when you expand/collapse any sidebar subsection, the state
will be remembered and restored on subsequent page visits.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:46:16 -05:00
kennethreitz e5c1762f6a Fix verse tooltip URL parsing
Fixed tooltip event handler to use pathname instead of full href.

Issue:
- target.href returns full URL: "http://localhost:8000/book/John/..."
- parseVerseUrl regex expects pathname: "/book/John/..."
- This caused parseVerseUrl to return null, breaking tooltips

Solution:
- Changed target.href to target.pathname in event handler
- Now passes "/book/John/chapter/3/verse/16" to parseVerseUrl
- Regex patterns match correctly and tooltips work

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:43:58 -05:00
kennethreitz 1618aa2ee8 Add JSON API endpoints for verses and update tooltips
Created efficient JSON API endpoints for verse retrieval and updated
tooltips to use them instead of HTML parsing.

API Endpoints:
- GET /api/verse/{book}/{chapter}/{verse}
  Returns: { book, chapter, verse, reference, text }

- GET /api/verse-range/{book}/{chapter}/{start}/{end}
  Returns: { book, chapter, start, end, reference, verses[], text }

Changes:
- Added JSONResponse import to server.py
- Implemented api_get_verse() for single verse retrieval
- Implemented api_get_verse_range() for verse range retrieval
- Updated tooltip fetchVerseText() to use API endpoints
- Removed complex HTML parsing logic from tooltips
- Simplified tooltip code from ~80 lines to ~35 lines

Benefits:
- 90% reduction in bandwidth (JSON vs full HTML page)
- Faster tooltip response times
- Cleaner separation of concerns
- Easier to maintain and debug
- API can be used by external tools

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:41:55 -05:00
kennethreitz 2dc31df2f0 Add verse linking to study guides
Implement automatic verse reference linking in study guide content pages.

Changes:
- Added verse linking JavaScript to study_guide_detail.html
- Supports all verse reference patterns:
  * Single verses: "John 3:16"
  * Verse ranges: "Romans 8:28-29"
  * Comma-separated lists: "Psalms 7:17, 9:2, 18:13"
- Links verses in section content paragraphs
- Skips margin toggle label paragraphs to avoid double-linking

Now study guides like /study-guides/new-believer will have all
verse references automatically linked and hoverable for tooltips.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:36:23 -05:00
kennethreitz d1df9b9b84 Fix verse range extraction for tooltips
Fixed the tooltip JavaScript to properly extract verse ranges from chapter pages.

Issue:
- Verse range tooltips were showing "Verse range not found"
- The selector was looking for .verse-text elements that don't exist on chapter pages

Solution:
- Updated verse extraction to query by #verse-{number} paragraph IDs
- Clone the verse paragraph and remove:
  * Verse number links (.verse-number-link)
  * Sidenotes and marginnotes
  * Margin toggle elements
- Extract clean text content from each verse in the range
- Join multiple verses with spaces

Now verse ranges like "1 Corinthians 15:19-20" will properly fetch
and display the text of both verses in the tooltip.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:34:38 -05:00