Add message flashing
This commit is contained in:
parent
263b09c912
commit
faa793174f
|
@ -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
|
||||||
|
|
12
src/lib/pug/message-flash.html
Normal file
12
src/lib/pug/message-flash.html
Normal 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">×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
{% endwith %}
|
Reference in a new issue