feat(templates/allauth): style allauth elements
This commit is contained in:
19
kursy/templates/allauth/elements/badge.html
Normal file
19
kursy/templates/allauth/elements/badge.html
Normal 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>
|
||||
Reference in New Issue
Block a user