{#- Static structures for declarative blocks, styled by resources/theme.css (rp-* classes) and matching references/layout-spec.md. Every argument is pre-escaped HTML: the Python side (report_blocks.py) escapes user text, these macros only lay it out. -#} {%- macro panel(title, subtitle, body, tools, extra_class) -%}
{%- if title or subtitle or tools %}
{%- if title %}
{{ title }}
{% endif %} {%- if subtitle %}
{{ subtitle }}
{% endif %}
{{ tools }}
{%- endif %}
{{ body }}
{%- endmacro -%} {%- macro conclusion(text) -%}
{{ text }}
{%- endmacro -%} {%- macro kpi_row(tiles, compact) -%}
{{ tiles }}
{%- endmacro -%} {%- macro kpi_tile(tone, label, value, unit, foot) -%}
{{ label }}
{{ value }}{% if unit %}{{ unit }}{% endif %}
{%- if foot %}
{{ foot }}
{%- endif %}
{%- endmacro -%} {%- macro note(text) -%}
{{ text }}
{%- endmacro -%} {%- macro caption(text) -%}
{{ text }}
{%- endmacro -%} {%- macro block_title(text) -%}
{{ text }}
{%- endmacro -%} {%- macro grid(grid_class, body) -%}
{{ body }}
{%- endmacro -%} {%- macro cell(body) -%}
{{ body }}
{%- endmacro -%} {%- macro stack(body) -%}
{{ body }}
{%- endmacro -%} {%- macro table_wrap(wrap_class, style, table) -%}
{{ table }}
{%- endmacro -%} {%- macro table_tools(tid, rows) -%}
共 {{ rows }} 行
{%- endmacro -%} {%- macro chart_toggle(cid) -%}
{%- endmacro -%} {%- macro chart_box(cid, height, table_html) -%}
{%- endmacro -%} {%- macro stackbar(segments, legend) -%}
{{ segments }}
{{ legend }}
{%- endmacro -%} {%- macro timeline(items) -%}
{{ items }}
{%- endmacro -%} {%- macro timeline_item(kind_class, date, title, desc) -%}
{{ date }}
{{ title }}
{% if desc %}
{{ desc }}
{% endif %}
{%- endmacro -%}