mirror of
https://github.com/kennethreitz/kjvstudy.org.git
synced 2026-06-05 23:00:16 +00:00
c5e71d652e
- Add description blocks to verse, chapter, book, and study guide templates - Include "KJV" in descriptions for better SEO (commonly searched term) - Verse pages now show verse text in description (155 chars) - Chapter pages show book/chapter info with first verse excerpt - Book pages include book introduction excerpt when available - Homepage and other index pages have descriptive meta tags - All templates now have proper SEO-friendly meta descriptions Verified all other resource templates already had descriptions. All tests passing (268 passed, 1 skipped). 🤖 Generated with Claude Code https://claude.com/claude-code Co-Authored-By: Claude <noreply@anthropic.com>
504 lines
22 KiB
HTML
504 lines
22 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);
|
|
}
|
|
|
|
.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;
|
|
}
|
|
|
|
/* 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 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);
|
|
}
|
|
|
|
/* 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 }}">{{ daily_verse.reference }}</a></footer>
|
|
</div>
|
|
</div>
|
|
|
|
<section class="verse-lookup">
|
|
<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="/concordance">
|
|
<h3>Concordance</h3>
|
|
<p>Find every occurrence of any word throughout the entire biblical corpus. Trace terminology across both testaments.</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">Biblical Timeline</a>
|
|
<a href="/family-tree" class="explore-link">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="/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;
|
|
}
|
|
|
|
document.addEventListener('keydown', function(e) {
|
|
if (e.key === '/' && !e.metaKey && !e.ctrlKey && !e.altKey) {
|
|
var el = document.activeElement;
|
|
if (el.tagName !== 'INPUT' && el.tagName !== 'TEXTAREA') {
|
|
e.preventDefault();
|
|
document.getElementById('verse-lookup-input').focus();
|
|
}
|
|
}
|
|
});
|
|
</script>
|
|
{% endblock %}
|