From eb63cf7c02ad2ef3356e20a1bd77be888a0cbc43 Mon Sep 17 00:00:00 2001 From: Jesper Pedersen Date: Mon, 6 May 2024 14:33:16 +0200 Subject: [PATCH] 1308: Only use collapse on sidebar when on mobile. --- web/themes/custom/cfia/css/style.css | 16 +++++++++++++++- .../templates/block/_sidebar-block.html.twig | 5 ++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/web/themes/custom/cfia/css/style.css b/web/themes/custom/cfia/css/style.css index 093772798..107dc0435 100644 --- a/web/themes/custom/cfia/css/style.css +++ b/web/themes/custom/cfia/css/style.css @@ -289,7 +289,12 @@ a:hover, .link:hover { } .sidebar button.collapsed i { - transform: rotate(180deg); + display: none; + /*transform: rotate(180deg);*/ +} + +.sidebar .collapse:not(.show){ + display: block; } /* Blockquotes */ @@ -397,4 +402,13 @@ a:hover, .link:hover { max-height: 10vh; width: auto; } + + .sidebar button.collapsed i { + display: block; + transform: rotate(180deg); + } + + .sidebar .collapse:not(.show){ + display: none; + } } diff --git a/web/themes/custom/cfia/templates/block/_sidebar-block.html.twig b/web/themes/custom/cfia/templates/block/_sidebar-block.html.twig index 6c67f0e9d..b88974074 100644 --- a/web/themes/custom/cfia/templates/block/_sidebar-block.html.twig +++ b/web/themes/custom/cfia/templates/block/_sidebar-block.html.twig @@ -1,5 +1,4 @@
- {% set accordionTarget = elements['#plugin_id']|clean_class %} {{ title_prefix }} @@ -7,13 +6,13 @@
{# Sidebar widget title #} {{ label }} -
{% endif %} {{ title_suffix }} -
+
{% block content %} {{ content }}