Add message flashing

pull/1/head
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
.container.floating-container
include ./message-flash.html
block content
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 %}