From 4629e12f678896a72c26848edc86a136cc3a50a8 Mon Sep 17 00:00:00 2001 From: Andrew Date: Sat, 10 Jan 2026 19:08:12 +0900 Subject: [PATCH] apply universal styling to flash alerts --- templates/dashboard.html | 24 ++++++++++++++++++------ templates/login.html | 24 ++++++++++++++++++------ templates/register.html | 24 ++++++++++++++++++------ 3 files changed, 54 insertions(+), 18 deletions(-) diff --git a/templates/dashboard.html b/templates/dashboard.html index be6e906..f1db80d 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -12,12 +12,24 @@
{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %} - + {% endif %} {% endwith %}
diff --git a/templates/login.html b/templates/login.html index 163c1a0..c4909ec 100644 --- a/templates/login.html +++ b/templates/login.html @@ -13,12 +13,24 @@
{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %} -
    - {% for category, message in messages %} - -
  • {{ message }}
  • - {% endfor %} -
+
    + {% for category, message in messages %} + + {% if category == 'message' %} + {% set category = 'primary' %} + {% endif %} + {% if category == 'error' %} + {% set category = 'danger' %} + {% endif %} + {% if category == 'info' %} + {% set category = 'info' %} + {% endif %} + {% if category == 'warning' %} + {% set category = 'warning' %} + {% endif %} +
  • {{ message }}
  • + {% endfor %} +
{% endif %} {% endwith %} diff --git a/templates/register.html b/templates/register.html index 0e255bf..c53c6c3 100644 --- a/templates/register.html +++ b/templates/register.html @@ -13,12 +13,24 @@
{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %} -
    - {% for category, message in messages %} - -
  • {{ message }}
  • - {% endfor %} -
+
    + {% for category, message in messages %} + + {% if category == 'message' %} + {% set category = 'primary' %} + {% endif %} + {% if category == 'error' %} + {% set category = 'danger' %} + {% endif %} + {% if category == 'info' %} + {% set category = 'info' %} + {% endif %} + {% if category == 'warning' %} + {% set category = 'warning' %} + {% endif %} +
  • {{ message }}
  • + {% endfor %} +
{% endif %} {% endwith %}