{# CARD GROUP — a set of callout cards, laid out horizontally or vertically. Horizontal is the classic KPI strip: one row of 2–4 cells. Vertical stacks the same cards, one per row — which is also what the horizontal strip collapses to on mobile via the .kpi-cell rule in base.html. Context: subtitle — Optional sub-heading rendered above the group orientation — "horizontal" or "vertical" cards — List of dicts with keys: label, value, color, sublabel, body, tone. `tone` names a theme.semantic token; an explicit color wins (#178). `arrow` is a change's direction, drawn before the sublabel in the value's own colour; empty for none (#319). `trend` is a drawn series under the value, or None (#321) #} {% from "common/badge.html" import badge with context %} {% from "analysis/trend-arrow.html" import arrow with context %} {% from "analysis/sparkline-bars.html" import sparkline with context %} {% if subtitle %}
{{ subtitle | escape_html }}
{% endif %} {% if orientation == 'vertical' %}|
{{ card.label | escape_html }}{% if card.badge %} {{ badge(card.badge) }}{% endif %} {% if card.value %}{{ card.value | escape_html }} {% endif %} {% if card.trend %}
{% if card.arrow %}{{ arrow(card.arrow, card.color | default_color(theme.tone[card.tone or 'neutral'])) }}{% endif %}{{ card.sublabel | escape_html }} {% endif %} {% if card.body %}{{ card.body | prose }}
{% endif %}
|
|
{{ card.label | escape_html }}{% if card.badge %} {{ badge(card.badge) }}{% endif %} {{ card.value | escape_html }} {% if card.trend %}
{% if card.arrow %}{{ arrow(card.arrow, card.color | default_color(theme.tone[card.tone or 'neutral'])) }}{% endif %}{{ card.sublabel | escape_html }} {% if card.body %}{{ card.body | prose }}
{% endif %}
|
{% endfor %}