# Message rendering

* adds icons to message danger, info and success rendering
This commit is contained in:
mpeltriaux 2024-03-12 10:32:05 +01:00
parent e2eb0ecbb0
commit 4332a750d1
3 changed files with 27 additions and 4 deletions

View File

@ -275,4 +275,7 @@ Similar to bootstraps 'shadow-lg'
} }
.tree-label.badge{ .tree-label.badge{
font-size: 90%; font-size: 90%;
}
.alert{
margin-bottom: 0 !important;
} }

View File

@ -27,7 +27,18 @@
<div class="col"> <div class="col">
{% for message in messages %} {% for message in messages %}
<div class="row alert alert-{{ message.tags }}"> <div class="row alert alert-{{ message.tags }}">
{{ message }} <div>
<span class="mr-3">
{% if "danger" in message.tags %}
{% fa5_icon 'exclamation' %}
{% elif "info" in message.tags %}
{% fa5_icon 'info' %}
{% elif "success" in message.tags %}
{% fa5_icon 'check' %}
{% endif %}
</span>
{{ message }}
</div>
</div> </div>
{% endfor %} {% endfor %}
</div> </div>

View File

@ -23,13 +23,22 @@
{% endblock %} {% endblock %}
</header> </header>
<div class="container-fluid mt-3 px-5"> <div class="container-fluid mt-3 px-5">
<div class="">
{% for message in messages %} {% for message in messages %}
<div class="row alert alert-{{ message.tags }}"> <div class="row alert alert-{{ message.tags }}">
<div>
<span class="mr-3">
{% if "danger" in message.tags %}
{% fa5_icon 'exclamation' %}
{% elif "info" in message.tags %}
{% fa5_icon 'info' %}
{% elif "success" in message.tags %}
{% fa5_icon 'check' %}
{% endif %}
</span>
{{ message }} {{ message }}
</div> </div>
{% endfor %}
</div> </div>
{% endfor %}
{% block body %} {% block body %}