{# The single source of truth for verdict pills — colour + markup. Pass an optional confidence (0–1) to append a "NN%" suffix. Mirrors the --verdict-* CSS tokens and the VERDICT_HEX JS map in dashboard.html. #} {% macro verdict_pill(verdict, confidence=none) %} {% set styles = { 'malicious': 'bg-red-900/40 text-red-300 border-red-900/60', 'suspicious': 'bg-amber-900/40 text-amber-300 border-amber-900/60', 'unknown': 'bg-slate-700/40 text-slate-300 border-slate-600', 'benign': 'bg-emerald-900/40 text-emerald-300 border-emerald-900/60', } %} {{ verdict }}{% if confidence is not none %}{{ "%.0f"|format(confidence * 100) }}%{% endif %} {% endmacro %} {# On/off integrity status as a filled pill — same visual language as verdict_pill so "state" badges read consistently across the dashboard. #} {% macro status_badge(value) %} {% if value is none %} unknown {% elif value %} on {% else %} off {% endif %} {% endmacro %} {% macro card_header(title) %}