From 68e9d9bc9b827a4cb6f5f2cae6f2b20ade0236a5 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Thu, 20 Nov 2025 19:14:15 -0500 Subject: [PATCH] Add enhanced chapter navigation with keyboard shortcuts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Chapter page improvements: - Styled navigation container with modern UI - Previous/Next chapter buttons prominently displayed - Chapter dropdown selector for quick jumping - "Back to book" button for context navigation - Visual hierarchy with primary/secondary button styles Keyboard navigation: - Left arrow key: Navigate to previous chapter - Right arrow key: Navigate to next chapter - Prevents navigation when user is in input fields Enhanced UX: - Clear visual feedback on button hover - Helpful tip about keyboard shortcuts - Accessible select dropdown with all chapters - Responsive design compatible with mobile styles The navigation container is styled consistently with site design using CSS variables for theming support. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- kjvstudy_org/templates/chapter.html | 131 ++++++++++++++++++++++++++-- 1 file changed, 125 insertions(+), 6 deletions(-) diff --git a/kjvstudy_org/templates/chapter.html b/kjvstudy_org/templates/chapter.html index 17d2b85..e4bf765 100644 --- a/kjvstudy_org/templates/chapter.html +++ b/kjvstudy_org/templates/chapter.html @@ -73,6 +73,75 @@ hr::before { color: #111; text-decoration: underline; } + +.chapter-nav { + max-width: 60%; + margin: 2rem 0; + padding: 1.5rem; + border: 1px solid var(--border-color); + border-radius: 4px; + background: var(--code-bg); +} + +.chapter-nav-controls { + display: flex; + gap: 1rem; + align-items: center; + flex-wrap: wrap; +} + +.chapter-nav-btn { + padding: 0.5rem 1rem; + font-size: 0.95rem; + font-weight: 600; + background: var(--link-color); + color: white; + border: none; + border-radius: 4px; + text-decoration: none; + cursor: pointer; + transition: background 0.2s; + display: inline-block; +} + +.chapter-nav-btn:hover { + background: var(--link-hover); +} + +.chapter-nav-btn.secondary { + background: var(--bg-color); + color: var(--text-color); + border: 1px solid var(--border-color-darker); +} + +.chapter-nav-btn.secondary:hover { + background: var(--code-bg); + border-color: var(--link-color); + color: var(--link-color); +} + +.chapter-select { + padding: 0.5rem; + font-size: 0.95rem; + border: 1px solid var(--border-color); + border-radius: 4px; + background: var(--bg-color); + color: var(--text-color); + font-family: inherit; + cursor: pointer; +} + +.chapter-select:focus { + outline: none; + border-color: var(--link-color); +} + +.nav-help { + font-size: 0.85rem; + color: var(--text-secondary); + font-style: italic; + margin-top: 0.75rem; +} {% endblock %} @@ -108,12 +177,36 @@ hr::before { {% endfor %} -