mirror of
https://github.com/kennethreitz/kjvstudy.org.git
synced 2026-06-05 23:00:16 +00:00
7606fa8c3a
Changed scrollIntoView behavior from 'smooth' to 'auto' across all templates for instant, non-animated navigation between selections. Affected ~75 instances across 50+ template files. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
677 lines
27 KiB
HTML
677 lines
27 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}The King James Bible{% endblock %}
|
|
|
|
{% block description %}Study the KJV (King James Version) Bible with comprehensive resources including verse search, topical index, study guides, reading plans, interlinear text, and theological tools.{% endblock %}
|
|
|
|
{% block head %}
|
|
<style>
|
|
/* Title Page - Classical Book Style */
|
|
.title-page {
|
|
text-align: center;
|
|
padding: 2.5rem 0 1.5rem;
|
|
margin-bottom: 1.5rem;
|
|
border-bottom: 1px solid var(--border-color);
|
|
margin-left: -150px;
|
|
}
|
|
|
|
.title-page h1 {
|
|
font-size: 2.6rem;
|
|
margin-bottom: 0.25rem;
|
|
letter-spacing: 0.02em;
|
|
font-weight: 400;
|
|
}
|
|
|
|
.title-page .subtitle {
|
|
font-style: italic;
|
|
font-size: 1.05rem;
|
|
color: var(--text-secondary);
|
|
margin: 0 0 1.25rem 0;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
.title-page .epigraph {
|
|
max-width: 34rem;
|
|
margin: 0 auto;
|
|
font-size: 1.05rem;
|
|
line-height: 1.7;
|
|
font-style: italic;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.title-page .epigraph p {
|
|
margin: 0;
|
|
}
|
|
|
|
.title-page .epigraph footer {
|
|
margin-top: 0.5rem;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.title-page .epigraph footer a {
|
|
color: var(--text-tertiary);
|
|
}
|
|
|
|
/* Verse Lookup */
|
|
.verse-lookup {
|
|
max-width: 32rem;
|
|
margin: 2rem auto;
|
|
margin-left: calc(50% - 16rem - 50px);
|
|
padding: 1.5rem;
|
|
border: 1px solid var(--border-color);
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.verse-lookup.selected {
|
|
border-color: #4a7c59;
|
|
box-shadow: 0 0 0 2px rgba(74, 124, 89, 0.3);
|
|
background: rgba(74, 124, 89, 0.03);
|
|
}
|
|
|
|
[data-theme="dark"] .verse-lookup.selected {
|
|
border-color: #6b9b7a;
|
|
box-shadow: 0 0 0 2px rgba(107, 155, 122, 0.3);
|
|
background: rgba(107, 155, 122, 0.05);
|
|
}
|
|
|
|
.verse-lookup h2 {
|
|
margin-top: 0;
|
|
font-size: 1.1rem;
|
|
font-style: italic;
|
|
font-weight: 600;
|
|
text-align: center;
|
|
}
|
|
|
|
.lookup-form {
|
|
display: flex;
|
|
gap: 0.5rem;
|
|
margin-top: 1rem;
|
|
}
|
|
|
|
.lookup-input {
|
|
flex: 1;
|
|
padding: 0.75rem 1rem;
|
|
font-size: 1rem;
|
|
border: 1px solid var(--border-color);
|
|
background: var(--bg-color);
|
|
color: var(--text-color);
|
|
font-family: inherit;
|
|
}
|
|
|
|
.lookup-input:focus {
|
|
outline: none;
|
|
border-color: var(--text-color);
|
|
}
|
|
|
|
.lookup-btn {
|
|
padding: 0.75rem 1.5rem;
|
|
font-size: 1rem;
|
|
background: var(--text-color);
|
|
color: var(--bg-color);
|
|
border: 1px solid var(--text-color);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.lookup-btn:hover {
|
|
background: var(--bg-color);
|
|
color: var(--text-color);
|
|
}
|
|
|
|
.lookup-help {
|
|
font-size: 0.85rem;
|
|
color: var(--text-tertiary);
|
|
margin-top: 0.5rem;
|
|
font-style: italic;
|
|
text-align: center;
|
|
}
|
|
|
|
/* Navigation Links */
|
|
.nav-links {
|
|
text-align: center;
|
|
margin: 1.5rem 0 2.5rem;
|
|
margin-left: -150px;
|
|
font-size: 1.05rem;
|
|
}
|
|
|
|
.nav-links a {
|
|
margin: 0 0.75rem;
|
|
padding: 0.25rem 0.5rem;
|
|
border-radius: 3px;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.nav-links a.selected {
|
|
background: rgba(74, 124, 89, 0.15);
|
|
outline: 2px solid #4a7c59;
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
[data-theme="dark"] .nav-links a.selected {
|
|
background: rgba(107, 155, 122, 0.15);
|
|
outline-color: #6b9b7a;
|
|
}
|
|
|
|
/* Daily verse link */
|
|
.daily-verse-link {
|
|
padding: 0.15rem 0.4rem;
|
|
border-radius: 3px;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.daily-verse-link.selected {
|
|
background: rgba(74, 124, 89, 0.15);
|
|
outline: 2px solid #4a7c59;
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
[data-theme="dark"] .daily-verse-link.selected {
|
|
background: rgba(107, 155, 122, 0.15);
|
|
outline-color: #6b9b7a;
|
|
}
|
|
|
|
/* Feature Cards */
|
|
.feature-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: 1.5rem;
|
|
margin: 2rem 0;
|
|
}
|
|
|
|
.feature-card {
|
|
display: block;
|
|
padding: 1.25rem 1.5rem;
|
|
border: 1px solid var(--border-color);
|
|
text-decoration: none;
|
|
color: var(--text-color);
|
|
transition: border-color 0.2s, background 0.2s;
|
|
}
|
|
|
|
.feature-card:hover,
|
|
.feature-card:focus-visible {
|
|
border-color: var(--border-color-darker);
|
|
background: var(--code-bg);
|
|
}
|
|
|
|
.feature-card.selected {
|
|
border-color: #4a7c59;
|
|
box-shadow: 0 0 0 2px rgba(74, 124, 89, 0.3);
|
|
background: rgba(74, 124, 89, 0.05);
|
|
}
|
|
|
|
[data-theme="dark"] .feature-card.selected {
|
|
border-color: #6b9b7a;
|
|
box-shadow: 0 0 0 2px rgba(107, 155, 122, 0.3);
|
|
background: rgba(107, 155, 122, 0.1);
|
|
}
|
|
|
|
.feature-card h3 {
|
|
font-size: 1.05rem;
|
|
margin: 0 0 0.5rem 0;
|
|
color: var(--text-color);
|
|
}
|
|
|
|
.feature-card p {
|
|
font-size: 0.92rem;
|
|
color: var(--text-secondary);
|
|
margin: 0;
|
|
line-height: 1.55;
|
|
}
|
|
|
|
/* Explore Section */
|
|
.explore-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(4, 1fr);
|
|
gap: 1rem;
|
|
margin: 1.5rem 0;
|
|
}
|
|
|
|
.explore-link {
|
|
display: block;
|
|
padding: 1rem;
|
|
text-align: center;
|
|
text-decoration: none;
|
|
color: var(--text-color);
|
|
border: 1px solid var(--border-color);
|
|
font-size: 0.95rem;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.explore-link:hover {
|
|
border-color: var(--border-color-darker);
|
|
background: var(--code-bg);
|
|
}
|
|
|
|
.explore-link.selected {
|
|
border-color: #4a7c59;
|
|
box-shadow: 0 0 0 2px rgba(74, 124, 89, 0.3);
|
|
background: rgba(74, 124, 89, 0.05);
|
|
}
|
|
|
|
[data-theme="dark"] .explore-link.selected {
|
|
border-color: #6b9b7a;
|
|
box-shadow: 0 0 0 2px rgba(107, 155, 122, 0.3);
|
|
background: rgba(107, 155, 122, 0.1);
|
|
}
|
|
|
|
.explore-link.featured {
|
|
border-color: #d4af37;
|
|
background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.03));
|
|
}
|
|
|
|
.explore-link.featured:hover {
|
|
border-color: #b8972e;
|
|
background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(212, 175, 55, 0.05));
|
|
}
|
|
|
|
[data-theme="dark"] .explore-link.featured {
|
|
border-color: #d4af37;
|
|
background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(212, 175, 55, 0.05));
|
|
}
|
|
|
|
/* Footer */
|
|
.home-footer {
|
|
margin-top: 2.5rem;
|
|
padding-top: 1rem;
|
|
border-top: 1px solid var(--border-color);
|
|
text-align: center;
|
|
}
|
|
|
|
.home-footer p {
|
|
font-size: 0.85rem;
|
|
color: var(--text-tertiary);
|
|
}
|
|
|
|
.home-footer a {
|
|
color: var(--text-tertiary);
|
|
border-bottom: 1px dotted var(--border-color-darker);
|
|
}
|
|
|
|
/* Mobile */
|
|
@media (max-width: 760px) {
|
|
.title-page {
|
|
padding: 1.5rem 0 1rem;
|
|
margin-left: 0;
|
|
}
|
|
|
|
.title-page h1 {
|
|
font-size: 2rem;
|
|
}
|
|
|
|
.title-page .epigraph {
|
|
font-size: 0.95rem;
|
|
}
|
|
|
|
.verse-lookup {
|
|
max-width: 100%;
|
|
margin-left: auto;
|
|
padding: 1.25rem;
|
|
}
|
|
|
|
.nav-links {
|
|
margin-left: 0;
|
|
}
|
|
|
|
.lookup-form {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.lookup-btn {
|
|
width: 100%;
|
|
}
|
|
|
|
.nav-links a {
|
|
display: inline-block;
|
|
margin: 0.25rem 0.5rem;
|
|
}
|
|
|
|
.feature-grid {
|
|
grid-template-columns: 1fr;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.explore-grid {
|
|
grid-template-columns: repeat(2, 1fr);
|
|
}
|
|
}
|
|
</style>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="title-page">
|
|
<h1>The Holy Bible</h1>
|
|
<p class="subtitle">Authorized King James Version · <em>Anno Domini</em> 1611</p>
|
|
<div class="epigraph">
|
|
<p>{{ daily_verse.text | link_names | safe }}</p>
|
|
<footer>— <a href="/book/{{ daily_verse.book }}/chapter/{{ daily_verse.chapter }}/verse/{{ daily_verse.verse }}" class="daily-verse-link">{{ daily_verse.reference }}</a></footer>
|
|
</div>
|
|
</div>
|
|
|
|
<section class="verse-lookup" id="search-section">
|
|
<h2>Search or Navigate Scripture</h2>
|
|
<form class="lookup-form" onsubmit="return handleSearch(event)">
|
|
<input type="text" class="lookup-input" id="verse-lookup-input"
|
|
placeholder="Search scripture or jump to verse..." autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />
|
|
<button type="submit" class="lookup-btn">Go</button>
|
|
</form>
|
|
<div class="lookup-help">Navigate: John 3:16, Romans 8, Genesis · Search: love, faith, salvation</div>
|
|
</section>
|
|
|
|
<p class="nav-links">
|
|
<strong><a href="/books">Browse All 66 Books</a></strong> ·
|
|
<a href="/random-verse">Random Verse</a> ·
|
|
<a href="/reading-plans">Reading Plans</a> ·
|
|
<a href="/topics">Topics</a> ·
|
|
<a href="/resources">Resources</a>
|
|
</p>
|
|
|
|
<section>
|
|
<p><span class="newthought">Welcome to KJV Study</span>, a digital resource for studying the Authorized Version of the Holy Scriptures.<label for="sn-welcome" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-welcome" class="margin-toggle"/><span class="sidenote">This digital edition presents the 1769 Oxford Standard text, enriched with apparatus drawn from judicious commentators and modern scholarship. Scripture is profitable 'for doctrine, for reproof, for correction, for instruction in righteousness' (2 Timothy 3:16)—yet such profit requires more than cursory reading.</span> This site provides the complete text of the King James Bible enriched with original language analysis, cross-references, historical context, and theological commentary—instruments designed to help both the careful scholar and the earnest student understand God's Word more deeply.</p>
|
|
|
|
<p><span class="newthought">The King James Bible</span> is not merely a translation—it is the wellspring of English itself.<label for="sn-wellspring" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-wellspring" class="margin-toggle"/><span class="sidenote">When Lincoln spoke of 'a house divided,' when King dreamed from the mountaintop, when the weary whisper 'thy will, not mine'—they drew from this well.</span> For four centuries, its cadences have shaped how we speak of love and death, justice and mercy, the weight of truth and the gravity of oath. To study the King James is to study the foundations of the language. To read it is to hear the echo beneath all English prose that reaches for the sacred.</p>
|
|
</section>
|
|
|
|
<section>
|
|
<h2>Study Resources</h2>
|
|
|
|
<div class="feature-grid">
|
|
<a class="feature-card" href="/interlinear">
|
|
<h3>Original Languages</h3>
|
|
<p>Word-by-word Hebrew (תּוֹרָה) and Greek (Ἑλληνική) analysis with Strong's numbers, transliterations, parsing, and lexical definitions.</p>
|
|
</a>
|
|
<a class="feature-card" href="/strongs">
|
|
<h3>Strong's Concordance</h3>
|
|
<p>Search Hebrew and Greek word definitions with Strong's numbers. Browse all 14,000+ original language entries with KJV translations.</p>
|
|
</a>
|
|
<a class="feature-card" href="/topics">
|
|
<h3>Topical Index</h3>
|
|
<p>Scripture organized by subject—Salvation, Grace, Faith, Prayer, Forgiveness, the Holy Spirit, and other essential doctrines.</p>
|
|
</a>
|
|
<a class="feature-card" href="/study-guides">
|
|
<h3>Study Guides</h3>
|
|
<p>Thematic studies exploring salvation, Christian living, prayer, and foundational doctrines with extensive Scripture references.</p>
|
|
</a>
|
|
<a class="feature-card" href="/stories">
|
|
<h3>Bible Stories</h3>
|
|
<p>Scripture narratives from Creation to the early Church, with both adult versions and kid-friendly retellings for family devotions.</p>
|
|
</a>
|
|
<a class="feature-card" href="/reading-plans">
|
|
<h3>Reading Plans</h3>
|
|
<p>Structured schedules for systematic Scripture study: chronological, one-year, New Testament, Gospels, Psalms & Proverbs.</p>
|
|
</a>
|
|
</div>
|
|
</section>
|
|
|
|
<section>
|
|
<h2>The Sacred Scriptures</h2>
|
|
|
|
<p><span class="newthought">The Holy Bible</span> comprises sixty-six books penned by approximately forty authors over fifteen centuries—yet unified by one divine Author.<label for="sn-scriptures" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-scriptures" class="margin-toggle"/><span class="sidenote">The Hebrew Scriptures (תנ״ך, <em>TaNaKh</em>) consist of תּוֹרָה (<em>Torah</em>, Law), נְבִיאִים (<em>Nevi'im</em>, Prophets), and כְּתוּבִים (<em>Ketuvim</em>, Writings). The Greek New Testament (καινὴ διαθήκη) records Christ's incarnation, the establishment of His church, and apostolic teaching.</span> These sacred writings preserve God's progressive self-revelation to humanity: His character, His purposes, and His redemptive plan accomplished through Jesus Christ. The Scriptures consist of two testaments, the Old and the New, which together form a coherent testimony to the gospel.</p>
|
|
|
|
<p><span class="newthought">The Old Testament</span> contains God's covenant with Israel, from creation through the prophetic age. It includes the Law of Moses (<em>Torah</em>), which establishes God's covenant and moral order; the Historical Books, which narrate Israel's history from conquest to exile and restoration; the Wisdom Literature, which explores the deepest questions of human existence; and the Prophets, who called Israel to faithfulness and foretold the coming Messiah.</p>
|
|
|
|
<p><span class="newthought">The New Testament</span> presents the fulfillment of Old Testament promises in Jesus Christ. The four Gospels provide comprehensive testimony to Christ's life, death, and resurrection from different perspectives. Acts chronicles the early church's establishment and growth. The Epistles expound Christian doctrine and provide pastoral instruction. Revelation unveils the consummation of God's redemptive plan.</p>
|
|
|
|
<p><strong><a href="/books">Browse all sixty-six books</a></strong> to read any chapter or verse.</p>
|
|
</section>
|
|
|
|
<section>
|
|
<h2>Theological Studies</h2>
|
|
|
|
<p><span class="newthought">Explore</span> the riches of Scripture through in-depth studies of major biblical themes, persons, and theological concepts:</p>
|
|
|
|
<div class="explore-grid">
|
|
<a href="/trinity" class="explore-link">The Trinity</a>
|
|
<a href="/christology" class="explore-link">Christology</a>
|
|
<a href="/pneumatology" class="explore-link">Pneumatology</a>
|
|
<a href="/soteriology" class="explore-link">Soteriology</a>
|
|
<a href="/ecclesiology" class="explore-link">Ecclesiology</a>
|
|
<a href="/eschatology" class="explore-link">Eschatology</a>
|
|
<a href="/kingdom-of-god" class="explore-link">The Kingdom of God</a>
|
|
<a href="/types-and-shadows" class="explore-link">Types and Shadows</a>
|
|
<a href="/messianic-prophecies" class="explore-link">Messianic Prophecies</a>
|
|
<a href="/blood-in-scripture" class="explore-link">The Blood in Scripture</a>
|
|
<a href="/names-of-christ" class="explore-link">Names of Christ</a>
|
|
<a href="/spirits-and-demons" class="explore-link">Spirits & Demons</a>
|
|
<a href="/personifications" class="explore-link">Personifications</a>
|
|
<a href="/names-of-god" class="explore-link">Names of God</a>
|
|
<a href="/tetragrammaton" class="explore-link">The Tetragrammaton</a>
|
|
<a href="/i-am-statements" class="explore-link">I Am Statements</a>
|
|
<a href="/biblical-covenants" class="explore-link">Biblical Covenants</a>
|
|
<a href="/ten-commandments" class="explore-link">Ten Commandments</a>
|
|
<a href="/beatitudes" class="explore-link">The Beatitudes</a>
|
|
<a href="/parables" class="explore-link">Parables of Jesus</a>
|
|
<a href="/miracles-of-jesus" class="explore-link">Miracles of Jesus</a>
|
|
<a href="/prayers-of-the-bible" class="explore-link">Prayers of the Bible</a>
|
|
<a href="/armor-of-god" class="explore-link">Armor of God</a>
|
|
<a href="/fruits-of-the-spirit" class="explore-link">Fruits of the Spirit</a>
|
|
<a href="/biblical-festivals" class="explore-link">Biblical Festivals</a>
|
|
<a href="/the-twelve-apostles" class="explore-link">The Twelve Apostles</a>
|
|
<a href="/biblical-prophets" class="explore-link">The Prophets</a>
|
|
<a href="/women-of-the-bible" class="explore-link">Women of the Bible</a>
|
|
<a href="/biblical-angels" class="explore-link">Angelology</a>
|
|
<a href="/biblical-timeline" class="explore-link featured">Biblical Timeline</a>
|
|
<a href="/family-tree" class="explore-link featured">Genealogies</a>
|
|
<a href="/stories" class="explore-link">Bible Stories</a>
|
|
</div>
|
|
</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>
|
|
|
|
<section>
|
|
<p><span class="newthought">About the Translation</span> — The Authorized Version, commissioned by King James I in 1604 and completed in 1611,<label for="sn-translation" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-translation" class="margin-toggle"/><span class="sidenote">The translators worked in six companies at Westminster, Oxford, and Cambridge. They consulted previous English translations—particularly Tyndale, whose felicity of phrase permeates the work—while maintaining fidelity to the original tongues.</span> represents the work of forty-seven learned divines and scholars working from the <em>Textus Receptus</em> (Greek) and <em>Masoretic Text</em> (Hebrew). This translation has shaped English-speaking Christianity for more than four centuries, achieving a remarkable union of scholarly precision with nobility of expression. This digital edition presents the 1769 Oxford Standard text.</p>
|
|
</section>
|
|
|
|
<div class="home-footer">
|
|
<p>
|
|
<a href="/about">About KJV Study</a> ·
|
|
<a href="/api/docs">API Documentation</a> ·
|
|
<a href="https://github.com/kennethreitz/kjvstudy.org" target="_blank" rel="noopener">Source Code</a>
|
|
</p>
|
|
</div>
|
|
|
|
<script>
|
|
var bookMap = {
|
|
'genesis': 'Genesis', 'exodus': 'Exodus', 'leviticus': 'Leviticus', 'numbers': 'Numbers',
|
|
'deuteronomy': 'Deuteronomy', 'joshua': 'Joshua', 'judges': 'Judges', 'ruth': 'Ruth',
|
|
'1 samuel': '1 Samuel', '2 samuel': '2 Samuel', '1 kings': '1 Kings', '2 kings': '2 Kings',
|
|
'1 chronicles': '1 Chronicles', '2 chronicles': '2 Chronicles', 'ezra': 'Ezra', 'nehemiah': 'Nehemiah',
|
|
'esther': 'Esther', 'job': 'Job', 'psalms': 'Psalms', 'psalm': 'Psalms', 'proverbs': 'Proverbs',
|
|
'ecclesiastes': 'Ecclesiastes', 'song of solomon': 'Song of Solomon', 'isaiah': 'Isaiah',
|
|
'jeremiah': 'Jeremiah', 'lamentations': 'Lamentations', 'ezekiel': 'Ezekiel', 'daniel': 'Daniel',
|
|
'hosea': 'Hosea', 'joel': 'Joel', 'amos': 'Amos', 'obadiah': 'Obadiah', 'jonah': 'Jonah',
|
|
'micah': 'Micah', 'nahum': 'Nahum', 'habakkuk': 'Habakkuk', 'zephaniah': 'Zephaniah',
|
|
'haggai': 'Haggai', 'zechariah': 'Zechariah', 'malachi': 'Malachi', 'matthew': 'Matthew',
|
|
'mark': 'Mark', 'luke': 'Luke', 'john': 'John', 'acts': 'Acts', 'romans': 'Romans',
|
|
'1 corinthians': '1 Corinthians', '2 corinthians': '2 Corinthians', 'galatians': 'Galatians',
|
|
'ephesians': 'Ephesians', 'philippians': 'Philippians', 'colossians': 'Colossians',
|
|
'1 thessalonians': '1 Thessalonians', '2 thessalonians': '2 Thessalonians',
|
|
'1 timothy': '1 Timothy', '2 timothy': '2 Timothy', 'titus': 'Titus', 'philemon': 'Philemon',
|
|
'hebrews': 'Hebrews', 'james': 'James', '1 peter': '1 Peter', '2 peter': '2 Peter',
|
|
'1 john': '1 John', '2 john': '2 John', '3 john': '3 John', 'jude': 'Jude', 'revelation': 'Revelation',
|
|
'gen': 'Genesis', 'ge': 'Genesis', 'exo': 'Exodus', 'ex': 'Exodus', 'lev': 'Leviticus',
|
|
'le': 'Leviticus', 'num': 'Numbers', 'nu': 'Numbers', 'deut': 'Deuteronomy', 'dt': 'Deuteronomy',
|
|
'josh': 'Joshua', 'jos': 'Joshua', 'judg': 'Judges', 'jdg': 'Judges', 'ru': 'Ruth',
|
|
'1 sam': '1 Samuel', '1sam': '1 Samuel', '1s': '1 Samuel', '2 sam': '2 Samuel', '2sam': '2 Samuel', '2s': '2 Samuel',
|
|
'1 ki': '1 Kings', '1ki': '1 Kings', '1k': '1 Kings', '2 ki': '2 Kings', '2ki': '2 Kings', '2k': '2 Kings',
|
|
'1 chr': '1 Chronicles', '1chr': '1 Chronicles', '1ch': '1 Chronicles', '2 chr': '2 Chronicles', '2chr': '2 Chronicles', '2ch': '2 Chronicles',
|
|
'ezr': 'Ezra', 'neh': 'Nehemiah', 'ne': 'Nehemiah', 'est': 'Esther', 'ps': 'Psalms', 'psa': 'Psalms',
|
|
'prov': 'Proverbs', 'pr': 'Proverbs', 'eccl': 'Ecclesiastes', 'ec': 'Ecclesiastes',
|
|
'song': 'Song of Solomon', 'sos': 'Song of Solomon', 'ss': 'Song of Solomon',
|
|
'isa': 'Isaiah', 'is': 'Isaiah', 'jer': 'Jeremiah', 'je': 'Jeremiah', 'lam': 'Lamentations', 'la': 'Lamentations',
|
|
'ezek': 'Ezekiel', 'eze': 'Ezekiel', 'ezk': 'Ezekiel', 'dan': 'Daniel', 'da': 'Daniel',
|
|
'hos': 'Hosea', 'ho': 'Hosea', 'joe': 'Joel', 'jl': 'Joel', 'am': 'Amos', 'ob': 'Obadiah',
|
|
'jon': 'Jonah', 'mic': 'Micah', 'mi': 'Micah', 'nah': 'Nahum', 'na': 'Nahum',
|
|
'hab': 'Habakkuk', 'hb': 'Habakkuk', 'zep': 'Zephaniah', 'zph': 'Zephaniah',
|
|
'hag': 'Haggai', 'hg': 'Haggai', 'zech': 'Zechariah', 'zec': 'Zechariah', 'zch': 'Zechariah',
|
|
'mal': 'Malachi', 'mat': 'Matthew', 'mt': 'Matthew', 'mar': 'Mark', 'mk': 'Mark', 'mrk': 'Mark',
|
|
'luk': 'Luke', 'lk': 'Luke', 'joh': 'John', 'jn': 'John', 'act': 'Acts', 'ac': 'Acts',
|
|
'rom': 'Romans', 'ro': 'Romans', '1 cor': '1 Corinthians', '1cor': '1 Corinthians', '1co': '1 Corinthians',
|
|
'2 cor': '2 Corinthians', '2cor': '2 Corinthians', '2co': '2 Corinthians',
|
|
'gal': 'Galatians', 'ga': 'Galatians', 'eph': 'Ephesians', 'ep': 'Ephesians',
|
|
'phil': 'Philippians', 'php': 'Philippians', 'ph': 'Philippians',
|
|
'col': 'Colossians', 'co': 'Colossians', '1 thess': '1 Thessalonians', '1thess': '1 Thessalonians', '1th': '1 Thessalonians',
|
|
'2 thess': '2 Thessalonians', '2thess': '2 Thessalonians', '2th': '2 Thessalonians',
|
|
'1 tim': '1 Timothy', '1tim': '1 Timothy', '1ti': '1 Timothy', '2 tim': '2 Timothy', '2tim': '2 Timothy', '2ti': '2 Timothy',
|
|
'tit': 'Titus', 'ti': 'Titus', 'phm': 'Philemon', 'pm': 'Philemon',
|
|
'heb': 'Hebrews', 'he': 'Hebrews', 'jam': 'James', 'jas': 'James', 'jm': 'James',
|
|
'1 pet': '1 Peter', '1pet': '1 Peter', '1pe': '1 Peter', '1p': '1 Peter',
|
|
'2 pet': '2 Peter', '2pet': '2 Peter', '2pe': '2 Peter', '2p': '2 Peter',
|
|
'1 joh': '1 John', '1joh': '1 John', '1jn': '1 John', '2 joh': '2 John', '2joh': '2 John', '2jn': '2 John',
|
|
'3 joh': '3 John', '3joh': '3 John', '3jn': '3 John', 'jud': 'Jude',
|
|
'rev': 'Revelation', 're': 'Revelation'
|
|
};
|
|
|
|
function capitalizeBook(bookName) {
|
|
return bookMap[bookName.toLowerCase()] || bookName;
|
|
}
|
|
|
|
function parseVerseReference(input) {
|
|
var match = input.match(/^(.+)\s+(\d+):(\d+)$/i);
|
|
if (match) {
|
|
var book = capitalizeBook(match[1].trim());
|
|
return '/book/' + encodeURIComponent(book) + '/chapter/' + match[2] + '/verse/' + match[3];
|
|
}
|
|
match = input.match(/^(.+)\s+(\d+)$/i);
|
|
if (match) {
|
|
var book = capitalizeBook(match[1].trim());
|
|
return '/book/' + encodeURIComponent(book) + '/chapter/' + match[2];
|
|
}
|
|
return null;
|
|
}
|
|
|
|
function handleSearch(event) {
|
|
event.preventDefault();
|
|
var input = document.getElementById('verse-lookup-input').value.trim();
|
|
if (!input) return false;
|
|
|
|
var verseUrl = parseVerseReference(input);
|
|
if (verseUrl) {
|
|
window.location.href = verseUrl;
|
|
return false;
|
|
}
|
|
|
|
var hasNumberPrefix = /^[123]\s+/i.test(input);
|
|
var commonBooks = ['genesis', 'exodus', 'leviticus', 'numbers', 'deuteronomy',
|
|
'joshua', 'judges', 'ruth', 'samuel', 'kings', 'chronicles', 'ezra', 'nehemiah',
|
|
'esther', 'job', 'psalms', 'proverbs', 'ecclesiastes', 'isaiah', 'jeremiah',
|
|
'lamentations', 'ezekiel', 'daniel', 'hosea', 'joel', 'amos', 'obadiah', 'jonah',
|
|
'micah', 'nahum', 'habakkuk', 'zephaniah', 'haggai', 'zechariah', 'malachi',
|
|
'matthew', 'mark', 'luke', 'john', 'acts', 'romans', 'corinthians', 'galatians',
|
|
'ephesians', 'philippians', 'colossians', 'thessalonians', 'timothy', 'titus',
|
|
'philemon', 'hebrews', 'james', 'peter', 'jude', 'revelation'];
|
|
|
|
if (hasNumberPrefix || commonBooks.includes(input.toLowerCase())) {
|
|
window.location.href = '/book/' + encodeURIComponent(capitalizeBook(input));
|
|
return false;
|
|
}
|
|
|
|
window.location.href = '/search?q=' + encodeURIComponent(input);
|
|
return false;
|
|
}
|
|
|
|
// Combined keyboard navigation for intro + feature cards + explore links + daily verse (skip title, lookup, nav links)
|
|
var dailyVerseLink = Array.from(document.querySelectorAll('.daily-verse-link'));
|
|
var featureCards = Array.from(document.querySelectorAll('.feature-card'));
|
|
var exploreLinks = Array.from(document.querySelectorAll('.explore-link'));
|
|
var introParagraphs = Array.from(document.querySelectorAll('.intro-text'));
|
|
var allCards = (introParagraphs.length ? introParagraphs : [])
|
|
.concat(featureCards)
|
|
.concat(exploreLinks)
|
|
.concat(dailyVerseLink);
|
|
var selectedCardIndex = -1;
|
|
|
|
function getGridColumns() {
|
|
// Detect number of columns based on viewport and which section we're in
|
|
var introEnd = introParagraphs.length;
|
|
var featureEnd = introEnd + featureCards.length;
|
|
var exploreEnd = featureEnd + exploreLinks.length;
|
|
|
|
// Intro and daily verse: single column
|
|
if (selectedCardIndex < introEnd) return 1;
|
|
if (selectedCardIndex >= exploreEnd) return 1;
|
|
|
|
if (window.innerWidth <= 760) {
|
|
// Mobile: feature cards = 1 col, explore = 2 cols
|
|
return selectedCardIndex < featureEnd ? 1 : 2;
|
|
}
|
|
// Desktop: feature cards = 3 cols, explore = 4 cols
|
|
return selectedCardIndex < featureEnd ? 3 : 4;
|
|
}
|
|
|
|
function selectCard(index) {
|
|
// Remove previous selection
|
|
if (selectedCardIndex >= 0 && selectedCardIndex < allCards.length) {
|
|
allCards[selectedCardIndex].classList.remove('selected');
|
|
}
|
|
|
|
// Update index with bounds checking
|
|
selectedCardIndex = Math.max(0, Math.min(index, allCards.length - 1));
|
|
|
|
// Add selection to new card
|
|
allCards[selectedCardIndex].classList.add('selected');
|
|
|
|
// Scroll into view
|
|
allCards[selectedCardIndex].scrollIntoView({
|
|
behavior: 'auto',
|
|
block: 'center'
|
|
});
|
|
}
|
|
|
|
document.addEventListener('keydown', function(e) {
|
|
if (e.defaultPrevented) return;
|
|
var el = document.activeElement;
|
|
var isTyping = el.tagName === 'INPUT' || el.tagName === 'TEXTAREA';
|
|
|
|
if (e.key === '/' && !e.metaKey && !e.ctrlKey && !e.altKey) {
|
|
if (!isTyping) {
|
|
e.preventDefault();
|
|
document.getElementById('verse-lookup-input').focus();
|
|
}
|
|
}
|
|
|
|
// Arrow keys for cards (2D grid navigation)
|
|
if (!isTyping) {
|
|
var cols = getGridColumns();
|
|
|
|
if (e.key === 'ArrowRight' || e.key === 'l') {
|
|
e.preventDefault();
|
|
selectCard(selectedCardIndex + 1);
|
|
} else if (e.key === 'ArrowLeft' || e.key === 'h') {
|
|
e.preventDefault();
|
|
selectCard(selectedCardIndex - 1);
|
|
} else if (e.key === 'ArrowDown' || e.key === 'j') {
|
|
e.preventDefault();
|
|
selectCard(selectedCardIndex < 0 ? 0 : selectedCardIndex + cols);
|
|
} else if (e.key === 'ArrowUp' || e.key === 'k') {
|
|
e.preventDefault();
|
|
selectCard(selectedCardIndex - cols);
|
|
}
|
|
}
|
|
|
|
// Enter key: navigate to selected card or books page
|
|
if (e.key === 'Enter' && !isTyping && el.tagName !== 'A' && el.tagName !== 'BUTTON') {
|
|
e.preventDefault();
|
|
if (selectedCardIndex >= 0) {
|
|
var selectedEl = allCards[selectedCardIndex];
|
|
// If search section is selected, focus the input
|
|
if (selectedEl.id === 'search-section') {
|
|
document.getElementById('verse-lookup-input').focus();
|
|
} else if (selectedEl.href) {
|
|
window.location.href = selectedEl.href;
|
|
} else if (selectedEl.classList.contains('intro-text') || selectedEl.classList.contains('subtitle')) {
|
|
// no navigation; allow speech/selection only
|
|
}
|
|
} else {
|
|
window.location.href = '/books';
|
|
}
|
|
}
|
|
});
|
|
</script>
|
|
{% endblock %}
|