mirror of
https://github.com/kennethreitz/kjvstudy.org.git
synced 2026-07-22 01:19:30 +00:00
4018f9d10e
chapter.html and verse.html each carried a verbatim ~62-line 'Related Resources'
grid (Topics/People/Study Resources/Bible Stories). They had drifted: chapter
had id="related-resources"/-heading anchors, verse had none. Extracted
partials/_related_resources.html (parameterized by ); both pages
now {% include %} it, so verse.html gains the anchor ids and the two can't drift.
937 tests pass; both pages verified (chapter -> 'this chapter', verse ->
'this passage', both now have the anchor id).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
67 lines
3.0 KiB
HTML
67 lines
3.0 KiB
HTML
{# Related Resources block shared by chapter.html and verse.html.
|
|
Expects `related_content` in context; set `related_noun` (e.g. "chapter",
|
|
"passage") before including to tailor the intro sentence. #}
|
|
{% if related_content and (related_content.topics or related_content.people or related_content.resources or related_content.stories) %}
|
|
<div id="related-resources" style="border-top: 1px solid var(--border-color); padding-top: 2rem; margin-top: 3rem;">
|
|
<h2 id="related-resources-heading">Related Resources</h2>
|
|
<p style="font-size: 0.95rem; color: var(--text-secondary); margin-bottom: 1.5rem;">
|
|
Explore related topics, people, and study resources to deepen your understanding of this {{ related_noun | default("passage") }}.
|
|
</p>
|
|
|
|
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem;">
|
|
{% if related_content.topics %}
|
|
<div>
|
|
<h3 style="font-size: 1rem; margin-bottom: 0.75rem; color: var(--text-secondary);">Topics</h3>
|
|
<ul style="list-style: none; padding: 0; margin: 0;">
|
|
{% for topic in related_content.topics %}
|
|
<li style="margin-bottom: 0.5rem;">
|
|
<a href="{{ topic.url }}" style="font-size: 0.95rem;">{{ topic.name }}</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if related_content.people %}
|
|
<div>
|
|
<h3 style="font-size: 1rem; margin-bottom: 0.75rem; color: var(--text-secondary);">People</h3>
|
|
<ul style="list-style: none; padding: 0; margin: 0;">
|
|
{% for person in related_content.people %}
|
|
<li style="margin-bottom: 0.5rem;">
|
|
<a href="{{ person.url }}" style="font-size: 0.95rem;">{{ person.name }}</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if related_content.resources %}
|
|
<div>
|
|
<h3 style="font-size: 1rem; margin-bottom: 0.75rem; color: var(--text-secondary);">Study Resources</h3>
|
|
<ul style="list-style: none; padding: 0; margin: 0;">
|
|
{% for resource in related_content.resources %}
|
|
<li style="margin-bottom: 0.5rem;">
|
|
<a href="{{ resource.url }}" style="font-size: 0.95rem;">{{ resource.name }}</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if related_content.stories %}
|
|
<div>
|
|
<h3 style="font-size: 1rem; margin-bottom: 0.75rem; color: var(--text-secondary);">Bible Stories</h3>
|
|
<ul style="list-style: none; padding: 0; margin: 0;">
|
|
{% for story in related_content.stories %}
|
|
<li style="margin-bottom: 0.5rem;">
|
|
<a href="{{ story.url }}" style="font-size: 0.95rem;">{{ story.name }}</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
|
|
</div>
|
|
</div>
|
|
{% endif %}
|