mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-12-03 12:43:05 +00:00
menu: replace clumsy expand implementation #955
This commit is contained in:
parent
62b52bb868
commit
39fcbb3283
3 changed files with 8 additions and 11 deletions
|
@ -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);
|
||||
|
|
|
@ -190,7 +190,7 @@
|
|||
{{- $entryId := md5 .Path }}
|
||||
{{- $isOpen := or $currentAlwaysopen $isSelf $isAncestor }}
|
||||
<li class="{{if $isActive }}active {{end}}{{if (or $isSelf $isAncestor) }}parent {{end}}{{if $isHidden }}hidden {{end}}{{if not $url }}headless {{end}}{{if $currentAlwaysopen}}alwaysopen {{end}}" data-nav-id="{{ $url }}">
|
||||
{{- if $isCollapsible }}<input type="checkbox" id="R-section-{{ $entryId }}" aria-controls="R-subsections-{{ $entryId }}"{{ if $isOpen }} checked{{ end }}><label for="R-section-{{ $entryId }}"><i class="fa-fw fas fa-chevron-down"></i><i class="fa-fw fas fa-chevron-right"></i><span class="a11y-only">{{ T "Submenu" $title }}</span></label>{{ end }}
|
||||
{{- if $isCollapsible }}<input type="checkbox" id="R-section-{{ $entryId }}" aria-controls="R-subsections-{{ $entryId }}"{{ if $isOpen }} checked{{ end }}><label for="R-section-{{ $entryId }}"><i class="fa-fw fas fa-chevron-right"></i><span class="a11y-only">{{ T "Submenu" $title }}</span></label>{{ end }}
|
||||
{{- if $url }}<a class="padding" href="{{ $url }}"{{ if gt (len $target) 0 }} target="{{ $target }}"{{ end }}>{{ else }}<span class="padding">{{ end }}
|
||||
{{- $pre }}{{ $title }}{{ $post }}
|
||||
{{- if $url }}{{ if $showvisitedlinks }}<i class="fa-fw fas fa-check read-icon"></i>{{ end }}</a>{{ else }}</span>{{ end }}<ul id="R-subsections-{{ $entryId }}" class="collapsible-menu">
|
||||
|
@ -324,7 +324,7 @@
|
|||
{{- $entryId := md5 (print .) }}
|
||||
{{- $isOpen := or $currentAlwaysopen $isSelf $isAncestor }}
|
||||
<li class="{{if $isActive }}active {{end}}{{if (or $isSelf $isAncestor) }}parent {{end}}{{if $isHidden }}hidden {{end}}{{if not $url }}headless {{end}}{{if $currentAlwaysopen}}alwaysopen {{end}}" data-nav-id="{{ $url }}">
|
||||
{{- if $isCollapsible }}<input type="checkbox" id="R-section-{{ $entryId }}" aria-controls="R-subsections-{{ $entryId }}"{{ if $isOpen }} checked{{ end }}><label for="R-section-{{ $entryId }}"><i class="fa-fw fas fa-chevron-down"></i><i class="fa-fw fas fa-chevron-right"></i><span class="a11y-only">{{ T "Submenu" $title }}</span></label>{{ end }}
|
||||
{{- if $isCollapsible }}<input type="checkbox" id="R-section-{{ $entryId }}" aria-controls="R-subsections-{{ $entryId }}"{{ if $isOpen }} checked{{ end }}><label for="R-section-{{ $entryId }}"><i class="fa-fw fas fa-chevron-right"></i><span class="a11y-only">{{ T "Submenu" $title }}</span></label>{{ end }}
|
||||
{{- if $url }}<a class="padding" href="{{ $url }}"{{ if gt (len $target) 0 }} target="{{ $target }}"{{ end }}>{{ else }}<span class="padding">{{ end }}
|
||||
{{- $pre }}{{ $title }}{{ $post }}
|
||||
{{- if $url }}{{ if $showvisitedlinks }}<i class="fa-fw fas fa-check read-icon"></i>{{ end }}</a>{{ else }}</span>{{ end }}<ul id="R-subsections-{{ $entryId }}" class="collapsible-menu">
|
||||
|
|
|
@ -1 +1 @@
|
|||
7.1.1+bda57027b3c9f782f73a1b088ab021cf9b47a29d
|
||||
7.1.1+62b52bb8680225e7de2ff0442813709ae1e14bc0
|
Loading…
Reference in a new issue