Theme Gallery
{% theme_head include_js=True %}
{% comment %}
`|safe` is load-bearing, not a shortcut. Autoescaping rewrites the quotes in
the generated CSS to `"`, so `html[data-theme="dark"]` is emitted as
`html[data-theme="dark"]` — an invalid selector the browser
discards. The `:root` block has no quotes, so it survives, and the page then
applies the preset's root values while every dark-mode override falls back to
whatever `theme_head` supplied. That reads as "only part of the theme
loaded": the preset changes the background but the components keep the
configured theme's colours.
Safe because the value is generated by `ColorCSSGenerator` from a preset name
already validated against the registry (see `_initial_preset`), not
interpolated from request data.
{% endcomment %}
{% theme_card title="Card Title" body="Card body content goes here." footer="Card footer" %}
{% theme_card title="No Footer" body="A card without a footer." %}
{% theme_card body="A card with no title or footer." %}
{# ---- Alert ---- #}
Alert
{% theme_alert "This is a default alert." variant="default" title="Default" %}
{% theme_alert "Operation successful!" variant="success" title="Success" %}
{% theme_alert "Please be careful." variant="warning" title="Warning" %}
{% theme_alert "Something went wrong." variant="destructive" title="Destructive" %}
{% theme_alert "This alert can be dismissed." variant="default" dismissible=True %}