petits ajustements de mise en page

This commit is contained in:
Jean-Marie Favreau 2024-08-21 11:38:18 +02:00
parent 09fe207e5e
commit 3fa8ac2b14
5 changed files with 40 additions and 13 deletions

View File

@ -100,6 +100,10 @@ nav a:hover>.action {
color: var(--primary-inverse); color: var(--primary-inverse);
} }
details {
border-bottom: 0;
}
details[role="list"] summary + ul li.selected>a{ details[role="list"] summary + ul li.selected>a{
background: $primary-600; background: $primary-600;
color: var(--secondary-inverse); color: var(--secondary-inverse);
@ -325,11 +329,22 @@ header .title {
} }
} }
body > main {
padding-top: 0;
}
article {
margin: 1em 0;
}
article form label { article form label {
display: inline-block; display: inline-block;
} }
article#filters { article#filters {
margin-bottom: 0;
padding-bottom: 0.2em;
.buttons-filter { .buttons-filter {
float: right; float: right;
text-align: right; text-align: right;
@ -498,6 +513,13 @@ nav>div {
width: auto; width: auto;
padding-right: 4em; padding-right: 4em;
max-width: 80%; max-width: 80%;
li {
padding: 0.7em;
img {
height: 2em;
}
}
} }
ul, div { ul, div {
@ -548,6 +570,12 @@ nav>div {
transition: max-height .2s ease-out; transition: max-height .2s ease-out;
display: block; display: block;
float: right; float: right;
margin: 0;
padding-right: 0.5em;
li {
margin: 0;
}
} }
/* menu icon */ /* menu icon */
@ -556,9 +584,10 @@ nav>div {
cursor: pointer; cursor: pointer;
display: block; display: block;
float: right; float: right;
padding: 28px 20px; padding: 10px 20px;
position: relative; position: relative;
user-select: none; user-select: none;
font-size: 24px;
} }
.header .menu-icon .navicon { .header .menu-icon .navicon {
@ -952,3 +981,7 @@ table .buttons {
} }
} }
.soustitre {
margin-top: -1.5em;
margin-left: 0.5em;
}

View File

@ -26,12 +26,10 @@
Filtrer Filtrer
{% endif %} {% endif %}
</summary> </summary>
<section>
<form method="get" class="form django-form main-filter"> <form method="get" class="form django-form main-filter">
{{ filter.form.as_p }}<br /> {{ filter.form.as_p }}<br />
<button type="submit">Appliquer le filtre</button><br /> <button type="submit">Appliquer le filtre</button>
</form> </form>
</section>
</details> </details>
{% if filter.is_active %} {% if filter.is_active %}
<a href="{{ filter.get_url_without_filters }}" role="button">Supprimer le filtre</a> <a href="{{ filter.get_url_without_filters }}" role="button">Supprimer le filtre</a>

View File

@ -22,10 +22,6 @@ Semaine du {{ calendar.calendar_days_list.0.date|date|frdate }}
{% block content %} {% block content %}
{% if home %}
<article>{% include "agenda_culturel/static_content.html" with name="home" url_path="/" %}</article>
{% endif %}
{% include "agenda_culturel/filter-inc.html" with filter=filter %} {% include "agenda_culturel/filter-inc.html" with filter=filter %}

View File

@ -40,7 +40,7 @@
</ul> </ul>
</div> </div>
<nav class="container-fluid"> <nav class="container-fluid">
<ul> <ul class="menu-droite">
<li> <li>
<a href="{% url 'home' %}" aria-label="Retour accueil"> <a href="{% url 'home' %}" aria-label="Retour accueil">
<img src="{% static 'images/favicon.svg' %}" /> <img src="{% static 'images/favicon.svg' %}" />

View File

@ -216,7 +216,7 @@ def show_legend(filter):
current_url = filter.get_url_without_filters() current_url = filter.get_url_without_filters()
cats = Category.objects.all() cats = Category.objects.all()
if filter.is_active(only_categories=True): if filter.is_active(only_categories=True):
return mark_safe( return mark_safe("<div>" +
" ".join( " ".join(
[ [
small_cat( small_cat(
@ -228,11 +228,11 @@ def show_legend(filter):
) )
for c in cats for c in cats
] ]
) ) + "</div>"
) )
else: else:
return mark_safe( return mark_safe("<div>" +
" ".join( " ".join(
[small_cat(c, current_url + "?category=" + str(c.pk)) for c in cats] [small_cat(c, current_url + "?category=" + str(c.pk)) for c in cats]
) ) + "</div>"
) )