diff --git a/src/agenda_culturel/static/style.scss b/src/agenda_culturel/static/style.scss index 7640c1d..d099d34 100644 --- a/src/agenda_culturel/static/style.scss +++ b/src/agenda_culturel/static/style.scss @@ -124,11 +124,28 @@ details[role="list"] summary + ul li.selected>a:hover { #filters { .categories { - text-align: center; - line-height: 2.8em; [data-tooltip]::before, [data-tooltip]::after { display: none; } + + .developpe, .non-developpe { + background: var(--primary-focus); + color: var(--contrast); + border-radius: 1.3em; + height: 2.4em; + padding: 0.1em .2em; + .titre { + vertical-align: middle; + margin-right: .4em; + } + display: inline-block; + margin: .1em 0; + } + .non-developpe { + background: none; + padding: 0.1em 0; + } + } .suggested-tags { font-size: 80%; @@ -188,12 +205,11 @@ details[role="list"] summary + ul li.selected>a:hover { height: 2.6em; width: 2.6em; border-radius: 1.3em; - line-height: 2.4em; + line-height: 2.2em; img { - width: 80%; - margin: .2em 0; + width: 70%; + margin: .4em 0; } - overflow: hidden; } .reduced { diff --git a/src/agenda_culturel/templatetags/cat_extra.py b/src/agenda_culturel/templatetags/cat_extra.py index c9bd70d..b9b3e4c 100644 --- a/src/agenda_culturel/templatetags/cat_extra.py +++ b/src/agenda_culturel/templatetags/cat_extra.py @@ -214,7 +214,7 @@ def circle_cat(category, recurrence=False): '' ) -def legend_cat(category, url, selected=True, first=False): +def legend_cat(category, url, selected=True, first=False, with_title=False): c = category.css_class() n = category.name class_reduced = '' if selected else 'reduced' @@ -227,13 +227,18 @@ def legend_cat(category, url, selected=True, first=False): prefix = "ajouter " if category.pictogram: - return mark_safe( - '' + '' + category.name + '' - ) + result = '' + '' + category.name + '' else: - return mark_safe( - '' - ) + result = '' + + if with_title and selected: + result = '
' + result + ' ' + n + '
' + else: + result = '
' + result + '
' + + result = '' + result + '' + + return mark_safe(result) @register.simple_tag @@ -250,6 +255,7 @@ def show_legend(filter): if not filter.is_selected(c) else filter.get_url_remove_categories([c.pk]), selected=filter.is_selected(c), + with_title=True ) for c in cats ]