{#
Badges Partial
Renders badges for modules, classes, CLI commands, and other elements.
Uses semantic badge classes from autodoc.css:
- autodoc-badge: Base badge styling
- data-badge="*": Badge variant via data attribute
Note: This partial expects 'element' to be a DocElement, not None.
The caller (page-hero/element.html) should guard inclusion with {% if element %}.
#}
{% if element and element.element_type == 'module' %}
Module
{% if element.metadata.is_dataclass %}
dataclass
{% endif %}
{% elif element.element_type == 'class' %}
{% if element.metadata.is_mixin %}
Mixin
{% endif %}
{% if element.metadata.is_dataclass %}
dataclass
{% endif %}
{% if element.metadata.is_abstract %}
abstract
{% endif %}
{% elif element.element_type == 'function' %}
{% if element.metadata.is_async %}
async
{% endif %}
{% elif element.element_type == 'method' %}
{% if element.metadata.is_async %}
async
{% endif %}
{% if element.metadata.is_classmethod %}
classmethod
{% endif %}
{% if element.metadata.is_staticmethod %}
staticmethod
{% endif %}
{% if element.metadata.is_property %}
property
{% endif %}
{% elif element.element_type == 'command' %}
Command
{% elif element.element_type == 'command-group' %}
Command Group
{% endif %}