feat: update sorting auto generated menus
This commit is contained in:
parent
a927710685
commit
7a7c4d75ea
|
@ -3,7 +3,7 @@
|
||||||
{{ $currentPage := . -}}
|
{{ $currentPage := . -}}
|
||||||
{{ $section := $currentPage.Section -}}
|
{{ $section := $currentPage.Section -}}
|
||||||
{{ range (where .Site.Sections "Section" "in" $section) }}
|
{{ range (where .Site.Sections "Section" "in" $section) }}
|
||||||
{{ range .Sections.Reverse }}
|
{{ range .Sections.ByWeight.Reverse }}
|
||||||
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
|
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
|
||||||
<li class="mb-1">
|
<li class="mb-1">
|
||||||
<button class="btn btn-toggle align-items-center rounded collapsed" data-bs-toggle="collapse" data-bs-target="#section-{{ md5 .Title }}" aria-expanded="{{ if $active }}true{{ else }}false{{ end }}">
|
<button class="btn btn-toggle align-items-center rounded collapsed" data-bs-toggle="collapse" data-bs-target="#section-{{ md5 .Title }}" aria-expanded="{{ if $active }}true{{ else }}false{{ end }}">
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{{ $currentPage := . -}}
|
{{ $currentPage := . -}}
|
||||||
{{ $section := $currentPage.Section -}}
|
{{ $section := $currentPage.Section -}}
|
||||||
{{ range (where .Site.Sections "Section" "in" $section) }}
|
{{ range (where .Site.Sections "Section" "in" $section) }}
|
||||||
{{ range .Sections.Reverse }}
|
{{ range .Sections.ByWeight.Reverse }}
|
||||||
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
|
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
|
||||||
<h3 class="h6 text-uppercase mb-2">{{ .Title }}</h3>
|
<h3 class="h6 text-uppercase mb-2">{{ .Title }}</h3>
|
||||||
<ul class="list-unstyled">
|
<ul class="list-unstyled">
|
||||||
|
|
Loading…
Reference in New Issue