Add study guides and verse of the day features

This commit is contained in:
2025-05-30 12:41:00 -04:00
parent 5aff6a4fa4
commit 56527a8d5c
7 changed files with 1518 additions and 56 deletions
+23
View File
@@ -5,6 +5,8 @@ A web application for studying the King James Bible with AI-powered commentary a
## Features
- Browse and search King James Bible verses
- **Study Guides** - Comprehensive Bible study guides covering foundational Christian truths, character development, and biblical themes
- **Verse of the Day** - Daily Scripture verses with reflection questions and sharing capabilities
- AI-powered biblical commentary and insights
- Clean, responsive web interface
- Fast verse lookup and navigation
@@ -26,6 +28,27 @@ uv run kjvstudy-org
The application will be available at http://localhost:8000
## New Features
### Study Guides
Access comprehensive Bible study guides at `/study-guides` covering:
- **Foundational Studies**: New Believer's Guide, Salvation by Grace, The Gospel Message
- **Character & Living**: Fruits of the Spirit, Prayer & Faith, Christian Living
- **Biblical Themes**: God's Love, Hope & Comfort, Wisdom & Guidance
Each study guide includes:
- Scripture references with full text
- Study notes and practical applications
- Reflection questions for deeper understanding
### Verse of the Day
Visit `/verse-of-the-day` for:
- Daily Scripture verses from a curated collection
- Reflection questions for meditation
- Easy sharing capabilities
- Links to read the full chapter or book
- Integrated with the homepage for daily inspiration
## Docker
Build and run with Docker:
+463 -52
View File
@@ -11,10 +11,69 @@ import json
import re
from datetime import datetime
from typing import List, Dict, Optional
import hashlib
from .kjv import bible
def perform_full_text_search(query: str, limit: int = 50) -> List[Dict]:
"""Perform full text search across all Bible verses"""
results = []
search_terms = query.lower().split()
# Search through all verses using the iter_verses method
for verse in bible.iter_verses():
verse_text = verse.text.lower()
# Check if all search terms are in the verse
if all(term in verse_text for term in search_terms):
# Calculate relevance score
score = calculate_relevance_score(verse.text, search_terms)
results.append({
"book": verse.book,
"chapter": verse.chapter,
"verse": verse.verse,
"text": verse.text,
"reference": f"{verse.book} {verse.chapter}:{verse.verse}",
"url": f"/book/{verse.book}/chapter/{verse.chapter}#verse-{verse.verse}",
"score": score,
"highlighted_text": highlight_search_terms(verse.text, search_terms)
})
# Sort by relevance score (higher is better)
results.sort(key=lambda x: x["score"], reverse=True)
# Limit results
return results[:limit]
def calculate_relevance_score(text: str, search_terms: List[str]) -> float:
"""Calculate relevance score for search results"""
text_lower = text.lower()
score = 0.0
for term in search_terms:
# Count occurrences of each term
count = text_lower.count(term.lower())
score += count
# Bonus for exact word matches
if f" {term.lower()} " in f" {text_lower} ":
score += 0.5
return score
def highlight_search_terms(text: str, search_terms: List[str]) -> str:
"""Highlight search terms in text"""
highlighted = text
for term in search_terms:
# Simple highlighting (could be improved)
highlighted = highlighted.replace(term, f"<mark>{term}</mark>")
return highlighted
def get_verse_text(book, chapter, verse):
"""Get the actual text of a specific verse"""
try:
@@ -93,66 +152,417 @@ def search_api(q: str = Query(..., description="Search query"), limit: int = Que
"total": len(search_results)
}
def perform_full_text_search(query: str, limit: int = 50) -> List[Dict]:
"""Perform full text search across all Bible verses"""
results = []
search_terms = query.lower().split()
@app.get("/study-guides", response_class=HTMLResponse)
def study_guides_page(request: Request):
"""Study guides main page"""
books = list(bible.iter_books())
# Search through all verses using the iter_verses method
for verse in bible.iter_verses():
verse_text = verse.text.lower()
# Check if all search terms are in the verse
if all(term in verse_text for term in search_terms):
# Calculate relevance score
score = calculate_relevance_score(verse.text, search_terms)
results.append({
"book": verse.book,
"chapter": verse.chapter,
"verse": verse.verse,
"text": verse.text,
"reference": f"{verse.book} {verse.chapter}:{verse.verse}",
"url": f"/book/{verse.book}/chapter/{verse.chapter}#verse-{verse.verse}",
"score": score,
"highlighted_text": highlight_search_terms(verse.text, search_terms)
})
if len(results) >= limit:
break
# 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"]
}
]
}
# Sort by relevance score (highest first)
results.sort(key=lambda x: x['score'], reverse=True)
return results[:limit]
return templates.TemplateResponse(
"study_guides.html",
{
"request": request,
"books": books,
"study_guides": study_guides
}
)
def calculate_relevance_score(text: str, search_terms: List[str]) -> float:
"""Calculate relevance score based on term frequency and proximity"""
text_lower = text.lower()
score = 0.0
@app.get("/study-guides/{slug}", response_class=HTMLResponse)
def study_guide_detail(request: Request, slug: str):
"""Individual study guide page"""
books = list(bible.iter_books())
for term in search_terms:
# Count occurrences of each term
count = text_lower.count(term)
score += count * len(term) # Longer terms get higher weight
# Study guide content
guides_content = {
"new-believer": {
"title": "New Believer's Guide",
"description": "Essential truths for new Christians to understand their faith",
"sections": [
{
"title": "God's Love for You",
"verses": ["John 3:16", "1 John 4:9-10"],
"content": "God loves you unconditionally. His love is not based on what you do, but on who He is."
},
{
"title": "Your New Life",
"verses": ["2 Corinthians 5:17", "Ephesians 2:10"],
"content": "When you accept Christ, you become a new creation. The old has passed away, and the new has come."
},
{
"title": "Assurance of Salvation",
"verses": ["Romans 10:9", "1 John 5:13"],
"content": "You can know for certain that you have eternal life through faith in Jesus Christ."
}
]
},
"salvation": {
"title": "Salvation by Grace",
"description": "Understanding how God saves us through His grace alone",
"sections": [
{
"title": "The Problem: Sin",
"verses": ["Romans 3:23", "Romans 6:23"],
"content": "All have sinned and fallen short of God's glory. The wages of sin is death."
},
{
"title": "The Solution: Grace",
"verses": ["Ephesians 2:8-9", "Titus 3:5"],
"content": "Salvation is by grace through faith, not by works. It is God's gift to us."
},
{
"title": "The Response: Faith",
"verses": ["Romans 10:9-10", "Acts 16:31"],
"content": "We are saved by believing in Jesus Christ and confessing Him as Lord."
}
]
},
"gospel": {
"title": "The Gospel Message",
"description": "The good news of Jesus Christ and what it means for us",
"sections": [
{
"title": "Christ's Death",
"verses": ["1 Corinthians 15:3", "Isaiah 53:5"],
"content": "Christ died for our sins according to the Scriptures, taking our place on the cross."
},
{
"title": "Christ's Resurrection",
"verses": ["1 Corinthians 15:4", "Romans 1:4"],
"content": "He was raised on the third day, proving His victory over sin and death."
},
{
"title": "Our Commission",
"verses": ["Mark 16:15", "Acts 1:8"],
"content": "We are called to share this good news with others around the world."
}
]
},
"fruits-spirit": {
"title": "Fruits of the Spirit",
"description": "Developing Christian character through the Holy Spirit",
"sections": [
{
"title": "Love, Joy, Peace",
"verses": ["Galatians 5:22", "1 Corinthians 13:4-7"],
"content": "The first fruits show our relationship with God and inner transformation."
},
{
"title": "Patience, Kindness, Goodness",
"verses": ["Galatians 5:22", "Colossians 3:12"],
"content": "These fruits are shown in how we treat others, especially in difficult situations."
},
{
"title": "Faithfulness, Gentleness, Self-Control",
"verses": ["Galatians 5:23", "2 Timothy 2:24"],
"content": "These fruits demonstrate spiritual maturity and Christ-like character."
}
]
},
"prayer-faith": {
"title": "Prayer & Faith",
"description": "Growing in prayer and trust in God",
"sections": [
{
"title": "The Lord's Prayer",
"verses": ["Matthew 6:9-13", "Luke 11:2-4"],
"content": "Jesus taught us how to pray, giving us a model for our communication with God."
},
{
"title": "Persistent Prayer",
"verses": ["1 Thessalonians 5:17", "Luke 18:1"],
"content": "We are called to pray without ceasing and never give up in prayer."
},
{
"title": "Faith and Trust",
"verses": ["Hebrews 11:1", "Proverbs 3:5-6"],
"content": "Faith is the substance of things hoped for and the evidence of things not seen."
}
]
},
"christian-living": {
"title": "Christian Living",
"description": "Walking as followers of Christ in daily life",
"sections": [
{
"title": "Living Sacrifice",
"verses": ["Romans 12:1-2", "Galatians 2:20"],
"content": "Present your bodies as living sacrifices, holy and acceptable to God."
},
{
"title": "Light of the World",
"verses": ["Matthew 5:14-16", "Philippians 2:15"],
"content": "We are called to be lights in the darkness, showing God's love to others."
},
{
"title": "Holy Living",
"verses": ["1 Peter 1:15-16", "1 Thessalonians 4:7"],
"content": "God has called us to be holy as He is holy, set apart for His purposes."
}
]
},
"gods-love": {
"title": "God's Love",
"description": "Understanding the depth and breadth of God's love for us",
"sections": [
{
"title": "God is Love",
"verses": ["1 John 4:8", "1 John 4:16"],
"content": "Love is not just something God does - it is who He is. His very nature is love."
},
{
"title": "Demonstrated Love",
"verses": ["John 3:16", "Romans 5:8"],
"content": "God demonstrated His love by sending His Son to die for us while we were still sinners."
},
{
"title": "Unchanging Love",
"verses": ["Romans 8:38-39", "Jeremiah 31:3"],
"content": "Nothing can separate us from God's love. His love for us is eternal and unchanging."
}
]
},
"hope-comfort": {
"title": "Hope & Comfort",
"description": "Finding hope and comfort in God during difficult times",
"sections": [
{
"title": "God of All Comfort",
"verses": ["2 Corinthians 1:3-4", "Psalm 34:18"],
"content": "God comforts us in all our troubles so we can comfort others with His comfort."
},
{
"title": "Present Help",
"verses": ["Psalm 46:1", "Isaiah 41:10"],
"content": "God is our refuge and strength, a very present help in trouble."
},
{
"title": "Future Hope",
"verses": ["Romans 15:13", "1 Peter 1:3"],
"content": "We have hope for the future because of Christ's resurrection and God's promises."
}
]
},
"wisdom-guidance": {
"title": "Wisdom & Guidance",
"description": "Seeking God's wisdom and guidance for life decisions",
"sections": [
{
"title": "Trust in the Lord",
"verses": ["Proverbs 3:5-6", "Psalm 37:5"],
"content": "Trust in the Lord with all your heart and lean not on your own understanding."
},
{
"title": "Asking for Wisdom",
"verses": ["James 1:5", "Proverbs 2:6"],
"content": "If anyone lacks wisdom, let them ask God, who gives generously to all."
},
{
"title": "Word as Guide",
"verses": ["Psalm 119:105", "2 Timothy 3:16"],
"content": "God's Word is a lamp to our feet and a light to our path."
}
]
}
}
if slug not in guides_content:
raise HTTPException(status_code=404, detail="Study guide not found")
guide = guides_content[slug]
# Get verse texts
for section in guide["sections"]:
verse_texts = []
for verse_ref in section["verses"]:
try:
# Parse verse reference (simplified)
parts = verse_ref.split(" ")
if len(parts) >= 2:
book = " ".join(parts[:-1])
chapter_verse = parts[-1]
if ":" in chapter_verse:
if "-" in chapter_verse:
# Handle verse ranges like "8-9"
chapter, verse_range = chapter_verse.split(":")
start_verse, end_verse = verse_range.split("-")
verse_text = ""
for v in range(int(start_verse), int(end_verse) + 1):
text = bible.get_verse_text(book, int(chapter), v)
if text:
verse_text += f"[{v}] {text} "
else:
chapter, verse = chapter_verse.split(":")
verse_text = bible.get_verse_text(book, int(chapter), int(verse))
else:
# Just chapter
chapter = int(chapter_verse)
verse_text = f"(See {book} {chapter})"
if verse_text:
verse_texts.append({
"reference": verse_ref,
"text": verse_text
})
except:
verse_texts.append({
"reference": verse_ref,
"text": "Text not found"
})
# Bonus for exact phrase matches
if len(search_terms) > 1:
phrase = " ".join(search_terms)
if phrase in text_lower:
score += 10
section["verse_texts"] = verse_texts
return score
return templates.TemplateResponse(
"study_guide_detail.html",
{
"request": request,
"books": books,
"guide": guide
}
)
def highlight_search_terms(text: str, search_terms: List[str]) -> str:
"""Highlight search terms in the text"""
highlighted = text
@app.get("/verse-of-the-day", response_class=HTMLResponse)
def verse_of_the_day_page(request: Request):
"""Verse of the day page"""
books = list(bible.iter_books())
daily_verse = get_daily_verse()
for term in search_terms:
# Create case-insensitive regex pattern that preserves original case
pattern = re.compile(f'({re.escape(term)})', re.IGNORECASE)
highlighted = pattern.sub(r'<mark>\1</mark>', highlighted)
return templates.TemplateResponse(
"verse_of_the_day.html",
{
"request": request,
"books": books,
"daily_verse": daily_verse
}
)
@app.get("/api/verse-of-the-day")
def verse_of_the_day_api():
"""API endpoint for verse of the day"""
return get_daily_verse()
def get_daily_verse():
"""Get the verse of the day based on current date"""
# Use date as seed for consistent daily verse
today = datetime.now().strftime("%Y-%m-%d")
seed = int(hashlib.md5(today.encode()).hexdigest(), 16) % 1000000
return highlighted
# Featured verses for rotation
featured_verses = [
("John", 3, 16),
("Jeremiah", 29, 11),
("Philippians", 4, 13),
("Romans", 8, 28),
("Proverbs", 3, 5),
("Isaiah", 41, 10),
("Matthew", 11, 28),
("1 John", 4, 19),
("Psalm", 23, 1),
("2 Corinthians", 5, 17),
("Ephesians", 2, 8),
("Romans", 10, 9),
("1 Peter", 5, 7),
("James", 1, 5),
("Philippians", 4, 19),
("Psalm", 119, 105),
("Matthew", 6, 33),
("Romans", 12, 2),
("1 Corinthians", 13, 13),
("Galatians", 5, 22),
("Hebrews", 11, 1),
("1 Thessalonians", 5, 18),
("Psalm", 46, 1),
("Isaiah", 40, 31),
("Matthew", 5, 16),
("Romans", 15, 13),
("Colossians", 3, 23),
("1 John", 1, 9),
("Psalm", 37, 4),
("Proverbs", 27, 17)
]
# Select verse based on seed
verse_index = seed % len(featured_verses)
book, chapter, verse = featured_verses[verse_index]
verse_text = bible.get_verse_text(book, chapter, verse)
if not verse_text:
# Fallback to John 3:16
book, chapter, verse = "John", 3, 16
verse_text = bible.get_verse_text(book, chapter, verse)
return {
"book": book,
"chapter": chapter,
"verse": verse,
"text": verse_text,
"reference": f"{book} {chapter}:{verse}",
"date": today
}
@app.get("/sitemap.xml", response_class=Response)
def sitemap():
@@ -209,9 +619,10 @@ def sitemap():
@app.get("/", response_class=HTMLResponse)
def read_root(request: Request):
books = list(bible.iter_books())
daily_verse = get_daily_verse()
return templates.TemplateResponse(
"index.html", {"request": request, "books": books}
"index.html", {"request": request, "books": books, "daily_verse": daily_verse}
)
+22
View File
@@ -551,6 +551,28 @@
>
🔍 Search Bible
</a>
<a
href="/study-guides"
{% if request.url and "/study-guides" in request.url.path %}class="active"{% endif %}
style="
padding: 0.35rem 0.5rem;
font-size: 0.95rem;
margin-bottom: 0.1rem;
"
>
📖 Study Guides
</a>
<a
href="/verse-of-the-day"
{% if request.url and request.url.path == "/verse-of-the-day" %}class="active"{% endif %}
style="
padding: 0.35rem 0.5rem;
font-size: 0.95rem;
margin-bottom: 0.1rem;
"
>
✨ Verse of the Day
</a>
{% if books %}
<h3
+110 -4
View File
@@ -57,6 +57,83 @@
</div>
</div>
<!-- Verse of the Day -->
<div class="verse-of-the-day" style="
background: linear-gradient(135deg, var(--primary-ultra-light) 0%, var(--surface-color) 100%);
border: 2px solid var(--primary-light);
border-radius: var(--radius-lg);
padding: 2rem;
margin: 2rem auto;
max-width: 700px;
text-align: center;
box-shadow: var(--shadow-md);
">
<h2 style="
font-size: 1.3rem;
margin-bottom: 1.5rem;
color: var(--primary-color);
font-family: var(--font-display);
">
✨ Verse of the Day
</h2>
<blockquote style="
font-family: 'Crimson Text', 'Times New Roman', serif;
font-size: 1.2rem;
line-height: 1.7;
color: var(--text-primary);
font-style: italic;
margin: 0 0 1rem;
quotes: '"' '"';
">
"{{ daily_verse.text }}"
</blockquote>
<cite style="
font-family: var(--font-display);
font-size: 1rem;
font-weight: 600;
color: var(--primary-color);
font-style: normal;
display: block;
margin-bottom: 1.5rem;
">
— {{ daily_verse.reference }}
</cite>
<div style="display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;">
<a href="/verse-of-the-day" style="
display: inline-block;
background: var(--primary-light);
color: white;
padding: 0.6rem 1.2rem;
text-decoration: none;
border-radius: var(--radius-md);
font-family: var(--font-display);
font-size: 0.9rem;
transition: background-color 0.2s ease;
" onmouseover="this.style.backgroundColor='var(--primary-color)'"
onmouseout="this.style.backgroundColor='var(--primary-light)'">
Read More
</a>
<a href="/book/{{ daily_verse.book }}" style="
display: inline-block;
background: transparent;
color: var(--primary-color);
padding: 0.6rem 1.2rem;
text-decoration: none;
border: 2px solid var(--primary-light);
border-radius: var(--radius-md);
font-family: var(--font-display);
font-size: 0.9rem;
transition: all 0.2s ease;
" onmouseover="this.style.backgroundColor='var(--primary-light)'; this.style.color='white'"
onmouseout="this.style.backgroundColor='transparent'; this.style.color='var(--primary-color)'">
Read {{ daily_verse.book }}
</a>
</div>
</div>
<!-- Bible Book Categories Legend -->
<div class="bible-legend">
<h3 class="legend-title">Bible Book Categories</h3>
@@ -316,11 +393,40 @@
<div class="text-center mt-4" style="padding: 2rem; background: var(--surface-color); border-radius: var(--radius-lg); margin-top: 3rem; border: 1px solid var(--border-light);">
<h3 style="color: var(--primary-color); margin: 0 0 1rem; font-family: var(--font-display);">
🤖 AI Commentary Coming Soon
🌱 Grow in Your Faith
</h3>
<p style="color: var(--text-secondary); margin: 0; line-height: 1.6; font-size: 0.95rem;">
We're working on AI-powered commentary that will provide historical context,
theological insights, and cross-references for every passage. Stay tuned for this exciting feature!
<p style="color: var(--text-secondary); margin: 0 0 1.5rem; line-height: 1.6; font-size: 0.95rem;">
Explore our study guides and daily verses to deepen your understanding of God's Word
and strengthen your relationship with Him.
</p>
<div style="display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;">
<a href="/study-guides" style="
display: inline-block;
background: var(--primary-light);
color: white;
padding: 0.75rem 1.5rem;
text-decoration: none;
border-radius: var(--radius-md);
font-family: var(--font-display);
transition: background-color 0.2s ease;
" onmouseover="this.style.backgroundColor='var(--primary-color)'"
onmouseout="this.style.backgroundColor='var(--primary-light)'">
📖 Study Guides
</a>
<a href="/verse-of-the-day" style="
display: inline-block;
background: transparent;
color: var(--primary-color);
padding: 0.75rem 1.5rem;
text-decoration: none;
border: 2px solid var(--primary-light);
border-radius: var(--radius-md);
font-family: var(--font-display);
transition: all 0.2s ease;
" onmouseover="this.style.backgroundColor='var(--primary-light)'; this.style.color='white'"
onmouseout="this.style.backgroundColor='transparent'; this.style.color='var(--primary-color)'">
✨ Daily Verse
</a>
</div>
</div>
{% endblock %}
@@ -0,0 +1,265 @@
{% extends "base.html" %}
{% block title %}{{ guide.title }} - Bible Study Guide - KJV Study{% endblock %}
{% block description %}{{ guide.description }} - A comprehensive Bible study guide with Scripture references and practical applications from the KJV Bible.{% endblock %}
{% block keywords %}{{ guide.title }}, Bible study, KJV study, Christian study guide, Scripture study, Bible lesson{% endblock %}
{% block content %}
<div class="study-guide-header" style="margin-bottom: 2rem;">
<nav class="breadcrumb" style="
margin-bottom: 1rem;
font-size: 0.9rem;
color: var(--text-secondary);
">
<a href="/" style="color: var(--primary-color); text-decoration: none;">Home</a>
<span style="margin: 0 0.5rem;"></span>
<a href="/study-guides" style="color: var(--primary-color); text-decoration: none;">Study Guides</a>
<span style="margin: 0 0.5rem;"></span>
<span>{{ guide.title }}</span>
</nav>
<h1 class="guide-title" style="
font-size: 2.2rem;
margin-bottom: 0.5rem;
color: var(--text-primary);
font-family: var(--font-display);
line-height: 1.2;
">
📖 {{ guide.title }}
</h1>
<p class="guide-description" style="
font-size: 1.1rem;
color: var(--text-secondary);
line-height: 1.6;
max-width: 700px;
margin-bottom: 2rem;
">
{{ guide.description }}
</p>
</div>
<!-- Study Guide Sections -->
<div class="study-sections">
{% for section in guide.sections %}
<div class="study-section" style="
background: var(--surface-color);
border: 1px solid var(--border-light);
border-radius: var(--radius-lg);
padding: 2rem;
margin-bottom: 2rem;
box-shadow: var(--shadow-sm);
">
<h2 class="section-title" style="
font-size: 1.5rem;
margin-bottom: 1.5rem;
color: var(--primary-color);
font-family: var(--font-display);
border-bottom: 2px solid var(--border-light);
padding-bottom: 0.5rem;
">
{{ section.title }}
</h2>
<!-- Scripture Verses -->
<div class="scripture-section" style="margin-bottom: 2rem;">
<h3 style="
font-size: 1rem;
margin-bottom: 1rem;
color: var(--text-secondary);
text-transform: uppercase;
letter-spacing: 0.5px;
font-weight: 600;
">
📜 Scripture References
</h3>
{% for verse_data in section.verse_texts %}
<div class="verse-card" style="
background: var(--background-color);
border-left: 4px solid var(--primary-light);
padding: 1.5rem;
margin-bottom: 1rem;
border-radius: 0 var(--radius-md) var(--radius-md) 0;
position: relative;
">
<div class="verse-reference" style="
font-weight: 600;
color: var(--primary-color);
margin-bottom: 0.75rem;
font-size: 0.95rem;
font-family: var(--font-display);
">
{{ verse_data.reference }}
</div>
<div class="verse-text" style="
font-family: 'Crimson Text', 'Times New Roman', serif;
font-size: 1.1rem;
line-height: 1.7;
color: var(--text-primary);
font-style: italic;
">
"{{ verse_data.text }}"
</div>
<a href="/search?q={{ verse_data.reference | urlencode }}" style="
position: absolute;
top: 1rem;
right: 1rem;
color: var(--text-secondary);
text-decoration: none;
font-size: 0.8rem;
opacity: 0.7;
transition: opacity 0.2s ease;
" onmouseover="this.style.opacity='1'" onmouseout="this.style.opacity='0.7'">
🔍
</a>
</div>
{% endfor %}
</div>
<!-- Study Content -->
<div class="study-content" style="
background: var(--primary-ultra-light);
padding: 1.5rem;
border-radius: var(--radius-md);
border: 1px solid var(--primary-light);
">
<h3 style="
font-size: 1rem;
margin-bottom: 1rem;
color: var(--primary-color);
text-transform: uppercase;
letter-spacing: 0.5px;
font-weight: 600;
">
💡 Study Notes
</h3>
<p style="
font-size: 1.05rem;
line-height: 1.7;
color: var(--text-primary);
margin: 0;
font-family: 'Crimson Text', 'Times New Roman', serif;
">
{{ section.content }}
</p>
</div>
</div>
{% endfor %}
</div>
<!-- Navigation and Actions -->
<div class="study-actions" style="
background: var(--surface-color);
border-radius: var(--radius-lg);
padding: 2rem;
margin-top: 3rem;
text-align: center;
border: 1px solid var(--border-light);
box-shadow: var(--shadow-sm);
">
<h3 style="
color: var(--primary-color);
margin: 0 0 1rem;
font-family: var(--font-display);
font-size: 1.3rem;
">
Continue Your Study
</h3>
<p style="
color: var(--text-secondary);
margin: 0 0 1.5rem;
line-height: 1.6;
">
Explore more study guides or search for specific topics in Scripture.
</p>
<div style="display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;">
<a href="/study-guides" style="
display: inline-block;
background: var(--primary-light);
color: white;
padding: 0.75rem 1.5rem;
text-decoration: none;
border-radius: var(--radius-md);
font-family: var(--font-display);
transition: background-color 0.2s ease;
" onmouseover="this.style.backgroundColor='var(--primary-color)'"
onmouseout="this.style.backgroundColor='var(--primary-light)'">
📖 More Study Guides
</a>
<a href="/search" style="
display: inline-block;
background: transparent;
color: var(--primary-color);
padding: 0.75rem 1.5rem;
text-decoration: none;
border: 2px solid var(--primary-light);
border-radius: var(--radius-md);
font-family: var(--font-display);
transition: all 0.2s ease;
" onmouseover="this.style.backgroundColor='var(--primary-light)'; this.style.color='white'"
onmouseout="this.style.backgroundColor='transparent'; this.style.color='var(--primary-color)'">
🔍 Search Scripture
</a>
<a href="/verse-of-the-day" style="
display: inline-block;
background: transparent;
color: var(--primary-color);
padding: 0.75rem 1.5rem;
text-decoration: none;
border: 2px solid var(--primary-light);
border-radius: var(--radius-md);
font-family: var(--font-display);
transition: all 0.2s ease;
" onmouseover="this.style.backgroundColor='var(--primary-light)'; this.style.color='white'"
onmouseout="this.style.backgroundColor='transparent'; this.style.color='var(--primary-color)'">
✨ Verse of the Day
</a>
</div>
</div>
<style>
@media (max-width: 768px) {
.guide-title {
font-size: 1.8rem !important;
}
.guide-description {
font-size: 1rem !important;
}
.study-section {
padding: 1.5rem !important;
}
.verse-card {
padding: 1rem !important;
}
.verse-text {
font-size: 1rem !important;
}
.study-actions {
padding: 1.5rem !important;
}
.study-actions div {
flex-direction: column !important;
}
.study-actions a {
text-align: center;
}
}
.verse-card:hover {
transform: translateX(4px);
transition: transform 0.2s ease;
}
.breadcrumb a:hover {
text-decoration: underline;
}
</style>
{% endblock %}
+219
View File
@@ -0,0 +1,219 @@
{% extends "base.html" %}
{% block title %}Bible Study Guides - KJV Study{% endblock %}
{% block description %}Explore comprehensive Bible study guides covering foundational Christian truths, character development, and biblical themes. Study the KJV Bible with structured guides and scripture references.{% endblock %}
{% block keywords %}Bible study guides, KJV study, Christian study guides, Bible study topics, scripture study, Bible lessons{% endblock %}
{% block content %}
<div class="text-center mb-4">
<h1 class="page-title">
📖 Bible Study Guides
</h1>
<p style="font-size: 1rem; color: var(--text-secondary); max-width: 600px; margin: 0 auto;">
Deepen your understanding of God's Word with these comprehensive study guides.
Each guide includes relevant Scripture passages and practical applications for Christian living.
</p>
</div>
<!-- Study Guide Categories -->
{% for category, guides in study_guides.items() %}
<div class="study-category" style="margin-bottom: 3rem;">
<h2 class="category-title" style="
font-size: 1.5rem;
margin-bottom: 1.5rem;
color: var(--primary-color);
border-bottom: 2px solid var(--border-light);
padding-bottom: 0.5rem;
font-family: var(--font-display);
">
{{ category }}
</h2>
<div class="guides-grid" style="
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 1.5rem;
margin-bottom: 2rem;
">
{% for guide in guides %}
<div class="guide-card" style="
background: var(--surface-color);
border: 1px solid var(--border-light);
border-radius: var(--radius-lg);
padding: 1.5rem;
transition: all 0.2s ease;
box-shadow: var(--shadow-sm);
position: relative;
">
<h3 style="
margin: 0 0 1rem;
font-size: 1.25rem;
color: var(--text-primary);
font-family: var(--font-display);
">
{{ guide.title }}
</h3>
<p style="
color: var(--text-secondary);
line-height: 1.6;
margin-bottom: 1.5rem;
font-size: 0.95rem;
">
{{ guide.description }}
</p>
<div class="verse-preview" style="
background: var(--background-color);
border-left: 3px solid var(--primary-light);
padding: 0.75rem 1rem;
margin-bottom: 1.5rem;
border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
">
<h4 style="
font-size: 0.85rem;
margin: 0 0 0.5rem;
color: var(--text-secondary);
text-transform: uppercase;
letter-spacing: 0.5px;
">Key Verses</h4>
<div class="verse-list" style="font-size: 0.9rem; color: var(--text-primary);">
{% for verse in guide.verses[:3] %}
<span style="
display: inline-block;
background: var(--primary-ultra-light);
padding: 0.25rem 0.5rem;
border-radius: var(--radius-sm);
margin: 0.25rem 0.25rem 0.25rem 0;
font-size: 0.85rem;
color: var(--primary-color);
">{{ verse }}</span>
{% endfor %}
{% if guide.verses|length > 3 %}
<span style="color: var(--text-secondary); font-size: 0.85rem;">
+{{ guide.verses|length - 3 }} more
</span>
{% endif %}
</div>
</div>
<a href="/study-guides/{{ guide.slug }}" style="
display: inline-block;
background: var(--primary-light);
color: white;
padding: 0.75rem 1.5rem;
text-decoration: none;
border-radius: var(--radius-md);
font-family: var(--font-display);
font-weight: 500;
transition: background-color 0.2s ease;
font-size: 0.95rem;
" onmouseover="this.style.backgroundColor='var(--primary-color)'"
onmouseout="this.style.backgroundColor='var(--primary-light)'">
Start Study →
</a>
</div>
{% endfor %}
</div>
</div>
{% endfor %}
<!-- Call to Action -->
<div class="cta-section" style="
background: var(--surface-color);
border-radius: var(--radius-lg);
padding: 2rem;
margin-top: 3rem;
text-align: center;
border: 1px solid var(--border-light);
box-shadow: var(--shadow-sm);
">
<h3 style="
color: var(--primary-color);
margin: 0 0 1rem;
font-family: var(--font-display);
font-size: 1.3rem;
">
🌱 Growing in Faith
</h3>
<p style="
color: var(--text-secondary);
margin: 0 0 1.5rem;
line-height: 1.6;
max-width: 500px;
margin-left: auto;
margin-right: auto;
">
These study guides are designed to help you grow in your understanding of God's Word.
Take your time with each section and allow the Holy Spirit to teach you through Scripture.
</p>
<div style="display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;">
<a href="/verse-of-the-day" style="
display: inline-block;
background: var(--primary-light);
color: white;
padding: 0.75rem 1.5rem;
text-decoration: none;
border-radius: var(--radius-md);
font-family: var(--font-display);
transition: background-color 0.2s ease;
" onmouseover="this.style.backgroundColor='var(--primary-color)'"
onmouseout="this.style.backgroundColor='var(--primary-light)'">
✨ Today's Verse
</a>
<a href="/search" style="
display: inline-block;
background: transparent;
color: var(--primary-color);
padding: 0.75rem 1.5rem;
text-decoration: none;
border: 2px solid var(--primary-light);
border-radius: var(--radius-md);
font-family: var(--font-display);
transition: all 0.2s ease;
" onmouseover="this.style.backgroundColor='var(--primary-light)'; this.style.color='white'"
onmouseout="this.style.backgroundColor='transparent'; this.style.color='var(--primary-color)'">
🔍 Search Scripture
</a>
</div>
</div>
<style>
.guide-card:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-md);
border-color: var(--primary-ultra-light);
}
@media (max-width: 768px) {
.guides-grid {
grid-template-columns: 1fr !important;
}
.cta-section {
padding: 1.5rem !important;
}
.cta-section div {
flex-direction: column !important;
}
.cta-section a {
text-align: center;
}
}
.page-title {
font-size: 2.2rem;
margin-bottom: 1rem;
color: var(--text-primary);
font-family: var(--font-display);
}
@media (max-width: 768px) {
.page-title {
font-size: 1.8rem;
}
}
</style>
{% endblock %}
@@ -0,0 +1,416 @@
{% extends "base.html" %}
{% block title %}Verse of the Day - {{ daily_verse.reference }} - KJV Study{% endblock %}
{% block description %}Today's verse from the King James Bible: {{ daily_verse.reference }} - {{ daily_verse.text[:100] }}... Meditate on God's Word daily with our verse of the day feature.{% endblock %}
{% block keywords %}verse of the day, daily Bible verse, KJV verse, daily devotion, Bible meditation, Scripture of the day{% endblock %}
{% block content %}
<div class="verse-of-the-day-container">
<!-- Header -->
<div class="text-center mb-4">
<h1 class="page-title" style="
font-size: 2.2rem;
margin-bottom: 0.5rem;
color: var(--text-primary);
font-family: var(--font-display);
">
✨ Verse of the Day
</h1>
<p style="
font-size: 1rem;
color: var(--text-secondary);
max-width: 600px;
margin: 0 auto 2rem;
">
{{ daily_verse.date }} - Meditate on God's Word and let it transform your heart and mind.
</p>
</div>
<!-- Main Verse Card -->
<div class="verse-main-card" style="
background: linear-gradient(135deg, var(--primary-ultra-light) 0%, var(--surface-color) 100%);
border: 2px solid var(--primary-light);
border-radius: var(--radius-xl);
padding: 3rem 2rem;
margin: 2rem auto;
max-width: 800px;
text-align: center;
box-shadow: var(--shadow-lg);
position: relative;
overflow: hidden;
">
<!-- Decorative background -->
<div style="
position: absolute;
top: -50px;
right: -50px;
width: 200px;
height: 200px;
background: radial-gradient(circle, var(--primary-ultra-light) 0%, transparent 70%);
opacity: 0.3;
pointer-events: none;
"></div>
<div style="
position: absolute;
bottom: -50px;
left: -50px;
width: 150px;
height: 150px;
background: radial-gradient(circle, var(--primary-ultra-light) 0%, transparent 70%);
opacity: 0.2;
pointer-events: none;
"></div>
<div class="verse-content" style="position: relative; z-index: 2;">
<div class="verse-icon" style="
font-size: 3rem;
margin-bottom: 1.5rem;
opacity: 0.7;
">📖</div>
<blockquote class="verse-text" style="
font-family: 'Crimson Text', 'Times New Roman', serif;
font-size: 1.4rem;
line-height: 1.8;
color: var(--text-primary);
font-style: italic;
margin: 0 0 2rem;
font-weight: 400;
quotes: '"' '"';
">
"{{ daily_verse.text }}"
</blockquote>
<cite class="verse-reference" style="
font-family: var(--font-display);
font-size: 1.2rem;
font-weight: 600;
color: var(--primary-color);
font-style: normal;
display: block;
margin-bottom: 2rem;
">
— {{ daily_verse.reference }}
</cite>
<!-- Action Buttons -->
<div class="verse-actions" style="
display: flex;
gap: 1rem;
justify-content: center;
flex-wrap: wrap;
margin-top: 2rem;
">
<a href="/book/{{ daily_verse.book }}" style="
display: inline-block;
background: var(--primary-color);
color: white;
padding: 0.75rem 1.5rem;
text-decoration: none;
border-radius: var(--radius-md);
font-family: var(--font-display);
font-weight: 500;
transition: all 0.2s ease;
box-shadow: var(--shadow-sm);
" onmouseover="this.style.transform='translateY(-2px)'; this.style.boxShadow='var(--shadow-md)'"
onmouseout="this.style.transform='translateY(0)'; this.style.boxShadow='var(--shadow-sm)'">
📚 Read {{ daily_verse.book }}
</a>
<a href="/book/{{ daily_verse.book }}/{{ daily_verse.chapter }}" style="
display: inline-block;
background: var(--primary-light);
color: white;
padding: 0.75rem 1.5rem;
text-decoration: none;
border-radius: var(--radius-md);
font-family: var(--font-display);
font-weight: 500;
transition: all 0.2s ease;
box-shadow: var(--shadow-sm);
" onmouseover="this.style.transform='translateY(-2px)'; this.style.boxShadow='var(--shadow-md)'"
onmouseout="this.style.transform='translateY(0)'; this.style.boxShadow='var(--shadow-sm)'">
📄 Chapter {{ daily_verse.chapter }}
</a>
</div>
</div>
</div>
<!-- Reflection Section -->
<div class="reflection-section" style="
background: var(--surface-color);
border-radius: var(--radius-lg);
padding: 2rem;
margin: 2rem auto;
max-width: 700px;
border: 1px solid var(--border-light);
box-shadow: var(--shadow-sm);
">
<h2 style="
font-size: 1.3rem;
margin-bottom: 1rem;
color: var(--primary-color);
font-family: var(--font-display);
text-align: center;
">
💭 Reflection Questions
</h2>
<div class="reflection-questions" style="
color: var(--text-primary);
line-height: 1.7;
">
<ul style="
list-style: none;
padding: 0;
margin: 0;
">
<li style="
padding: 0.75rem 0;
border-bottom: 1px solid var(--border-light);
display: flex;
align-items: flex-start;
gap: 0.75rem;
">
<span style="color: var(--primary-color); font-weight: bold;"></span>
<span>What does this verse teach me about God's character?</span>
</li>
<li style="
padding: 0.75rem 0;
border-bottom: 1px solid var(--border-light);
display: flex;
align-items: flex-start;
gap: 0.75rem;
">
<span style="color: var(--primary-color); font-weight: bold;"></span>
<span>How can I apply this truth to my life today?</span>
</li>
<li style="
padding: 0.75rem 0;
border-bottom: 1px solid var(--border-light);
display: flex;
align-items: flex-start;
gap: 0.75rem;
">
<span style="color: var(--primary-color); font-weight: bold;"></span>
<span>What is God calling me to do or change?</span>
</li>
<li style="
padding: 0.75rem 0;
display: flex;
align-items: flex-start;
gap: 0.75rem;
">
<span style="color: var(--primary-color); font-weight: bold;"></span>
<span>How can I share this truth with others?</span>
</li>
</ul>
</div>
</div>
<!-- Share Section -->
<div class="share-section" style="
background: var(--background-color);
border-radius: var(--radius-lg);
padding: 1.5rem;
margin: 2rem auto;
max-width: 600px;
text-align: center;
border: 1px solid var(--border-light);
">
<h3 style="
font-size: 1.1rem;
margin-bottom: 1rem;
color: var(--text-primary);
font-family: var(--font-display);
">
📤 Share Today's Verse
</h3>
<p style="
font-size: 0.9rem;
color: var(--text-secondary);
margin-bottom: 1rem;
">
Encourage others with God's Word
</p>
<div class="share-buttons" style="
display: flex;
gap: 0.75rem;
justify-content: center;
flex-wrap: wrap;
">
<button onclick="copyToClipboard()" style="
background: var(--primary-light);
color: white;
border: none;
padding: 0.6rem 1.2rem;
border-radius: var(--radius-md);
cursor: pointer;
font-family: var(--font-display);
font-size: 0.9rem;
transition: background-color 0.2s ease;
" onmouseover="this.style.backgroundColor='var(--primary-color)'"
onmouseout="this.style.backgroundColor='var(--primary-light)'">
📋 Copy Verse
</button>
</div>
<div id="copyMessage" style="
color: var(--primary-color);
font-size: 0.85rem;
margin-top: 0.5rem;
opacity: 0;
transition: opacity 0.3s ease;
">
Verse copied to clipboard!
</div>
</div>
<!-- Navigation -->
<div class="navigation-section" style="
background: var(--surface-color);
border-radius: var(--radius-lg);
padding: 2rem;
margin-top: 3rem;
text-align: center;
border: 1px solid var(--border-light);
box-shadow: var(--shadow-sm);
">
<h3 style="
color: var(--primary-color);
margin: 0 0 1rem;
font-family: var(--font-display);
font-size: 1.3rem;
">
Continue Your Study
</h3>
<div style="display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;">
<a href="/study-guides" style="
display: inline-block;
background: var(--primary-light);
color: white;
padding: 0.75rem 1.5rem;
text-decoration: none;
border-radius: var(--radius-md);
font-family: var(--font-display);
transition: background-color 0.2s ease;
" onmouseover="this.style.backgroundColor='var(--primary-color)'"
onmouseout="this.style.backgroundColor='var(--primary-light)'">
📖 Study Guides
</a>
<a href="/search" style="
display: inline-block;
background: transparent;
color: var(--primary-color);
padding: 0.75rem 1.5rem;
text-decoration: none;
border: 2px solid var(--primary-light);
border-radius: var(--radius-md);
font-family: var(--font-display);
transition: all 0.2s ease;
" onmouseover="this.style.backgroundColor='var(--primary-light)'; this.style.color='white'"
onmouseout="this.style.backgroundColor='transparent'; this.style.color='var(--primary-color)'">
🔍 Search Bible
</a>
<a href="/" style="
display: inline-block;
background: transparent;
color: var(--primary-color);
padding: 0.75rem 1.5rem;
text-decoration: none;
border: 2px solid var(--primary-light);
border-radius: var(--radius-md);
font-family: var(--font-display);
transition: all 0.2s ease;
" onmouseover="this.style.backgroundColor='var(--primary-light)'; this.style.color='white'"
onmouseout="this.style.backgroundColor='transparent'; this.style.color='var(--primary-color)'">
📚 All Books
</a>
</div>
</div>
</div>
<style>
@media (max-width: 768px) {
.page-title {
font-size: 1.8rem !important;
}
.verse-main-card {
padding: 2rem 1.5rem !important;
margin: 1rem auto !important;
}
.verse-text {
font-size: 1.2rem !important;
}
.verse-reference {
font-size: 1rem !important;
}
.verse-actions {
flex-direction: column !important;
}
.verse-actions a {
text-align: center;
}
.reflection-section,
.navigation-section {
padding: 1.5rem !important;
margin: 1.5rem auto !important;
}
.navigation-section div {
flex-direction: column !important;
}
.share-buttons {
flex-direction: column !important;
}
}
.verse-main-card:hover {
transform: translateY(-2px);
transition: transform 0.3s ease;
}
</style>
<script>
function copyToClipboard() {
const verseText = `"{{ daily_verse.text }}" — {{ daily_verse.reference }}`;
if (navigator.clipboard && window.isSecureContext) {
navigator.clipboard.writeText(verseText).then(function() {
showCopyMessage();
});
} else {
// Fallback for older browsers
const textArea = document.createElement('textarea');
textArea.value = verseText;
textArea.style.position = 'fixed';
textArea.style.left = '-999999px';
textArea.style.top = '-999999px';
document.body.appendChild(textArea);
textArea.focus();
textArea.select();
try {
document.execCommand('copy');
showCopyMessage();
} catch (err) {
console.error('Failed to copy text: ', err);
}
textArea.remove();
}
}
function showCopyMessage() {
const message = document.getElementById('copyMessage');
message.style.opacity = '1';
setTimeout(() => {
message.style.opacity = '0';
}, 2000);
}
</script>
{% endblock %}