{% import "includes/macros.html" as macros %} {% with messages = get_flashed_messages(with_categories=True) %} {% if messages %}
{% for category, message in messages %} {% if category == 'error' %} {{ macros.make_toast(message, "color: rgba(255, 0, 0, 0.5)", None) }} {% elif category == 'success' %} {{ macros.make_toast(message, "color: rgba(0, 255, 0, 0.5)", None) }} {% elif category == 'warning' %} {{ macros.make_toast(message, "color: rgba(220, 200, 0, 0.5)", None) }} {% else %} {{ macros.make_toast(message, None, None) }} {% endif %} {% endfor %}
{% endif %} {% endwith %}