mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-03-25 09:21:10 +00:00
ui: Use inline SVG icons for all error/warn/info/success messages
Tests: - All the icons appear as before in both light/dark themes. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
53ee9c4ee2
commit
33d7bf641f
@ -3,6 +3,7 @@
|
||||
{% endcomment %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load plinth_extras %}
|
||||
|
||||
{% for message in messages %}
|
||||
<div class="alert alert-{{ message.tags }} alert-dismissible
|
||||
@ -10,16 +11,16 @@
|
||||
role="alert">
|
||||
<div class="me-2">
|
||||
{% if message.tags == 'danger' %}
|
||||
<span class="fa fa-exclamation-triangle" aria-hidden="true"></span>
|
||||
{% icon 'exclamation-triangle' %}
|
||||
<span class="visually-hidden">{% trans "Error:" %}</span>
|
||||
{% elif message.tags == 'warning' %}
|
||||
<span class="fa fa-exclamation-triangle" aria-hidden="true"></span>
|
||||
{% icon 'exclamation-triangle' %}
|
||||
<span class="visually-hidden">{% trans "Caution:" %}</span>
|
||||
{% elif message.tags == 'info' %}
|
||||
<span class="fa fa-info-circle" aria-hidden="true"></span>
|
||||
{% icon 'info-circle' %}
|
||||
<span class="visually-hidden">{% trans "Info:" %}</span>
|
||||
{% elif message.tags == 'success' %}
|
||||
<span class="fa fa-check-circle" aria-hidden="true"></span>
|
||||
{% icon 'check-circle' %}
|
||||
<span class="visually-hidden">{% trans "Success:" %}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user