Files
kjvstudy.org/kjvstudy_org/templates/book_pdf.html
T
kennethreitz 6a9cebae22 Improve keyboard navigation, PDFs, and add non-writing prophets
- Add KJVNav.initSimpleNav() for DRY keyboard navigation across site
- Fix broken keyboard nav on 10+ resource pages (orphaned JS code)
- Left arrow on chapters now does browser back
- Add non-writing prophets: Moses, Samuel, Nathan, Elijah, Elisha
- Redesign chapter PDFs with glossary, cross-refs, book intro
- Style sidenotes as inline notes in all PDFs (fix checkbox squares)
- More liberal word studies in PDF output (for_pdf parameter)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 00:28:25 -05:00

283 lines
7.3 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>{{ book }} (KJV)</title>
<style>
@page {
size: letter;
margin: 0.75in;
@bottom-center {
content: counter(page);
font-family: "et-book", Georgia, serif;
font-size: 10pt;
color: #666;
}
}
body {
font-family: "et-book", Georgia, "Times New Roman", serif;
font-size: 11pt;
line-height: 1.55;
color: #111;
}
h1 {
font-weight: normal;
letter-spacing: 0.05em;
font-size: 26pt;
margin: 0 0 0.15in 0;
}
.subtitle {
font-style: italic;
color: #666;
margin-bottom: 0.25in;
}
.book-meta {
font-size: 10pt;
color: #666;
margin-bottom: 0.35in;
border-bottom: 1px solid #ddd;
padding-bottom: 0.15in;
}
.chapter-block {
page-break-inside: avoid;
margin-bottom: 0.35in;
padding-bottom: 0.2in;
border-bottom: 1px solid #eee;
}
.chapter-block:last-of-type {
border-bottom: none;
}
.chapter-title {
font-size: 16pt;
margin: 0 0 0.15in 0;
}
.verse {
display: flex;
gap: 0.15in;
margin-bottom: 0.06in;
}
.verse-number {
font-variant-numeric: lining-nums;
font-size: 10pt;
color: #777;
min-width: 0.35in;
text-align: right;
}
.verse-text {
flex: 1;
text-align: justify;
}
.footer {
margin-top: 0.4in;
font-size: 9pt;
color: #888;
text-align: center;
}
/* Introduction sections */
.intro-section {
margin-bottom: 0.3in;
page-break-inside: avoid;
}
.intro-section h2 {
font-size: 14pt;
margin: 0.2in 0 0.1in 0;
font-weight: normal;
}
.intro-section p {
margin: 0 0 0.12in 0;
text-align: justify;
}
.intro-section ul {
margin: 0.1in 0;
padding-left: 0.25in;
}
.intro-section li {
margin-bottom: 0.08in;
}
.intro-section blockquote {
margin: 0.15in 0.2in;
padding-left: 0.15in;
border-left: 2px solid #ddd;
}
.intro-section blockquote p {
font-style: italic;
margin-bottom: 0.05in;
}
.intro-section blockquote footer {
font-size: 9pt;
color: #666;
}
.chapters-divider {
margin: 0.4in 0;
border-bottom: 2px solid #333;
page-break-before: always;
}
/* Style sidenotes as inline notes for PDF */
.margin-toggle,
.sidenote-number,
input[type="checkbox"] {
display: none !important;
}
.sidenote,
.marginnote {
display: block;
float: none;
width: 100%;
margin: 0.15in 0;
padding: 0.1in 0.15in;
font-size: 9pt;
font-style: italic;
color: #555;
background: #f9f9f9;
border-left: 2px solid #ccc;
}
.sidenote::before {
content: "Note: ";
font-weight: 600;
font-style: normal;
}
</style>
</head>
<body>
<h1>{{ book }}</h1>
<p class="subtitle">Authorized King James Version (KJV)</p>
<p class="book-meta">
{% if book_intro and book_intro.author %}Author: {{ book_intro.author }}{% endif %}
{% if book_intro and book_intro.date_written %} &middot; Written: {{ book_intro.date_written }}{% endif %}
{% if book_intro and book_intro.category %} &middot; Category: {{ book_intro.category }}{% endif %}
</p>
{% if book_intro %}
<!-- Introduction Sections -->
{% if book_intro.introduction %}
<section class="intro-section">
<h2>Introduction</h2>
{{ book_intro.introduction|md|safe }}
</section>
{% endif %}
{% if book_intro.outline %}
<section class="intro-section">
<h2>Book Outline</h2>
<ul>
{% for item in book_intro.outline %}
<li><strong>{{ item.section }}</strong> ({{ item.chapters }}) — {{ item.description|mdi|safe }}</li>
{% endfor %}
</ul>
</section>
{% endif %}
{% if book_intro.key_themes %}
<section class="intro-section">
<h2>Key Themes</h2>
<ul>
{% for theme in book_intro.key_themes %}
{% if theme is mapping %}
<li><strong>{{ theme.theme }}</strong>: {{ theme.description|mdi|safe }}</li>
{% else %}
<li>{{ theme }}</li>
{% endif %}
{% endfor %}
</ul>
</section>
{% endif %}
{% if book_intro.key_verses %}
<section class="intro-section">
<h2>Key Verses</h2>
{% for verse in book_intro.key_verses %}
<blockquote>
<p>{{ verse.text|mdi|safe }}</p>
<footer>— {{ verse.reference }}{% if verse.significance %} ({{ verse.significance|mdi|safe }}){% endif %}</footer>
</blockquote>
{% endfor %}
</section>
{% endif %}
{% if book_intro.historical_context %}
<section class="intro-section">
<h2>Historical Context</h2>
{{ book_intro.historical_context|md|safe }}
</section>
{% endif %}
{% if book_intro.literary_style %}
<section class="intro-section">
<h2>Literary Style</h2>
{{ book_intro.literary_style|md|safe }}
</section>
{% endif %}
{% if book_intro.theological_significance %}
<section class="intro-section">
<h2>Theological Significance</h2>
{{ book_intro.theological_significance|md|safe }}
</section>
{% endif %}
{% if book_intro.christ_in_book %}
<section class="intro-section">
<h2>Christ in {{ book }}</h2>
{{ book_intro.christ_in_book|md|safe }}
</section>
{% endif %}
{% if book_intro.relationship_to_new_testament %}
<section class="intro-section">
<h2>Relationship to the New Testament</h2>
{{ book_intro.relationship_to_new_testament|md|safe }}
</section>
{% endif %}
{% if book_intro.practical_application %}
<section class="intro-section">
<h2>Practical Application</h2>
{{ book_intro.practical_application|md|safe }}
</section>
{% endif %}
<!-- Divider before chapters -->
<div class="chapters-divider"></div>
{% endif %}
{% for chapter in chapters %}
<section class="chapter-block">
<h2 class="chapter-title">Chapter {{ chapter.chapter }}</h2>
{% for verse in chapter.verses %}
<div class="verse">
<span class="verse-number">{{ verse.verse }}</span>
<span class="verse-text">{{ verse.text }}</span>
</div>
{% endfor %}
</section>
{% endfor %}
<div class="footer">
From KJV Study &bull; kjvstudy.org
</div>
</body>
</html>