diff --git a/kjvstudy_org/server.py b/kjvstudy_org/server.py index 1d34a27..8afe42a 100644 --- a/kjvstudy_org/server.py +++ b/kjvstudy_org/server.py @@ -1471,21 +1471,17 @@ async def reading_plan_detail(request: Request, plan_id: str): if not plan: raise HTTPException(status_code=404, detail="Reading plan not found") - # For plans 90 days or less, include full Bible text - include_text = plan.get('duration_days', 365) <= 90 - days_with_text = None - - if include_text: - all_days = plan.get('days') or plan.get('sample_days', []) - days_with_text = [] - for day in all_days: - day_data = { - 'day': day['day'], - 'theme': day.get('theme', ''), - 'readings': day['readings'], - 'text': get_reading_text(day['readings']) - } - days_with_text.append(day_data) + # Always include full Bible text - collapsible for longer plans + all_days = plan.get('days') or plan.get('sample_days', []) + days_with_text = [] + for day in all_days: + day_data = { + 'day': day['day'], + 'theme': day.get('theme', ''), + 'readings': day['readings'], + 'text': get_reading_text(day['readings']) + } + days_with_text.append(day_data) breadcrumbs = [ {"text": "Home", "url": "/"}, @@ -1503,8 +1499,8 @@ async def reading_plan_detail(request: Request, plan_id: str): "breadcrumbs": breadcrumbs, "pdf_available": WEASYPRINT_AVAILABLE, "pdf_url": f"/reading-plans/{plan_id}/pdf" if WEASYPRINT_AVAILABLE else None, - "include_text": include_text, - "days_with_text": days_with_text + "days_with_text": days_with_text, + "total_days": plan.get('duration_days', len(days_with_text)) } ) diff --git a/kjvstudy_org/templates/reading_plan_detail.html b/kjvstudy_org/templates/reading_plan_detail.html index aeef40c..88a83fe 100644 --- a/kjvstudy_org/templates/reading_plan_detail.html +++ b/kjvstudy_org/templates/reading_plan_detail.html @@ -50,10 +50,13 @@ } .plan-actions { + display: flex; + gap: 1rem; margin: 1rem 0 1.5rem; + flex-wrap: wrap; } -.print-btn { +.action-btn { display: inline-flex; align-items: center; gap: 0.5rem; @@ -68,39 +71,73 @@ text-decoration: none; } -.print-btn:hover { +.action-btn:hover { background: var(--bg-color); border-color: var(--link-color); color: var(--link-color); } -.print-btn svg { +.action-btn svg { width: 16px; height: 16px; } +/* Progress bar */ +.progress-section { + margin: 1.5rem 0; + max-width: 60%; +} + +.progress-bar-container { + background: var(--code-bg); + border-radius: 4px; + height: 24px; + overflow: hidden; + border: 1px solid var(--border-color); +} + +.progress-bar { + height: 100%; + background: var(--link-color); + transition: width 0.3s ease; + display: flex; + align-items: center; + justify-content: center; + color: white; + font-size: 0.8rem; + font-weight: 600; +} + +.progress-text { + margin-top: 0.5rem; + font-size: 0.9rem; + color: var(--text-secondary); +} + /* Day navigation */ .day-nav { display: flex; flex-wrap: wrap; - gap: 0.5rem; + gap: 0.4rem; margin: 1.5rem 0; padding: 1rem; background: var(--code-bg); border-radius: 4px; - max-width: 80%; + max-width: 90%; } .day-nav a { display: inline-block; - padding: 0.3rem 0.6rem; - font-size: 0.85rem; + padding: 0.25rem 0.5rem; + font-size: 0.8rem; color: var(--text-secondary); background: var(--bg-color); border: 1px solid var(--border-color); border-radius: 3px; text-decoration: none; transition: all 0.15s; + min-width: 28px; + text-align: center; } .day-nav a:hover { @@ -108,57 +145,101 @@ color: var(--link-color); } -/* Day entries with scripture */ +.day-nav a.completed { + background: var(--link-color); + color: white; + border-color: var(--link-color); +} + +/* Day entries */ .reading-day { - margin: 2.5rem 0; - padding-bottom: 2rem; - border-bottom: 2px solid var(--border-color); + margin: 1.5rem 0; + border: 1px solid var(--border-color); + border-radius: 4px; + overflow: hidden; +} + +.reading-day.completed { + border-color: var(--link-color); } .day-header { display: flex; - align-items: baseline; + align-items: center; gap: 1rem; - margin-bottom: 0.75rem; + padding: 0.75rem 1rem; + background: var(--code-bg); + cursor: pointer; + user-select: none; +} + +.day-header:hover { + background: var(--border-color); +} + +.day-checkbox { + width: 20px; + height: 20px; + cursor: pointer; + accent-color: var(--link-color); } .day-number { - font-size: 1.4rem; + font-size: 1.1rem; font-weight: 600; color: var(--link-color); + min-width: 70px; } .day-theme { font-style: italic; color: var(--text-secondary); - font-size: 1.1rem; + flex: 1; } .day-readings-summary { - margin-bottom: 1rem; - font-size: 0.95rem; + font-size: 0.85rem; color: var(--text-secondary); } .day-readings-summary span { - display: inline-block; - margin-right: 0.5rem; - padding: 0.2rem 0.5rem; - background: var(--code-bg); + margin-left: 0.5rem; + padding: 0.15rem 0.4rem; + background: var(--bg-color); border-radius: 3px; } -/* Scripture text display */ -.scripture-content { - margin-top: 1rem; +.day-toggle { + font-size: 1.2rem; + color: var(--text-secondary); + transition: transform 0.2s; +} + +.day-toggle.expanded { + transform: rotate(180deg); +} + +/* Scripture content */ +.day-content { + display: none; + padding: 1rem; + border-top: 1px solid var(--border-color); +} + +.day-content.expanded { + display: block; } .chapter-section { margin: 1.5rem 0; } +.chapter-section:first-child { + margin-top: 0; +} + .chapter-heading { - font-size: 1.15rem; + font-size: 1.1rem; font-weight: 600; color: var(--text-color); margin-bottom: 0.75rem; @@ -188,47 +269,37 @@ margin-right: 0.1rem; } -/* Reference-only view (for 365-day plans) */ -.sample-days { - max-width: 70%; - margin: 2rem 0; -} - -.day-entry { - padding: 1rem; - margin: 1rem 0; - border: 1px solid var(--border-color); - border-radius: 4px; -} - -.reading-ref { - display: inline-block; - margin: 0.25rem 0.5rem 0.25rem 0; - padding: 0.25rem 0.5rem; - background: var(--code-bg); - border-radius: 3px; - font-size: 0.95rem; -} - @media print { .plan-actions, - .print-btn, - .day-nav { + .action-btn, + .day-nav, + .progress-section, + .day-checkbox { display: none; } + .day-content { + display: block !important; + } } @media (max-width: 768px) { .plan-overview, .plan-stats, .intro-text, - .sample-days { + .progress-section { max-width: 100%; } - .day-nav { max-width: 100%; } + .day-header { + flex-wrap: wrap; + } + .day-theme { + order: 3; + width: 100%; + margin-top: 0.5rem; + } } {% endblock %} @@ -237,16 +308,34 @@

{{ plan.name }}

{{ plan.description }}

-{% if pdf_available and pdf_url %}
- + {% if pdf_available and pdf_url %} + - Download PDF{% if include_text %} (with Scripture text){% endif %} + Download PDF + {% endif %} + + +
-{% endif %}
@@ -258,6 +347,17 @@
{{ (plan.duration_days / 7) | round | int }}
Weeks
+
+
0
+
Completed
+
+ + +
+
+
0%
+
+

Start reading to track your progress

@@ -265,34 +365,31 @@
-{% if include_text and days_with_text %} -{# Full text version with scripture #}

Reading Schedule

-

Jump to any day:

+

Click a day to expand. Check the box to mark as read.

-
+
{% for day in days_with_text %} - {{ day.day }} + {{ day.day }} {% endfor %}
{% for day in days_with_text %} -
-
+
+
+ Day {{ day.day }} - {% if day.theme %}{{ day.theme }}{% endif %} -
- -
- {% for reading in day.readings %} - {{ reading }} - {% endfor %} + {{ day.theme }} + + {% for reading in day.readings %}{{ reading }}{% endfor %} + +
{% if day.text %} -
+
{% for section in day.text %}
@@ -307,65 +404,14 @@ {% endfor %}
{% endif %} -
+ {% endfor %} -{% else %} -{# Reference-only version for longer plans #} -
-

Complete Reading Schedule

-

All {{ plan.duration_days }} days of readings for this plan.

- -
- {% set all_days = plan.days if plan.days else plan.sample_days %} - {% for day in all_days %} -
-
Day {{ day.day }}
-
- {% for reading in day.readings %} - - {% set ref_parts = reading.split(' ') %} - {% if ref_parts|length >= 2 %} - {% set chapter_verse = ref_parts[-1] %} - {% if ':' in chapter_verse %} - {% set chapter = chapter_verse.split(':')[0] %} - {% set verse_part = chapter_verse.split(':')[1] %} - {% if '-' in verse_part %} - {% set verse_num = verse_part.split('-')[0] %} - {% else %} - {% set verse_num = verse_part %} - {% endif %} - {% set book = ' '.join(ref_parts[:-1]) %} - {{ reading }} - {% elif '-' in chapter_verse %} - {% set first_chapter = chapter_verse.split('-')[0] %} - {% set book = ' '.join(ref_parts[:-1]) %} - {{ reading }} - {% else %} - {% set chapter = ref_parts[-1] %} - {% set book = ' '.join(ref_parts[:-1]) %} - {{ reading }} - {% endif %} - {% else %} - {{ reading }} - {% endif %} - - {% endfor %} -
-
Theme: {{ day.theme }}
-
- {% endfor %} -
-
-{% endif %} -

How to Use This Plan

Consistency matters more than perfection. If you miss a day, simply continue where you left off rather than attempting to catch up through extended readings. The goal is sustainable Scripture engagement, not merely completing a schedule.

-

Consider maintaining a journal to record insights, questions, and applications. Many find morning reading sets a godly tone for the day, though evening reflection suits others better. Discover what timing best facilitates your consistent engagement with God's Word.

- -

Prayer should accompany reading. Ask the Holy Spirit for illumination, understanding, and application. Scripture study transforms when approached not merely as information gathering but as communion with the living God who speaks through His Word.

+

Your progress is saved automatically in your browser. Check each day as you complete it to track your journey through Scripture.

@@ -374,22 +420,166 @@