Embed study guides on homepage

- Add study guides data to homepage route
- Display study guides in new section on homepage
- Organize by category (Foundational Studies, Character & Living, Biblical Themes)
- Use Tufte CSS newthought styling for categories
- Remove separate Study Guides link from title page

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-13 17:13:00 -05:00
parent a48da582bc
commit 0a242f4b51
2 changed files with 74 additions and 4 deletions
+65 -1
View File
@@ -1621,8 +1621,72 @@ def read_root(request: Request):
books = list(bible.iter_books())
daily_verse = get_daily_verse()
# Define study guide categories
study_guides = {
"Foundational Studies": [
{
"title": "New Believer's Guide",
"description": "Essential truths for new Christians",
"slug": "new-believer",
"verses": ["John 3:16", "Romans 10:9", "1 John 1:9", "2 Corinthians 5:17"]
},
{
"title": "Salvation by Grace",
"description": "Understanding God's gift of salvation",
"slug": "salvation",
"verses": ["Ephesians 2:8-9", "Romans 3:23", "Romans 6:23", "Titus 3:5"]
},
{
"title": "The Gospel Message",
"description": "The good news of Jesus Christ",
"slug": "gospel",
"verses": ["1 Corinthians 15:3-4", "Romans 1:16", "Mark 16:15", "Acts 4:12"]
}
],
"Character & Living": [
{
"title": "Fruits of the Spirit",
"description": "Developing Christian character",
"slug": "fruits-spirit",
"verses": ["Galatians 5:22-23", "1 Corinthians 13:4-7", "Philippians 4:8", "Colossians 3:12-14"]
},
{
"title": "Prayer & Faith",
"description": "Growing in prayer and trust",
"slug": "prayer-faith",
"verses": ["Matthew 6:9-13", "1 Thessalonians 5:17", "Hebrews 11:1", "James 1:6"]
},
{
"title": "Christian Living",
"description": "Walking as followers of Christ",
"slug": "christian-living",
"verses": ["Romans 12:1-2", "1 Peter 2:9", "Matthew 5:14-16", "Philippians 2:14-16"]
}
],
"Biblical Themes": [
{
"title": "God's Love",
"description": "Understanding the depth of God's love",
"slug": "gods-love",
"verses": ["1 John 4:8", "John 3:16", "Romans 8:38-39", "1 John 3:1"]
},
{
"title": "Hope & Comfort",
"description": "Finding hope in difficult times",
"slug": "hope-comfort",
"verses": ["Romans 15:13", "2 Corinthians 1:3-4", "Psalm 23:4", "Isaiah 41:10"]
},
{
"title": "Wisdom & Guidance",
"description": "Seeking God's wisdom for life",
"slug": "wisdom-guidance",
"verses": ["Proverbs 3:5-6", "James 1:5", "Psalm 119:105", "Proverbs 27:17"]
}
]
}
return templates.TemplateResponse(
"index.html", {"request": request, "books": books, "daily_verse": daily_verse}
"index.html", {"request": request, "books": books, "daily_verse": daily_verse, "study_guides": study_guides}
)
+9 -3
View File
@@ -34,9 +34,6 @@
Appointed to be Read in Churches<br/>
<em>Anno Domini</em> 1611
</div>
<p style="margin-top: 2rem; font-style: normal; font-size: 1.2rem;">
<a href="/study-guides">Study Guides</a>
</p>
</div>
<div class="epigraph">
@@ -94,4 +91,13 @@
<span class="sidenote">The Apocalypse of John, a prophetic vision of the end times and the ultimate triumph of God's kingdom.</span>
— {% for book in ['Revelation'] %}{% if book in books %}<a href="/book/{{ book }}">{{ book }}</a>{% endif %}{% endfor %}</p>
</section>
<section>
<h2>Study Guides</h2>
{% for category, guides in study_guides.items() %}
<p><span class="newthought">{{ category }}</span>
{% for guide in guides %}<a href="/study-guides/{{ guide.slug }}">{{ guide.title }}</a>{% if not loop.last %}, {% endif %}{% endfor %}</p>
{% endfor %}
</section>
{% endblock %}