mirror of
https://github.com/kennethreitz/kjvstudy.org.git
synced 2026-06-19 22:10:57 +00:00
3df0e4d48a
Accessibility Improvements: - Add ARIA roles and labels to search.html (search form, results, status messages) - Add ARIA landmarks to resource_detail.html (article, sections, navigation) - Add ARIA landmarks to resource_index.html (TOC, sections, verse lists) - Add aria-hidden to decorative SVG icons throughout templates - Implement aria-labelledby for sectioning elements - Add role="list" and role="listitem" for verse lists Test Coverage: - Create comprehensive test_resource_routes.py with 76 new tests - Test 26+ resource index pages (angels, prophets, parables, etc.) - Test systematic theology routes (trinity, christology, soteriology, etc.) - Test special topic routes (messianic prophecies, types/shadows, etc.) - Test doctrinal routes (grace, justification, sanctification, etc.) - Test detail pages and 404 handling for invalid slugs - Test HTML structure and content types All 252 tests passing (up from 176). Improved WCAG 2.1 compliance. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
173 lines
4.4 KiB
HTML
173 lines
4.4 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}{{ item_name }} - {{ resource_title }} - KJV Study{% endblock %}
|
|
{% block description %}{{ item.title }} - {{ item_name }}{% endblock %}
|
|
|
|
{% block head %}
|
|
<style>
|
|
.resource-title {
|
|
font-size: 1.2rem;
|
|
color: var(--text-secondary);
|
|
font-style: italic;
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
.resource-category {
|
|
font-size: 0.9rem;
|
|
color: var(--text-tertiary);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.resource-description {
|
|
max-width: 75%;
|
|
font-size: 1.2rem;
|
|
line-height: 1.9;
|
|
margin: 2rem 0;
|
|
}
|
|
|
|
.verse-list {
|
|
margin: 2rem 0;
|
|
}
|
|
|
|
.verse-item {
|
|
margin: 1.5rem 0;
|
|
padding-left: 1.5rem;
|
|
border-left: 3px solid var(--border-color-darker);
|
|
}
|
|
|
|
.verse-ref {
|
|
font-weight: 600;
|
|
margin-bottom: 0.75rem;
|
|
font-size: 1.1rem;
|
|
}
|
|
|
|
.verse-ref a {
|
|
color: var(--link-color);
|
|
text-decoration: none;
|
|
}
|
|
|
|
.verse-ref a:hover {
|
|
border-bottom: 1px solid var(--link-hover);
|
|
}
|
|
|
|
.verse-text {
|
|
max-width: 75%;
|
|
font-style: italic;
|
|
color: var(--text-secondary);
|
|
line-height: 1.8;
|
|
font-size: 1.1rem;
|
|
}
|
|
|
|
.intro-text {
|
|
max-width: 75%;
|
|
font-size: 1.2rem;
|
|
line-height: 1.9;
|
|
margin: 1rem 0;
|
|
}
|
|
|
|
.resource-actions {
|
|
margin: 1.5rem 0;
|
|
}
|
|
|
|
|
|
.print-btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
padding: 0.45rem 0.9rem;
|
|
font-size: 0.9rem;
|
|
color: var(--text-secondary);
|
|
background: var(--code-bg);
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.print-btn:hover {
|
|
background: var(--bg-color);
|
|
border-color: var(--link-color);
|
|
color: var(--link-color);
|
|
text-decoration: none;
|
|
}
|
|
|
|
.print-btn svg {
|
|
width: 16px;
|
|
height: 16px;
|
|
}
|
|
|
|
@media print {
|
|
.resource-actions,
|
|
.print-btn {
|
|
display: none;
|
|
}
|
|
}
|
|
</style>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<article role="article">
|
|
{% if category_name %}
|
|
<div class="resource-category">{{ category_name }}</div>
|
|
{% endif %}
|
|
<h1>{{ item_name }}</h1>
|
|
<p class="resource-title">{{ item.title }}</p>
|
|
|
|
{% if pdf_available and pdf_url %}
|
|
<div class="resource-actions">
|
|
<a href="{{ pdf_url }}" class="print-btn" aria-label="Download {{ item_name }} as PDF">
|
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
|
|
</svg>
|
|
Download PDF
|
|
</a>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<section aria-labelledby="description-heading">
|
|
<h2 id="description-heading">Description</h2>
|
|
<div class="resource-description">
|
|
{{ item.description | link_names | link_verses | safe }}
|
|
</div>
|
|
{% if item.family_tree_link %}
|
|
<p style="margin-top: 1.5rem;">
|
|
<a href="{{ item.family_tree_link }}" aria-label="View {{ item_name }} in the Family Tree">View {{ item_name }} in Family Tree →</a>
|
|
</p>
|
|
{% endif %}
|
|
</section>
|
|
|
|
<section aria-labelledby="verses-heading">
|
|
<h2 id="verses-heading">Key Verses</h2>
|
|
<div class="verse-list" role="list">
|
|
{% for verse in item.verses %}
|
|
<div class="verse-item" role="listitem">
|
|
<div class="verse-ref">
|
|
{% set ref_parts = verse.reference.rsplit(' ', 1) %}
|
|
{% if ref_parts|length == 2 %}
|
|
{% set book_name = ref_parts[0] %}
|
|
{% set chapter_verse = ref_parts[1] %}
|
|
{% if ':' in chapter_verse %}
|
|
{% set ch = chapter_verse.split(':')[0] %}
|
|
{% set v = chapter_verse.split(':')[1] %}
|
|
<a href="/book/{{ book_name }}/chapter/{{ ch }}/verse/{{ v }}" aria-label="{{ verse.reference }}">{{ verse.reference }}</a>
|
|
{% else %}
|
|
{{ verse.reference }}
|
|
{% endif %}
|
|
{% else %}
|
|
{{ verse.reference }}
|
|
{% endif %}
|
|
</div>
|
|
<div class="verse-text">{{ verse.text }}</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</section>
|
|
<nav aria-label="Resource navigation">
|
|
<p><a href="{{ back_url }}" aria-label="Back to {{ back_text }}">← Back to {{ back_text }}</a></p>
|
|
</nav>
|
|
</article>
|
|
{% endblock %}
|