From 39fcbb328323656eda3acf6911adb446bd439fe5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Sat, 30 Nov 2024 19:55:10 +0100 Subject: [PATCH] menu: replace clumsy expand implementation #955 --- assets/css/theme.css | 13 +++++-------- layouts/partials/menu.html | 4 ++-- layouts/partials/version.txt | 2 +- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/assets/css/theme.css b/assets/css/theme.css index 128787d8cf..baf462c7d4 100644 --- a/assets/css/theme.css +++ b/assets/css/theme.css @@ -2380,9 +2380,6 @@ article ul > li > input[type='checkbox']:checked::before { display: none; } -#R-sidebar ul.collapsible-menu > li > input + label > .fa-chevron-down { - display: none; -} #R-sidebar ul.collapsible-menu > li > input + label > .fa-chevron-right { display: inline-block; } @@ -2393,18 +2390,18 @@ article ul > li > input[type='checkbox']:checked::before { display: block; } -#R-sidebar ul.collapsible-menu > li > input:checked + label > .fa-chevron-down { - display: inline-block; -} #R-sidebar ul.collapsible-menu > li > input:checked + label > .fa-chevron-right { - display: none; + transform: rotate(90deg); } /* adjust menu for RTL reading direction */ -html[dir='rtl'] #R-sidebar ul.collapsible-menu > li > label > i.fa-chevron-right { +html[dir='rtl'] #R-sidebar ul.collapsible-menu > li > input + label > i.fa-chevron-right { transform: scaleX(-1); } +html[dir='rtl'] #R-sidebar ul.collapsible-menu > li > input:checked + label > i.fa-chevron-right { + transform: rotate(90deg); +} a#R-logo { color: var(--MENU-SECTIONS-BG-color); diff --git a/layouts/partials/menu.html b/layouts/partials/menu.html index 1b1ded1207..6b8fcaf6ac 100644 --- a/layouts/partials/menu.html +++ b/layouts/partials/menu.html @@ -190,7 +190,7 @@ {{- $entryId := md5 .Path }} {{- $isOpen := or $currentAlwaysopen $isSelf $isAncestor }}
  • - {{- if $isCollapsible }}{{ end }} + {{- if $isCollapsible }}{{ end }} {{- if $url }}{{ else }}{{ end }} {{- $pre }}{{ $title }}{{ $post }} {{- if $url }}{{ if $showvisitedlinks }}{{ end }}{{ else }}{{ end }}