feat(templates/allauth): style allauth elements

This commit is contained in:
2026-03-10 14:19:20 +01:00
parent 8fb52132bb
commit 12200ad663
29 changed files with 414 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
{% load allauth %}
{% setvar variant %}
{% if "warning" in attrs.tags %}
warning
{% elif "danger" in attrs.tags %}
danger
{% elif "secondary" in attrs.tags %}
secondary
{% elif "success" in attrs.tags %}
success
{% else %}
primary
{% endif %}
{% endsetvar %}
<span {% if attrs.title %}title="{{ attrs.title }}"{% endif %}
class="inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium {% if variant == "warning" %}bg-amber-100 text-amber-800{% elif variant == "danger" %}bg-red-100 text-red-800{% elif variant == "secondary" %}bg-slate-100 text-slate-700{% elif variant == "success" %}bg-green-100 text-green-800{% else %}bg-blue-100 text-blue-800{% endif %}">
{% slot %}
{% endslot %}
</span>