diff --git a/src/agenda_culturel/static/style.scss b/src/agenda_culturel/static/style.scss index 4c817ef..7ea7db9 100644 --- a/src/agenda_culturel/static/style.scss +++ b/src/agenda_culturel/static/style.scss @@ -106,6 +106,9 @@ details { } details summary[role="button"] { color: var(--primary-inverse); + [role="button"] { + margin: -0.2em 0; + } } details[role="list"] summary + ul li.selected>a{ @@ -118,6 +121,36 @@ details[role="list"] summary + ul li.selected>a:hover { color: var(--primary-inverse); } + +@media (min-width: 992px) { + #filters .categories { + width: 75%; + float: left; + } + #filters details { + width: 25%; + float: right; + summary { + padding: 0.2em 0.4em; + } + } + +} + +#filters details[open=""] { + width: 100%; + transition: width 0.1s ease-in-out; + display: block; + summary { + padding: var(--form-element-spacing-vertical) var(--form-element-spacing-horizontal); + margin-top: 0.5em; + } +} + +#filters .clear { + clear: both; +} + #main-nav { box-shadow: 0 1px 0 rgba(115, 130, 140, 0.2); } @@ -136,6 +169,14 @@ span.small-cat { cursor: default; } +.simple-button { + @extend .small-cat; + border-radius: 1em; + font-size: 80%; + margin-left: .5em; + padding: .1em .5em; +} + svg { vertical-align: -0.125em; } diff --git a/src/agenda_culturel/templates/agenda_culturel/filter-inc.html b/src/agenda_culturel/templates/agenda_culturel/filter-inc.html index 2b7d162..34a33de 100644 --- a/src/agenda_culturel/templates/agenda_culturel/filter-inc.html +++ b/src/agenda_culturel/templates/agenda_culturel/filter-inc.html @@ -2,38 +2,45 @@ {% load tag_extra %} {% load utils_extra %} +
+
+
+ {% show_legend filter=filter %} +
+
- - {% if filter.is_active %} - Filtre : - {% for c in filter.get_categories %} - {{ c | small_cat }} - {% endfor %} - {% for t in filter.get_tags %} - {{ t | tag_button }} - {% endfor %} - {% for t in filter.get_exclude_tags %} - {{ t | tag_button_strike }} - {% endfor %} - {% for s in filter.get_status_names %} - {{ s }} - {% endfor %} - {% for c in filter.get_cities %} - {{ c }} - {% endfor %} - {{ filter.get_recurrence_filtering }} - {% else %} - Filtrer - {% endif %} - -
- {{ filter.form.as_p }}
- -
-
-{% if filter.is_resetable %} -{% picto_from_name "x-circle" %} Supprimer le filtre -{% endif %} + + {% if filter.is_active %} + Autres filtres : + {% for t in filter.get_tags %} + {{ t | tag_button }} + {% endfor %} + {% for t in filter.get_exclude_tags %} + {{ t | tag_button_strike }} + {% endfor %} + {% for s in filter.get_status_names %} + {{ s }} + {% endfor %} + {% for c in filter.get_cities %} + {{ c }} + {% endfor %} + {{ filter.get_recurrence_filtering }} + {% else %} + Autres filtres + {% endif %} + + {% if filter.is_resetable %} + {% picto_from_name "x-circle" %} + {% endif %} + + +
+ {{ filter.form.as_p }} + +
+ +
+
diff --git a/src/agenda_culturel/templates/agenda_culturel/page-day.html b/src/agenda_culturel/templates/agenda_culturel/page-day.html index 341b1f6..23c2dfc 100644 --- a/src/agenda_culturel/templates/agenda_culturel/page-day.html +++ b/src/agenda_culturel/templates/agenda_culturel/page-day.html @@ -22,12 +22,13 @@ {% block content %} - + {% get_current_language as LANGUAGE_CODE %} {% with cache_timeout=user.is_authenticated|yesno:"30,600" %} {% cache cache_timeout day user.is_authenticated day filter.to_str LANGUAGE_CODE %} - + + {% include "agenda_culturel/filter-inc.html" with filter=filter %} @@ -89,10 +90,10 @@