From 8b4ffba859a04e487e28710989de538f5386f0ad Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Fri, 16 Jun 2023 14:45:43 +0200 Subject: [PATCH] Show messages also in the content part Messages are already shown in the map, if any. --- umap/static/umap/content.css | 21 +++++++++++++++++++++ umap/templates/umap/content.html | 1 + umap/templates/umap/messages.html | 11 +++++++++++ 3 files changed, 33 insertions(+) create mode 100644 umap/templates/umap/messages.html diff --git a/umap/static/umap/content.css b/umap/static/umap/content.css index 931321b4..5e468f8c 100644 --- a/umap/static/umap/content.css +++ b/umap/static/umap/content.css @@ -259,6 +259,27 @@ ul.umap-autocomplete { cursor: pointer; } +/* **************************** */ +/* Messages */ +/* **************************** */ +.messages li { + border-radius: 1px; + color: white; + margin-bottom: 20px; + padding: 20px; + text-align: center; + width: 100%; + background-color: #444; + font-weight: bold; +} + +.messages .success { + background-color: #16a085; +} + +.messages .error { + background-color: #c60f13; +} /* **************************** */ diff --git a/umap/templates/umap/content.html b/umap/templates/umap/content.html index dbd38ce5..29f9bf01 100644 --- a/umap/templates/umap/content.html +++ b/umap/templates/umap/content.html @@ -15,6 +15,7 @@
{% include 'umap/navigation.html' with title=SITE_NAME %}
+ {% include 'umap/messages.html' with title=SITE_NAME %} {% endblock %} {% block content %} diff --git a/umap/templates/umap/messages.html b/umap/templates/umap/messages.html new file mode 100644 index 00000000..f2777e5c --- /dev/null +++ b/umap/templates/umap/messages.html @@ -0,0 +1,11 @@ +
+
+ {% if messages %} +
    + {% for message in messages %} + {{ message }} + {% endfor %} +
+ {% endif %} +
+