yksa-web-kit/yksa_web/templates/yksa/ui/_chip.html
2026-08-17 22:42:04 +08:00

16 lines
692 B
HTML

{% comment %}
Colourless metadata: a version, an identifier, a count, a role. Anything that
carries no status. If you are reaching for a coloured badge to show a *fact*,
you want this instead.
{% include "yksa/ui/_chip.html" with text=element.source.slug mono=1 %}
text the chip content (required)
icon Bootstrap Icons name without the `bi-` prefix
mono render monospace -- machine identifiers only
title tooltip
{% endcomment %}{% spaceless %}
<span class="yksa-chip{% if mono %} font-monospace{% endif %}"{% if title %} title="{{ title }}"{% endif %}>
{% if icon %}<i class="bi bi-{{ icon }}" aria-hidden="true"></i>{% endif %}{{ text }}
</span>
{% endspaceless %}