{#- Small shared pieces: icons, badges, buttons. Every coloured badge carries a word; every value is autoescaped. -#} {% macro icon(name, cls="ico") %}{% endmacro %} {% macro lvl(level) -%} {%- set l = (level or '')|lower -%} {%- if l in ('critical', 'high', 'medium', 'low', 'informational') -%}{{ l }}{%- endif -%} {%- endmacro %} {% macro st(status) -%} {%- set s = (status or '')|lower -%} {%- if s -%}{{ s }}{%- endif -%} {%- endmacro %} {% macro lic(info) -%} {{ info.label }} {%- endmacro %} {% macro lic_class(cls) -%} {{ LIC_WORDS.get(cls, cls) }} {%- endmacro %} {% macro val(v, show_ok=false) -%} {%- if v == 'ok' and show_ok %}{{ icon('check') }}valid {%- elif v == 'warning' %}warnings {%- elif v == 'error' %}invalid {%- elif not v and show_ok %}not validated{% endif -%} {%- endmacro %} {% macro tech(tid, title='') -%} {{ tid }} {%- endmacro %} {% macro when(dt) -%} {%- if dt %}{% else %}never{% endif -%} {%- endmacro %} {% macro copy_btn(target, label="Copy", cls="btn btn-sm") -%} {%- endmacro %} {% macro cmd(id, command) -%}
{{ command }}{{ copy_btn('#' ~ id) }}{{ r.description|mark(terms) }}
{% endif %} {%- if caller is defined %}{{ ages.unknown|num }} {{ noun ~ ' carry' if ages.unknown != 1 else noun[:-1] ~ ' carries' }} no date.
{% endif %}{{ caption }}