Add message flashing

This commit is contained in:
Tristan Maat 2018-04-15 23:12:06 +00:00
parent 263b09c912
commit faa793174f
2 changed files with 13 additions and 0 deletions

View file

@ -11,6 +11,7 @@ html(lang="en")
include ./navigation include ./navigation
.container.floating-container .container.floating-container
include ./message-flash.html
block content block content
block footer block footer

View file

@ -0,0 +1,12 @@
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
{% for category, message in messages %}
<div class="alert alert-{{ category }} alert-dismissible fade show" role="alert">
{{ message }}
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
{% endfor %}
{% endif %}
{% endwith %}