{% extends 'base_template.html' %} {% import "_macros.html" as macros %} {# SD-752 phases 1 + 2. Each chapter exposes a uniform shape: {"name": str, "narrative": list[str], "tables": list[dict], "diagram_placeholder": str | None, "diagram_data_uri": str | None, "diagram_caption": str | None, "diagram_legend": [{"icon_uri": str, "label": str}, ...]} ``diagram_data_uri`` is a base64-encoded PNG produced by netwlens. When present it renders as an inline followed by the icon legend (filtered to types present on the diagram) and a one-line caption explaining the ▶/arrowhead convention. ``diagram_placeholder`` is the fallback when the render failed. #} {% block content %}
{{ macros.report_introduction(report_details) }} {{ macros.standard_summary_section(network_summary, site_summary, site_filter) }} {% for chapter in chapters %} {{ macros.section_title(chapter.name, loop.index, site_filter) }}
{% for paragraph in chapter.narrative %}

{{ paragraph }}

{% endfor %}
{% if chapter.diagram_data_uri %} {% if chapter.diagram_source_note %}

{{ chapter.diagram_source_note }}

{% endif %}
{{ chapter.name }} site topology
{% if chapter.diagram_caption %}

{{ chapter.diagram_caption }}

{% endif %} {% elif chapter.diagram_placeholder %}

{{ chapter.diagram_placeholder }}

{% endif %} {% if chapter.tables %} {% for table in chapter.tables %} {% if table.heading %}

{{ table.heading }}

{% endif %} {% if table.rows %} {% if table.columns %} {% for column in table.columns %} {% endfor %} {% endif %} {% for row in table.rows %} {% for cell in row %} {% endfor %} {% endfor %}
{{ column }}
{{ cell }}
{% else %}

{{ table.empty_message or "Not present at this site." }}

{% endif %} {% endfor %} {% endif %} {% if chapter.diagram_legend %}
{% for entry in chapter.diagram_legend %} {{ entry.label }} {% endfor %}
{% endif %} {% endfor %}
{% endblock %}