{# Shared template macros. Import with: {% import "_macros.html" as m %} #} {# Figure-debug line (OCEANARRAY_REPORT_DEBUG=1): the display slot this template chose vs the render-side figsize/png, so a figsize≠slot mismatch is visible. Renders nothing unless debug capture recorded this figure (figdbg is a Jinja global returning "" when off), so it is a no-op in normal builds. #} {% macro dbg(b64, slot) %}{% set d = figdbg(b64) %}{% if d %}
{{ sec.intro }}
{%- endif %} {%- if sec.layout == "row" %} {{ panel_row(sec) }} {%- else %} {%- for p in sec.panels %} {{ panel(p) }} {%- endfor %} {%- endif %} {% endfor %} {% if report.not_applicable %}Not applicable to this {{ na_scope }}: {{ report.not_applicable | join(", ") }}.
{% endif %} {% endmacro %} {% macro panel(p, bare=false) %} {%- if p.is_stub %}{{ p.stub_reason }}
{%- elif p.kind == "figure" %} {% if p.caption %}{{ p.caption }}
{% endif -%}{{ p.caption }}
{% endif -%} {{ p.payload | safe }} {%- endif %} {%- endmacro %} {# Row layout for a section (Section.layout="row"): each panel sits in a flex cell sized by its slot (slot-half → ~50%, slot-full → 100% → wraps to its own line). The figure inside the cell is rendered *bare* (class="fig", 100% of the cell) so the cell — not the img — controls the display width. #} {% macro panel_row(sec) %}