ApplicantPortal/app/templates/includes/flash_messages.html
2025-03-12 20:43:26 -06:00

19 lines
855 B
HTML

{% import "includes/macros.html" as macros %}
{% with messages = get_flashed_messages(with_categories=True) %}
{% if messages %}
<div id="toast-container" class="pin-top center-align">
{% 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 %}
</div>
{% endif %}
{% endwith %}