Merge pull request #1144 from umap-project/messages

Show messages also in the content part
This commit is contained in:
Yohan Boniface 2023-06-16 15:31:53 +02:00 committed by GitHub
commit 8327aa5f24
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 33 additions and 0 deletions

View file

@ -259,6 +259,27 @@ ul.umap-autocomplete {
cursor: pointer; 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;
}
/* **************************** */ /* **************************** */

View file

@ -15,6 +15,7 @@
<header class="wrapper row"> <header class="wrapper row">
{% include 'umap/navigation.html' with title=SITE_NAME %} {% include 'umap/navigation.html' with title=SITE_NAME %}
</header> </header>
{% include 'umap/messages.html' with title=SITE_NAME %}
{% endblock %} {% endblock %}
{% block content %} {% block content %}

View file

@ -0,0 +1,11 @@
<div class="wrapper">
<div class="row">
{% if messages %}
<ul class="messages">
{% for message in messages %}
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
</div>
</div>