Files
kjvstudy.org/kjvstudy_org/templates/strongs_entry.html
T
kennethreitz 3336863a4d Improve keyboard navigation consistency across site
- Add KJVNav.initGridNav for standardized 2D grid navigation
- Migrate books.html, topics.html, resources.html to use initGridNav
- Add sidebarActive check to all templates with custom keyboard handlers
- Add [ and ] shortcuts for prev/next chapter on chapter pages
- Add [ and ] shortcuts for prev/next book on book pages
- Update accessibility page with comprehensive keyboard shortcut docs
- Add honest note about keyboard navigation complexity
- Fix sidebar nav conflicting with main content selection

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 01:26:09 -05:00

533 lines
12 KiB
HTML

{% extends "base.html" %}
{% block title %}{{ entry.strongs }} - {{ entry.word }} - Strong's Concordance{% endblock %}
{% block description %}{{ entry.strongs }}: {{ entry.word }} ({{ entry.transliteration }}) - {{ entry.definition[:150] }}{% endblock %}
{% block head %}
<style>
.strongs-page {
max-width: 800px;
}
/* Main word card */
.word-card {
background: var(--bg-color);
border: 1px solid var(--border-color);
border-radius: 12px;
padding: 2.5rem;
margin-bottom: 2rem;
text-align: center;
box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.word-card .strongs-number {
font-family: monospace;
font-size: 0.9rem;
color: var(--text-secondary);
margin-bottom: 1rem;
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
}
.lang-badge {
display: inline-block;
font-size: 0.65rem;
padding: 0.2rem 0.5rem;
border-radius: 3px;
text-transform: uppercase;
letter-spacing: 0.03em;
font-weight: 600;
}
.lang-badge.hebrew {
background: #8B4513;
color: #fff;
}
.lang-badge.greek {
background: #4169E1;
color: #fff;
}
.word-card .original-word {
font-size: 4.5rem;
line-height: 1.3;
margin-bottom: 0.75rem;
color: var(--text-color);
}
.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);
}
/* Info cards grid */
.info-cards {
display: grid;
grid-template-columns: 1fr;
gap: 1.25rem;
margin-bottom: 2rem;
}
.info-card {
background: var(--bg-color);
border: 1px solid var(--border-color);
border-radius: 8px;
padding: 1.5rem;
}
.info-card h2 {
font-size: 0.8rem;
color: var(--text-secondary);
text-transform: uppercase;
letter-spacing: 0.08em;
margin: 0 0 0.75rem 0;
font-weight: 600;
}
.info-card p {
margin: 0;
line-height: 1.7;
}
.info-card.definition {
border-left: 4px solid #4a7c59;
}
.info-card.definition p {
font-size: 1.15rem;
font-style: italic;
}
.info-card.kjv {
border-left: 4px solid #8B4513;
}
.info-card.kjv p {
font-size: 1.05rem;
color: var(--text-color);
font-style: italic;
}
.info-card.derivation {
border-left: 4px solid #4169E1;
}
.info-card.derivation > p {
font-size: 0.95rem;
color: var(--text-secondary);
font-style: italic;
}
/* 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);
border-radius: 4px;
border-left: 3px solid #6495ED;
}
.related-entry-card:hover {
border-color: #4169E1;
box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.related-entry-header {
display: flex;
align-items: baseline;
gap: 0.75rem;
margin-bottom: 0.35rem;
}
.related-entry-header a {
font-weight: 600;
font-size: 1rem;
color: #4169E1;
text-decoration: none;
}
.related-entry-header a:hover {
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;
}
[data-theme="dark"] .related-entry-card {
background: #1a1a1a;
border-color: #333;
}
[data-theme="dark"] .related-entry-header a {
color: #6495ED;
}
.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(--code-bg);
border: 1px solid var(--border-color);
border-radius: 6px;
text-decoration: none;
color: var(--text-color);
font-size: 0.9rem;
transition: all 0.2s;
}
.nav-btn:hover {
border-color: var(--link-color);
color: var(--link-color);
background: var(--bg-color);
}
.nav-btn.primary {
background: var(--link-color);
border-color: var(--link-color);
color: #fff;
}
.nav-btn.primary:hover {
background: var(--link-hover);
border-color: var(--link-hover);
color: #fff;
}
.prev-next {
display: flex;
gap: 0.5rem;
}
/* Occurrences section */
.occurrences-section {
margin-bottom: 2rem;
}
.occurrences-section > h2 {
font-size: 1.1rem;
margin: 0 0 0.5rem 0;
color: var(--text-color);
}
.occurrences-count {
font-size: 0.9rem;
color: var(--text-secondary);
margin: 0 0 1.25rem 0;
}
.occurrences-grid {
display: grid;
gap: 1rem;
}
.occurrence-card {
background: var(--bg-color);
border: 1px solid var(--border-color);
border-radius: 8px;
padding: 1rem 1.25rem;
transition: border-color 0.2s;
}
.occurrence-card:hover {
border-color: var(--link-color);
}
.occurrence-card.selected {
border-color: var(--link-color);
box-shadow: 0 0 0 2px rgba(74, 124, 89, 0.3);
background: #f8fff8;
}
.occurrence-card .occ-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 0.5rem;
}
.occurrence-card .occ-reference {
color: var(--link-color);
text-decoration: 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);
}
.occurrence-card .occ-verse-text {
font-size: 0.95rem;
line-height: 1.6;
color: var(--text-color);
margin: 0;
}
.occurrence-card .occ-verse-text mark {
background: #fff3cd;
color: inherit;
padding: 0.1rem 0.2rem;
border-radius: 2px;
font-weight: 500;
}
[data-theme="dark"] .occurrence-card {
background: #1a1a1a;
border-color: #333;
}
[data-theme="dark"] .occurrence-card:hover {
border-color: var(--link-color);
}
[data-theme="dark"] .occurrence-card.selected {
background: #1a2a1a;
box-shadow: 0 0 0 2px rgba(107, 155, 122, 0.3);
}
[data-theme="dark"] .occurrence-card .occ-verse-text mark {
background: #5a4a00;
color: #fff;
}
/* Dark mode */
[data-theme="dark"] .word-card,
[data-theme="dark"] .info-card {
background: #1a1a1a;
border-color: #333;
}
[data-theme="dark"] .nav-btn {
background: #2a2a2a;
border-color: #444;
}
[data-theme="dark"] .nav-btn:hover {
background: #333;
}
@media (max-width: 600px) {
.word-card {
padding: 1.5rem;
}
.word-card .original-word {
font-size: 3rem;
}
.nav-row {
flex-direction: column;
align-items: stretch;
}
.prev-next {
justify-content: center;
}
}
</style>
{% endblock %}
{% block content %}
<div class="strongs-page">
<h1>Strong's Concordance</h1>
<p class="subtitle">Hebrew & Greek Lexicon</p>
<div 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>
<div class="original-word {% if entry.language == 'Hebrew' %}hebrew{% else %}greek{% endif %}">{{ entry.word }}</div>
<div class="transliteration">{{ entry.transliteration }}</div>
{% if entry.pronunciation %}
<div class="pronunciation">{{ entry.pronunciation }}</div>
{% endif %}
</div>
<div class="info-cards">
<div class="info-card definition">
<h2>Definition</h2>
<p>{{ entry.definition }}</p>
</div>
{% if entry.kjv_usage %}
<div class="info-card kjv">
<h2>KJV Translations</h2>
<p>{{ entry.kjv_usage }}</p>
</div>
{% endif %}
{% if entry.derivation %}
<div class="info-card derivation">
<h2>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 %}
</div>
{% if verse_occurrences %}
<div class="occurrences-section">
<h2>Occurrences in Scripture</h2>
<p class="occurrences-count">
Found in {{ total_occurrences }} verse{% if total_occurrences != 1 %}s{% endif %}
</p>
<div class="occurrences-grid">
{% for occ in verse_occurrences %}
<div class="occurrence-card">
<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>
</div>
{% endif %}
<nav class="nav-row">
<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">← {{ prefix }}{{ num - 1 }}</a>
{% endif %}
<a href="/strongs/{{ prefix }}{{ num + 1 }}" class="nav-btn">{{ prefix }}{{ num + 1 }} →</a>
</div>
</nav>
</div>
<script>
(function() {
const cards = document.querySelectorAll('.occurrence-card');
if (cards.length === 0) return;
let selectedIndex = -1;
function selectCard(index) {
// Remove previous selection
if (selectedIndex >= 0 && selectedIndex < cards.length) {
cards[selectedIndex].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 (KJVNav.sidebarActive) 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) {
e.preventDefault();
const link = cards[selectedIndex].querySelector('.occ-reference');
if (link) window.location.href = link.href;
}
});
// Click to select
cards.forEach((card, index) => {
card.addEventListener('click', function(e) {
if (e.target.tagName !== 'A') {
selectCard(index);
}
});
});
})();
</script>
{% endblock %}