{% for label, messages in app.flashes(['success', 'notice', 'warning', 'error']) %}
{% if label == "success" %}{% set color = "w3-green" %}{% endif %}
{% if label == "notice" %}{% set color = "w3-yellow" %}{% endif %}
{% if label == "warning" %}{% set color = "w3-orange" %}{% endif %}
{% if label == "error" %}{% set color = "w3-red" %}{% endif %}
{% if messages is not empty %}
<div class="w3-panel w3-round {{ color }}">
{% for message in messages %}
<p>{{ message }}</p>
{% endfor %}
</div>
{% endif %}
{% endfor %}