Skip to content

Commit 858c686

Browse files
kennethreitzclaude
andcommitted
Allow navigating to future dates on VOTD
Since we have 365 devotionals, users can browse any date including future ones. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent c539e49 commit 858c686

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

kjvstudy_org/routes/misc.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,8 @@ async def verse_of_the_day_page(request: Request, date: str):
242242

243243
# Calculate prev/next dates for navigation
244244
prev_date = (current_date - timedelta(days=1)).strftime("%Y-%m-%d")
245+
next_date = (current_date + timedelta(days=1)).strftime("%Y-%m-%d")
245246
today_str = datetime.now().strftime("%Y-%m-%d")
246-
# Only allow next_date if viewing a past date (can't go to future)
247-
next_date = (current_date + timedelta(days=1)).strftime("%Y-%m-%d") if date_str < today_str else None
248247

249248
# Generate past 30 days of verses (from the viewed date)
250249
past_verses = []

kjvstudy_org/templates/verse_of_the_day.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -463,11 +463,9 @@ <h1 class="votd-title">Verse of the Day</h1>
463463
e.preventDefault();
464464
window.location.href = '/verse-of-the-day/{{ prev_date }}';
465465
} else if (e.key === ']') {
466-
// Next day (only if not viewing future)
466+
// Next day
467467
e.preventDefault();
468-
{% if next_date %}
469468
window.location.href = '/verse-of-the-day/{{ next_date }}';
470-
{% endif %}
471469
} else if (e.key === 't') {
472470
// Jump to today
473471
e.preventDefault();

0 commit comments

Comments
 (0)