Files
kennethreitzandClaude Fable 5 fb0eb239e7 Bring interlinear and Strong's entry pages onto the design system
- chapter_interlinear.html: chapter-head treatment matching the reading
  page, word units as elevated lexicon cards with green glosses and
  bronze Strong's numbers, gold-ruled detail popup with small-caps
  labels, chip-style chapter navigation; removed ~110 lines of
  hardcoded dark-mode overrides now covered by shared tokens
- strongs_entry.html: framed lexicon plate hero with gilt language
  chip, gold-tick info cards, gold-spined related entries, tokenized
  occurrence cards with gilt word highlights, small-caps occurrences
  header with count pill, accent-fill primary nav button; removed all
  hardcoded dark-mode blocks

All 976 tests pass.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 23:11:43 -04:00

776 lines
20 KiB
HTML

{% extends "base.html" %}
{% block title %}Strong's {{ entry.strongs }} - {{ entry.word }} ({{ entry.transliteration }}) - {{ entry.language }} Definition{% endblock %}
{% block description %}Strong's {{ entry.strongs }}: {{ entry.word }} ({{ entry.transliteration }}) means "{{ entry.definition[:120] }}". {{ entry.language }} word study with KJV Bible occurrences.{% endblock %}
{% block head %}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "DefinedTerm",
"name": "{{ entry.word }}",
"termCode": "{{ entry.strongs }}",
"description": "{{ entry.definition | e }}",
"inDefinedTermSet": {
"@type": "DefinedTermSet",
"name": "Strong's Concordance",
"description": "{{ entry.language }} Lexicon"
}
}
</script>
<style>
.strongs-page {
max-width: 800px;
}
/* Main word card — a framed lexicon plate */
.word-card {
position: relative;
background: var(--bg-elevated);
border: 1px solid var(--border-color-darker);
padding: 2.75rem 2.5rem 2.5rem;
margin-bottom: 2rem;
text-align: center;
box-shadow: var(--shadow-soft);
}
.word-card::before {
content: '';
position: absolute;
inset: 7px;
border: 1px solid var(--border-color-dark);
pointer-events: none;
}
.word-card > * {
position: relative;
}
.word-card .strongs-number {
font-size: 0.95rem;
color: var(--bronze);
margin-bottom: 1.25rem;
display: flex;
align-items: center;
justify-content: center;
gap: 0.75rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.28em;
text-indent: 0.28em;
}
.lang-badge {
display: inline-block;
font-size: 0.62rem;
padding: 0.22rem 0.7rem;
border-radius: 999px;
text-transform: uppercase;
letter-spacing: 0.14em;
font-weight: 600;
color: var(--bronze);
background: var(--gold-soft);
border: 1px solid var(--border-color-dark);
}
.word-card .original-word {
font-size: 5rem;
line-height: 1.2;
margin: 0 0 0.75rem 0;
color: var(--text-color);
font-weight: normal;
}
.word-card .original-word.hebrew {
direction: rtl;
font-family: "SBL Hebrew", "Ezra SIL", "Times New Roman", "Noto Serif Hebrew", serif;
}
.word-card .original-word.greek {
font-family: "SBL Greek", "Gentium Plus", "Times New Roman", "Noto Serif", serif;
}
.word-card .transliteration {
font-size: 1.4rem;
color: var(--text-secondary);
font-style: italic;
margin-bottom: 0.25rem;
}
.word-card .pronunciation {
font-size: 1rem;
color: var(--text-secondary);
}
.word-card .quick-def {
margin-top: 1.5rem;
padding-top: 1.5rem;
border-top: 1px solid var(--border-color);
font-size: 1.2rem;
font-style: italic;
color: var(--text-strong);
line-height: 1.75;
max-width: 550px;
margin-left: auto;
margin-right: auto;
}
/* Info cards grid */
.info-cards {
display: grid;
grid-template-columns: 1fr;
gap: 1rem;
margin-bottom: 2rem;
}
.info-card {
background: var(--bg-elevated);
border: 1px solid var(--border-color-dark);
border-radius: 8px;
padding: 1.5rem;
transition: all 0.15s;
}
.info-card.selected {
border-color: var(--accent);
box-shadow: 0 0 0 2px var(--accent-soft);
background: var(--accent-softer);
}
.info-card h2 {
font-size: 0.72rem;
color: var(--bronze) !important;
text-transform: uppercase;
letter-spacing: 0.16em;
margin: 0 0 0.75rem 0;
font-weight: 600;
font-style: normal;
display: flex;
align-items: center;
gap: 0.5rem;
}
.info-card h2::before {
content: '';
display: inline-block;
width: 3px;
height: 1em;
border-radius: 2px;
background: var(--gold);
}
.info-card p {
margin: 0;
line-height: 1.7;
}
.info-card.definition p {
font-size: 1.15rem;
line-height: 1.7;
}
.info-card.kjv p {
font-size: 1.15rem;
color: var(--text-color);
line-height: 1.7;
}
/* KJV Translation Tags */
.kjv-tags {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
margin-top: 0.25rem;
}
.kjv-tag {
display: inline-block;
padding: 0.35rem 0.7rem;
background: var(--bg-color);
border: 1px solid var(--border-color-dark);
border-radius: 6px;
font-size: 0.9rem;
color: var(--text-color);
transition: all 0.15s;
}
.kjv-tag:hover {
border-color: var(--accent);
background: var(--accent-softer);
}
.kjv-tag.compare {
background: transparent;
border-style: dashed;
color: var(--text-secondary);
font-size: 0.85rem;
}
.kjv-tag.compare a {
color: var(--link-color);
text-decoration: none;
}
.kjv-tag.compare a:hover {
text-decoration: underline;
}
.info-card.derivation p {
font-size: 1.15rem;
color: var(--text-color);
line-height: 1.7;
}
/* Related entries embedded in derivation */
.related-entries {
margin-top: 1rem;
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.related-entry-card {
padding: 0.75rem 1rem;
background: var(--bg-color);
border: 1px solid var(--border-color-dark);
border-radius: 0 6px 6px 0;
border-left: 3px solid var(--gold);
transition: all 0.15s;
}
.related-entry-card:hover {
border-top-color: var(--accent);
border-right-color: var(--accent);
border-bottom-color: var(--accent);
box-shadow: var(--shadow-soft);
}
.related-entry-card.selected {
border-top-color: var(--accent);
border-right-color: var(--accent);
border-bottom-color: var(--accent);
box-shadow: 0 0 0 2px var(--accent-soft);
background: var(--accent-softer);
}
.related-entry-header {
display: flex;
align-items: baseline;
gap: 0.75rem;
margin-bottom: 0.35rem;
}
.related-entry-header a {
font-weight: 600;
font-size: 0.95rem;
letter-spacing: 0.05em;
color: var(--bronze);
text-decoration: none;
border-bottom: none;
}
.related-entry-header a:hover {
color: var(--accent-strong);
text-decoration: underline;
}
.related-entry-lemma {
font-size: 1.1rem;
}
.related-entry-translit {
font-size: 0.9rem;
color: var(--text-secondary);
font-style: italic;
}
.related-entry-def {
font-size: 0.9rem;
color: var(--text-secondary);
margin: 0;
line-height: 1.5;
}
.strongs-ref {
color: var(--link-color);
text-decoration: none;
font-weight: 500;
}
.strongs-ref:hover {
text-decoration: underline;
}
/* Navigation */
.nav-row {
display: flex;
justify-content: space-between;
align-items: center;
gap: 1rem;
flex-wrap: wrap;
}
.nav-btn {
padding: 0.6rem 1.2rem;
background: var(--bg-elevated);
border: 1px solid var(--border-color-dark);
border-radius: 6px;
text-decoration: none;
color: var(--text-secondary);
font-size: 0.9rem;
transition: all 0.2s;
}
.nav-btn:hover {
border-color: var(--accent);
color: var(--accent-strong);
background: var(--accent-softer);
}
.nav-btn.primary,
.nav-btn.primary:link,
.nav-btn.primary:visited {
background: var(--accent-fill);
border-color: var(--accent-fill);
color: var(--on-accent) !important;
}
.nav-btn.primary:hover {
background: var(--accent-fill-hover);
border-color: var(--accent-fill-hover);
color: var(--on-accent) !important;
}
.prev-next {
display: flex;
gap: 0.5rem;
}
/* Occurrences section */
.occurrences-section {
margin-bottom: 2rem;
}
.occurrences-header {
position: relative;
display: flex;
justify-content: space-between;
align-items: baseline;
flex-wrap: wrap;
gap: 0.5rem;
margin-bottom: 1.25rem;
padding-bottom: 0.6rem;
border-bottom: 1px solid var(--border-color);
}
.occurrences-header::after {
content: '';
position: absolute;
left: 0;
bottom: -1px;
width: 2.75rem;
height: 1px;
background: var(--gold);
}
.occurrences-section > h2,
.occurrences-header h2 {
font-size: 0.95rem;
font-weight: 600;
font-style: normal;
text-transform: uppercase;
letter-spacing: 0.18em;
margin: 0;
color: var(--text-secondary) !important;
}
.occurrences-count {
font-size: 0.72rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.1em;
color: var(--bronze);
margin: 0;
background: var(--gold-soft);
border: 1px solid var(--border-color-dark);
padding: 0.25rem 0.7rem;
border-radius: 999px;
}
.occurrences-grid {
display: grid;
gap: 0.75rem;
}
.occurrence-card {
background: var(--bg-elevated);
border: 1px solid var(--border-color-dark);
border-radius: 8px;
padding: 1rem 1.25rem;
transition: all 0.15s;
}
.occurrence-card:hover {
border-color: var(--accent);
box-shadow: var(--shadow-soft);
}
.occurrence-card.selected {
border-color: var(--accent);
box-shadow: 0 0 0 2px var(--accent-soft);
background: var(--accent-softer);
}
.occurrence-card.hidden {
display: none;
}
.occurrence-card .occ-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 0.5rem;
}
.occurrence-card .occ-reference {
color: var(--accent-strong);
text-decoration: none;
border-bottom: none;
font-weight: 600;
font-size: 0.95rem;
}
.occurrence-card .occ-reference:hover {
text-decoration: underline;
}
.occurrence-card .occ-original {
font-size: 1.1rem;
color: var(--text-secondary);
font-family: "SBL Hebrew", "Ezra SIL", "Times New Roman", serif;
}
.occurrence-card .occ-verse-text {
font-size: 0.95rem;
line-height: 1.65;
color: var(--text-color);
margin: 0;
}
.occurrence-card .occ-verse-text mark {
background: linear-gradient(180deg, transparent 60%, rgba(190, 155, 70, 0.35) 60%);
color: inherit;
padding: 0;
border-radius: 0;
font-weight: 600;
}
/* Show more button */
.show-more-container {
text-align: center;
margin-top: 1rem;
}
.show-more-btn {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.75rem 1.5rem;
background: var(--bg-elevated);
border: 1px solid var(--border-color-dark);
border-radius: 8px;
font-size: 0.9rem;
font-family: inherit;
color: var(--text-secondary);
cursor: pointer;
transition: all 0.15s;
-webkit-appearance: none;
appearance: none;
}
.show-more-btn:hover {
border-color: var(--accent);
color: var(--accent-strong);
background: var(--accent-softer);
}
.show-more-btn .count {
color: var(--text-secondary);
font-size: 0.85rem;
}
/* Dark mode is handled entirely by the shared design tokens in base.html. */
@media (max-width: 600px) {
.word-card {
padding: 2rem 1.25rem;
}
.word-card .original-word {
font-size: 3.5rem;
}
.word-card .transliteration {
font-size: 1.2rem;
}
.word-card .quick-def {
font-size: 1rem;
}
.nav-row {
flex-direction: column;
align-items: stretch;
}
.prev-next {
justify-content: center;
}
.kjv-tags {
gap: 0.4rem;
}
.kjv-tag {
font-size: 0.8rem;
padding: 0.3rem 0.5rem;
}
}
/* Large font mode */
[data-font-size="large"] .occurrence-card .occ-reference {
font-size: 1.2rem;
}
[data-font-size="large"] .occurrence-card .occ-original {
font-size: 1.4rem;
}
[data-font-size="large"] .occurrence-card .occ-verse-text {
font-size: 1.2rem;
line-height: 1.75;
}
[data-font-size="large"] .word-card .quick-def {
font-size: 1.4rem;
}
[data-font-size="large"] .info-card p {
font-size: 1.3rem;
}
[data-font-size="large"] .info-card.definition p,
[data-font-size="large"] .info-card.kjv p,
[data-font-size="large"] .info-card.derivation p {
font-size: 1.3rem;
}
[data-font-size="large"] .kjv-tag {
font-size: 1.1rem;
padding: 0.4rem 0.8rem;
}
[data-font-size="large"] .related-entry-def {
font-size: 1.1rem;
}
[data-font-size="large"] .related-entry-header a {
font-size: 1.15rem;
}
[data-font-size="large"] .related-entry-lemma {
font-size: 1.3rem;
}
</style>
{% endblock %}
{% block content %}
<article class="strongs-page">
<section class="word-card">
<div class="strongs-number">
{{ entry.strongs }}
<span class="lang-badge {% if entry.language == 'Hebrew' %}hebrew{% else %}greek{% endif %}">{{ entry.language }}</span>
</div>
<h1 class="original-word {% if entry.language == 'Hebrew' %}hebrew{% else %}greek{% endif %}" lang="{% if entry.language == 'Hebrew' %}he{% else %}el{% endif %}">{{ entry.word }}</h1>
<div class="transliteration">{{ entry.transliteration }}{% if entry.pronunciation %} ({{ entry.pronunciation }}){% endif %}</div>
<div class="quick-def">{{ entry.definition }}</div>
</section>
<section class="info-cards">
{% if entry.kjv_usage %}
<div class="info-card kjv">
<h2>KJV Translations of {{ entry.strongs }}</h2>
<p>{{ entry.kjv_usage | linkify_strongs | safe }}</p>
</div>
{% endif %}
{% if entry.derivation %}
<div class="info-card derivation">
<h2>Word Origin &amp; Derivation</h2>
<p>{{ entry.derivation | linkify_strongs | safe }}</p>
{% if related_entries %}
<div class="related-entries">
{% for rel in related_entries %}
<div class="related-entry-card">
<div class="related-entry-header">
<a href="/strongs/{{ rel.strongs }}">{{ rel.strongs }}</a>
<span class="related-entry-lemma">{{ rel.word }}</span>
{% if rel.transliteration %}<span class="related-entry-translit">({{ rel.transliteration }})</span>{% endif %}
</div>
<p class="related-entry-def">{{ rel.definition[:150] }}{% if rel.definition|length > 150 %}...{% endif %}</p>
</div>
{% endfor %}
</div>
{% endif %}
</div>
{% endif %}
</section>
{% if verse_occurrences %}
<section class="occurrences-section">
<div class="occurrences-header">
<h2>{{ entry.strongs }} in the King James Bible</h2>
<span class="occurrences-count">{{ total_occurrences }} verse{% if total_occurrences != 1 %}s{% endif %}</span>
</div>
<div class="occurrences-grid" id="occurrences-grid">
{% for occ in verse_occurrences %}
<div class="occurrence-card{% if loop.index > 10 %} hidden{% endif %}" data-index="{{ loop.index }}">
<div class="occ-header">
<a href="{{ occ.url }}" class="occ-reference">{{ occ.reference }}</a>
<span class="occ-original">{{ occ.original }}</span>
</div>
<p class="occ-verse-text">{{ occ.verse_text | safe }}</p>
</div>
{% endfor %}
</div>
{% if total_occurrences > 10 %}
<div class="show-more-container" id="show-more-container">
<button class="show-more-btn" id="show-more-btn" onclick="showMoreOccurrences()">
Show more <span class="count">(<span id="remaining-count">{{ total_occurrences - 10 }}</span> remaining)</span>
</button>
</div>
{% endif %}
</section>
{% endif %}
<nav class="nav-row" aria-label="Strong's number navigation">
<a href="/strongs" class="nav-btn primary">← Search Strong's</a>
<div class="prev-next">
{% set num = entry.strongs[1:] | int %}
{% set prefix = entry.strongs[0] %}
{% if num > 1 %}
<a href="/strongs/{{ prefix }}{{ num - 1 }}" class="nav-btn" rel="prev" title="Previous: Strong's {{ prefix }}{{ num - 1 }}">← {{ prefix }}{{ num - 1 }}</a>
{% endif %}
<a href="/strongs/{{ prefix }}{{ num + 1 }}" class="nav-btn" rel="next" title="Next: Strong's {{ prefix }}{{ num + 1 }}">{{ prefix }}{{ num + 1 }} →</a>
</div>
</nav>
</article>
<script>
// Show more occurrences
let visibleCount = 10;
const batchSize = 20;
function showMoreOccurrences() {
const cards = document.querySelectorAll('.occurrence-card.hidden');
const total = document.querySelectorAll('.occurrence-card').length;
// Show next batch
let shown = 0;
cards.forEach(card => {
if (shown < batchSize) {
card.classList.remove('hidden');
shown++;
}
});
visibleCount += shown;
// Update remaining count
const remaining = total - visibleCount;
const remainingEl = document.getElementById('remaining-count');
if (remainingEl) {
remainingEl.textContent = remaining;
}
// Hide button if all shown
if (remaining <= 0) {
const container = document.getElementById('show-more-container');
if (container) container.style.display = 'none';
}
}
(function() {
// Include info cards, related entries, and occurrence cards in keyboard nav
function getAllNavigableCards() {
const infoCards = document.querySelectorAll('.info-card');
const related = document.querySelectorAll('.related-entry-card');
const occurrences = document.querySelectorAll('.occurrence-card:not(.hidden)');
return [...infoCards, ...related, ...occurrences];
}
let selectedIndex = -1;
function selectCard(index) {
const cards = getAllNavigableCards();
if (cards.length === 0) return;
// Remove previous selection
const prevCard = document.querySelector('.info-card.selected, .related-entry-card.selected, .occurrence-card.selected');
if (prevCard) prevCard.classList.remove('selected');
// Update index with bounds checking
selectedIndex = Math.max(0, Math.min(index, cards.length - 1));
// Add selection to new card
cards[selectedIndex].classList.add('selected');
// Scroll into view
cards[selectedIndex].scrollIntoView({
behavior: 'auto',
block: 'center'
});
}
document.addEventListener('keydown', function(e) {
// Don't handle if user is typing in an input
if (e.target.tagName === 'INPUT' || e.target.tagName === 'TEXTAREA') return;
if (typeof KJVNav !== 'undefined' && KJVNav.sidebarActive) return;
const cards = getAllNavigableCards();
if (cards.length === 0) return;
if (e.key === 'ArrowDown' || e.key === 'j') {
e.preventDefault();
selectCard(selectedIndex + 1);
} else if (e.key === 'ArrowUp' || e.key === 'k') {
e.preventDefault();
selectCard(selectedIndex - 1);
} else if (e.key === 'Enter' && selectedIndex >= 0 && selectedIndex < cards.length) {
e.preventDefault();
// Check for link in any card type
const link = cards[selectedIndex].querySelector('.occ-reference, .related-entry-header a, .strongs-ref');
if (link) window.location.href = link.href;
} else if (e.key === 'ArrowLeft' || e.key === 'h') {
// Navigate back in browser history
e.preventDefault();
history.back();
} else if (e.key === '[') {
// Navigate to previous Strong's number
e.preventDefault();
const prevLink = document.querySelector('.nav-btn[rel="prev"]');
if (prevLink) window.location.href = prevLink.href;
} else if (e.key === 'ArrowRight' || e.key === 'l' || e.key === ']') {
// Navigate to next Strong's number
e.preventDefault();
const nextLink = document.querySelector('.nav-btn[rel="next"]');
if (nextLink) window.location.href = nextLink.href;
}
});
// Click to select - attach to all card types
document.querySelectorAll('.info-card, .related-entry-card, .occurrence-card').forEach((card) => {
card.addEventListener('click', function(e) {
if (e.target.tagName !== 'A') {
const allCards = getAllNavigableCards();
const cardIndex = allCards.indexOf(card);
if (cardIndex >= 0) selectCard(cardIndex);
}
});
});
})();
</script>
{% endblock %}