From 481c05689e6e5c82e7f2e964c68be858f7fd12b8 Mon Sep 17 00:00:00 2001 From: Taha Khidr Date: Wed, 1 Jan 2025 11:06:28 +0300 Subject: [PATCH 1/2] added venv/ to .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 199290d..698e8b3 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,8 @@ __pycache__/ # C extensions *.so +venv/ + # Distribution / packaging .Python build/ From d2a2122775584f76dec4e501978675c9104fdbc0 Mon Sep 17 00:00:00 2001 From: Taha Khidr Date: Wed, 1 Jan 2025 11:40:30 +0300 Subject: [PATCH 2/2] Refactor message styling and add helper templates --- .../templates/allauth/layouts/base.html | 120 +++++++++--------- allauth_ui/templates/helpers/messages.html | 17 +++ .../templates/helpers/messages/error.html | 3 + .../templates/helpers/messages/info.html | 3 + .../templates/helpers/messages/success.html | 3 + .../templates/helpers/messages/warning.html | 3 + 6 files changed, 88 insertions(+), 61 deletions(-) create mode 100644 allauth_ui/templates/helpers/messages.html create mode 100644 allauth_ui/templates/helpers/messages/error.html create mode 100644 allauth_ui/templates/helpers/messages/info.html create mode 100644 allauth_ui/templates/helpers/messages/success.html create mode 100644 allauth_ui/templates/helpers/messages/warning.html diff --git a/allauth_ui/templates/allauth/layouts/base.html b/allauth_ui/templates/allauth/layouts/base.html index 63e04a8..7ee2869 100644 --- a/allauth_ui/templates/allauth/layouts/base.html +++ b/allauth_ui/templates/allauth/layouts/base.html @@ -4,64 +4,62 @@ {% load allauth_ui %} - - - - - {% block head_title %} - {% endblock head_title %} - - {% block extra_head %} - - {% endblock extra_head %} - - - {% block body %} - {% if messages %} - {% for message in messages %} - - {% endfor %} - {% endif %} - {% block content %} - {% endblock content %} - - {% endblock body %} - {% block extra_body %} - {% endblock extra_body %} - - + + + + + + {% block head_title %} + {% endblock head_title %} + + {% block extra_head %} + + {% endblock extra_head %} + + + + {% block body %} + + {% include 'helpers/messages.html' %} + + {% block content %} + {% endblock content %} + + {% endblock body %} + {% block extra_body %} + {% endblock extra_body %} + + + \ No newline at end of file diff --git a/allauth_ui/templates/helpers/messages.html b/allauth_ui/templates/helpers/messages.html new file mode 100644 index 0000000..9918f1b --- /dev/null +++ b/allauth_ui/templates/helpers/messages.html @@ -0,0 +1,17 @@ +{% if messages %} + +{% endif %} \ No newline at end of file diff --git a/allauth_ui/templates/helpers/messages/error.html b/allauth_ui/templates/helpers/messages/error.html new file mode 100644 index 0000000..aa2b22d --- /dev/null +++ b/allauth_ui/templates/helpers/messages/error.html @@ -0,0 +1,3 @@ +

+ {{ message }} +

\ No newline at end of file diff --git a/allauth_ui/templates/helpers/messages/info.html b/allauth_ui/templates/helpers/messages/info.html new file mode 100644 index 0000000..ed51aed --- /dev/null +++ b/allauth_ui/templates/helpers/messages/info.html @@ -0,0 +1,3 @@ +

+ {{ message }} +

diff --git a/allauth_ui/templates/helpers/messages/success.html b/allauth_ui/templates/helpers/messages/success.html new file mode 100644 index 0000000..f78d810 --- /dev/null +++ b/allauth_ui/templates/helpers/messages/success.html @@ -0,0 +1,3 @@ +

+ {{ message }} +

diff --git a/allauth_ui/templates/helpers/messages/warning.html b/allauth_ui/templates/helpers/messages/warning.html new file mode 100644 index 0000000..ba161d8 --- /dev/null +++ b/allauth_ui/templates/helpers/messages/warning.html @@ -0,0 +1,3 @@ +

+ {{ message }} +