Create comprehensive bookmarks management page

Add complete bookmarks page with navigation functionality:

Features:
- Dedicated /bookmarks page for viewing all saved bookmarks
- Support for both chapter and verse bookmarks in unified view
- Statistics dashboard showing total, chapter, and verse bookmark counts
- Tabbed filtering (All, Chapters, Verses) for easy organization
- Direct navigation to Bible reading page with URL parameters
- Delete functionality for individual bookmarks
- Empty state with call-to-action to start reading

Navigation Integration:
- Add Bookmarks to main navigation menu (authenticated users only)
- Add Bookmarks to user profile dropdown menu
- Dynamic navigation based on authentication state

Bible Page Enhancements:
- URL parameter support for bookmark navigation (book, chapter, verse)
- Verse highlighting when navigating from bookmarks
- Auto-clear highlight after 3 seconds for better UX

API Endpoints:
- /api/bookmarks/all - Unified endpoint for all user bookmarks
- Returns transformed data optimized for frontend consumption

Multilingual Support:
- Full Romanian and English translations
- Consistent messaging across all bookmark interfaces

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
andupetcu
2025-09-21 01:29:46 +03:00
parent 1b43b4e1e3
commit 686f498300
12 changed files with 31800 additions and 30905 deletions

View File

@@ -99,8 +99,18 @@ function parseUsfmFile(file: string): Book | null {
if (m) {
const verseNum = parseInt(m[1], 10)
let text = m[2]
// Strip inline USFM markers (basic)
text = text.replace(/\\[a-z0-9-]+\s*/gi,'').trim()
// Strip inline USFM markup, preserving words
// Remove word wrappers: \w Word|strong="..."\w* and \+w ... \+w*
text = text.replace(/\\\+?w\s+/gi, '')
.replace(/\|strong="[^"]*"/gi, '')
.replace(/\\\+?w\*/gi, '')
// Remove footnotes / cross-refs blocks: \f ... \f* and \x ... \x*
text = text.replace(/\\f\s+.*?\\f\*/gis, ' ')
.replace(/\\x\s+.*?\\x\*/gis, ' ')
// Remove any remaining inline tags like \\add, \\nd, \\qs, etc.
text = text.replace(/\\[a-z0-9-]+\s*/gi, ' ')
// Collapse whitespace
text = text.replace(/\s+/g, ' ').trim()
currentVerses.push({ verseNum, text })
}
continue