Add chapter backward/forward navigation in read_book UI
- Each chapter card now has a footer with Prev/Next chapter anchor links - First chapter shows only Next; last chapter shows 'End of Book' - Back to Top link on every chapter footer - Added get_chapter_neighbours() helper in story/bible_tracker.py for programmatic chapter sequence navigation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -48,6 +48,27 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Chapter Navigation Footer -->
|
||||
<div class="card-footer bg-transparent d-flex justify-content-between align-items-center py-2">
|
||||
{% if not loop.first %}
|
||||
{% set prev_ch = manuscript[loop.index0 - 1] %}
|
||||
<a href="#ch-{{ prev_ch.num }}" class="btn btn-sm btn-outline-secondary">
|
||||
<i class="fas fa-arrow-up me-1"></i>Ch {{ prev_ch.num }}
|
||||
</a>
|
||||
{% else %}
|
||||
<span></span>
|
||||
{% endif %}
|
||||
<a href="#" class="btn btn-sm btn-link text-muted small py-0">Back to Top</a>
|
||||
{% if not loop.last %}
|
||||
{% set next_ch = manuscript[loop.index0 + 1] %}
|
||||
<a href="#ch-{{ next_ch.num }}" class="btn btn-sm btn-outline-secondary">
|
||||
Ch {{ next_ch.num }}<i class="fas fa-arrow-down ms-1"></i>
|
||||
</a>
|
||||
{% else %}
|
||||
<span class="text-muted small fst-italic">End of Book</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- Rewrite Modal -->
|
||||
<div class="modal fade" id="rewriteModal{{ ch.num|string|replace(' ', '') }}" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
|
||||
Reference in New Issue
Block a user