{# BPJudge UI Contract v1 macros. Import with: {% import "components/ui/v1.html" as ui_v1 %} Do not use `ui` as the alias: Hydro exposes its navigation registry through that global template name, and shadowing it breaks shared layout rendering. Text is escaped by the template environment. Translate user-facing copy at the call site so these primitives remain independent from business logic. #} {% macro help(text, label='使用说明') -%} {{ text }} {%- endmacro %} {% macro badge(text, tone='neutral', extra_class='') -%} {{ text }} {%- endmacro %} {% macro category_label(text, category=0) -%} {% set category = category if category in [0, 1, 2, 3, 4, 5, 6, 7, 8] else 0 -%} {{ text }} {%- endmacro %} {% macro stat(value, label, detail=none, extra_class='') -%}