diff --git a/src/agenda_culturel/static/js/modal.js b/src/agenda_culturel/static/js/modal.js index 0182a5d..08179b3 100644 --- a/src/agenda_culturel/static/js/modal.js +++ b/src/agenda_culturel/static/js/modal.js @@ -34,11 +34,17 @@ const openModal = (modal, back=true) => { } setTimeout(function() { visibleModal = modal; - }, 500); + + console.log("ici"); + const mask = visibleModal.querySelector(".h-mask"); + mask.classList.add("visible"); + }, 250); }; const hideModal = (modal) => { if (modal != null) { + const mask = visibleModal.querySelector(".h-mask"); + mask.classList.remove("visible"); visibleModal = null; document.documentElement.style.removeProperty("--scrollbar-width"); modal.removeAttribute("open"); diff --git a/src/agenda_culturel/static/style.scss b/src/agenda_culturel/static/style.scss index 89ed54a..35dbb8f 100644 --- a/src/agenda_culturel/static/style.scss +++ b/src/agenda_culturel/static/style.scss @@ -44,6 +44,9 @@ $enable-responsive-typography: true; // Modal () --modal-overlay-backdrop-filter: blur(0.05rem); + --background-color-transparent: color-mix(in srgb, var(--background-color), transparent 30%); + + --background-color-transparent-light: color-mix(in srgb, var(--background-color), transparent 80%); } @@ -1705,3 +1708,24 @@ label.required::after { } } } +.h-image { + background-repeat: no-repeat; + background-size: cover; + background-position: center, center; +} + +dialog { + .h-mask { + background-color: var(--background-color); + margin: calc(var(--spacing) * -1.5); + padding: calc(var(--spacing) * 1.5); + } + .h-mask.visible { + background-color: var(--background-color-transparent); + transition: background-color .8s linear; + } + .h-mask.visible:hover { + background-color: var(--background-color-transparent-light); + } +} + diff --git a/src/agenda_culturel/templates/agenda_culturel/page-week.html b/src/agenda_culturel/templates/agenda_culturel/page-week.html index e56dd92..f4812d1 100644 --- a/src/agenda_culturel/templates/agenda_culturel/page-week.html +++ b/src/agenda_culturel/templates/agenda_culturel/page-week.html @@ -96,7 +96,12 @@ {{ event|tw_badge }}
-
+ {% if event.has_image_url %} +
+ {% else %} +
+ {% endif %} +
{{ event.description |linebreaks }}
diff --git a/src/agenda_culturel/templatetags/cat_extra.py b/src/agenda_culturel/templatetags/cat_extra.py index a73e5ad..3499738 100644 --- a/src/agenda_culturel/templatetags/cat_extra.py +++ b/src/agenda_culturel/templatetags/cat_extra.py @@ -86,12 +86,6 @@ def css_categories(): ) result += "}" - result += "*:hover>." + c["css_class"] + " {" - result += background_color_adjust_color( - adjust_lightness_saturation(c["color"], 0.02, 1.0) - ) - result += "}" - result += "." + c["css_class"] + ".circ-cat, " result += "form ." + c["css_class"] + ", " result += ".selected ." + c["css_class"] + " {"