diff --git a/kjvstudy_org/server.py b/kjvstudy_org/server.py index 42946bc..123260c 100644 --- a/kjvstudy_org/server.py +++ b/kjvstudy_org/server.py @@ -2022,6 +2022,7 @@ def read_book(request: Request, book: str): "chapter_popularity": chapter_popularity, "chapter_explanations": chapter_explanations, "breadcrumbs": breadcrumbs, + "current_book": book, **commentary_data }, ) @@ -2124,7 +2125,9 @@ def read_chapter(request: Request, book: str, chapter: int): "chapters": chapters, "commentaries": commentaries, "chapter_overview": chapter_overview, - "breadcrumbs": breadcrumbs + "breadcrumbs": breadcrumbs, + "current_book": book, + "current_chapter": chapter } ) @@ -2190,7 +2193,10 @@ def read_verse(request: Request, book: str, chapter: int, verse_num: int): "total_verses": len(verses), "books": books, "chapters": chapters, - "breadcrumbs": breadcrumbs + "breadcrumbs": breadcrumbs, + "current_book": book, + "current_chapter": chapter, + "current_verse": verse_num } ) diff --git a/kjvstudy_org/templates/base.html b/kjvstudy_org/templates/base.html index b8e2a48..a049f71 100644 --- a/kjvstudy_org/templates/base.html +++ b/kjvstudy_org/templates/base.html @@ -80,51 +80,6 @@ color: #999; } - /* Elegant verse lookup */ - .verse-lookup { - margin: 1.5rem 0 3rem 0; - padding: 1.5rem; - background: linear-gradient(to bottom, #fafafa 0%, #f5f5f5 100%); - border: 1px solid #e5e5e5; - border-radius: 2px; - width: 55%; - box-shadow: inset 0 1px 3px rgba(0,0,0,0.02); - } - - .verse-lookup-input { - width: 100%; - padding: 0.75rem 1rem; - font-size: 1.1rem; - border: 1px solid #d0d0d0; - border-radius: 2px; - font-family: et-book, Palatino, "Palatino Linotype", Georgia, serif; - background: white; - transition: all 0.2s; - } - - .verse-lookup-input:focus { - outline: none; - border-color: #888; - box-shadow: 0 0 0 3px rgba(0,0,0,0.05); - } - - .verse-lookup-label { - display: block; - margin-bottom: 0.75rem; - font-size: 0.95rem; - color: #555; - font-style: italic; - letter-spacing: 0.02em; - } - - .verse-lookup-error { - display: none; - margin-top: 0.75rem; - color: #a33; - font-size: 0.9rem; - font-style: italic; - } - /* Enhanced link styling */ a { color: #333; @@ -156,21 +111,129 @@ font-size: 1.5rem; letter-spacing: 1rem; } + + /* Floating Navigation Sidebar */ + .nav-sidebar { + position: fixed; + top: 2rem; + right: 2rem; + width: 280px; + max-height: calc(100vh - 4rem); + overflow-y: auto; + background: linear-gradient(to bottom, #fafafa 0%, #f8f8f8 100%); + border: 1px solid #ddd; + border-radius: 2px; + padding: 1.5rem; + font-size: 0.85rem; + line-height: 1.6; + box-shadow: 0 2px 8px rgba(0,0,0,0.08); + } + + .nav-sidebar::-webkit-scrollbar { + width: 6px; + } + + .nav-sidebar::-webkit-scrollbar-track { + background: #f0f0f0; + } + + .nav-sidebar::-webkit-scrollbar-thumb { + background: #ccc; + border-radius: 3px; + } + + .nav-sidebar h3 { + font-size: 0.9rem; + font-weight: 600; + font-style: italic; + margin: 0 0 0.75rem 0; + padding-bottom: 0.5rem; + border-bottom: 1px solid #ddd; + color: #333; + } + + .nav-sidebar ul { + list-style: none; + padding: 0; + margin: 0 0 1.5rem 0; + } + + .nav-sidebar li { + margin: 0.35rem 0; + } + + .nav-sidebar a { + color: #555; + text-decoration: none; + border-bottom: none; + display: block; + padding: 0.25rem 0.5rem; + border-radius: 2px; + transition: all 0.2s; + } + + .nav-sidebar a:hover { + color: #000; + background: rgba(0,0,0,0.05); + } + + .nav-sidebar a.current { + color: #000; + background: rgba(0,0,0,0.08); + font-weight: 600; + border-left: 3px solid #333; + padding-left: 0.75rem; + } + + .nav-sidebar .testament-section { + margin-bottom: 1.5rem; + } + + .nav-sidebar .testament-title { + font-size: 0.75rem; + text-transform: uppercase; + letter-spacing: 0.1em; + color: #888; + margin-bottom: 0.5rem; + font-weight: 600; + } + + .nav-sidebar .book-list { + font-size: 0.8rem; + } + + .nav-sidebar .context-path { + background: #f0f0f0; + padding: 0.75rem; + margin-bottom: 1rem; + border-left: 3px solid #666; + font-size: 0.8rem; + line-height: 1.8; + color: #555; + } + + .nav-sidebar .context-path strong { + color: #000; + font-weight: 600; + } + + /* Hide sidebar on smaller screens */ + @media (max-width: 1400px) { + .nav-sidebar { + display: none; + } + } + + /* Adjust article width when sidebar is present */ + @media (min-width: 1401px) { + article { + max-width: calc(100% - 320px); + } + }