{% extends "base.html" %} {% block title %}{{ book }} {{ chapter }} - KJV Bible{% endblock %} {% block description %}Read {{ book }} chapter {{ chapter }} from the King James Version Bible. {{ verses[0].text[:100] if verses and verses|length > 0 else '' }}...{% endblock %} {% block head %} {% endblock %} {% block content %}
{{ verse.verse }} {{ verse.text | red_letter(book, chapter, verse.verse) | inject_word_markers(commentary.word_studies if commentary else [], verse.verse, commentary.word_study_auto_expand if commentary else false) | safe }} {% if commentary %} {% if commentary.cross_reference_groups %} {# Flatten refs with their group info for counting #} {% set ns = namespace(all_refs=[], ref_count=0) %} {% for group in commentary.cross_reference_groups %} {% for ref in group.refs %} {% set ns.all_refs = ns.all_refs + [{'ref': ref, 'group': group.description, 'group_idx': loop.index0, 'is_first_in_group': loop.first}] %} {% set ns.ref_count = ns.ref_count + 1 %} {% endfor %} {% endfor %} {% set total_refs = ns.ref_count %} {# Show all if 6 or fewer (avoid "+1"), otherwise show 5 with expand #} {% set preview_count = total_refs if total_refs <= 6 else 5 %} {% set extra_count = total_refs - preview_count %} {% endif %} {% endif %}
{% if has_stanza_break and has_section_heading %}