diff options
author | Henk Verlinde <henk@ventizo.com> | 2022-07-05 10:09:49 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-05 10:09:49 +0300 |
commit | aa340404e93fcc409a4644847d8d82980bccc1e3 (patch) | |
tree | 309ba6ecdf31ce4e0f28081826e44b44b566fead | |
parent | 6141948beac64f4f70486f1e7297dff557b64f3c (diff) | |
parent | 21ba62dcc809138b4bc6185b46d5e924d8d46047 (diff) |
Merge pull request #796 from james-d-elliott/fix-menus-sort
fix(menus): sort pages and sections by default order
-rw-r--r-- | content/en/docs/help/_index.md | 1 | ||||
-rw-r--r-- | content/en/docs/prologue/_index.md | 1 | ||||
-rw-r--r-- | layouts/partials/sidebar/auto-collapsible-menu.html | 4 | ||||
-rw-r--r-- | layouts/partials/sidebar/auto-default-menu.html | 2 |
4 files changed, 5 insertions, 3 deletions
diff --git a/content/en/docs/help/_index.md b/content/en/docs/help/_index.md index bc503ec..b5763a3 100644 --- a/content/en/docs/help/_index.md +++ b/content/en/docs/help/_index.md @@ -6,4 +6,5 @@ date: 2020-10-06T08:49:15+00:00 lastmod: 2020-10-06T08:49:15+00:00 draft: false images: [] +weight: 600 --- diff --git a/content/en/docs/prologue/_index.md b/content/en/docs/prologue/_index.md index c3c1c40..d6b467c 100644 --- a/content/en/docs/prologue/_index.md +++ b/content/en/docs/prologue/_index.md @@ -6,4 +6,5 @@ date: 2020-10-06T08:48:45+00:00 lastmod: 2020-10-06T08:48:45+00:00 draft: false images: [] +weight: 100 --- diff --git a/layouts/partials/sidebar/auto-collapsible-menu.html b/layouts/partials/sidebar/auto-collapsible-menu.html index 3eaa2f6..4600d0a 100644 --- a/layouts/partials/sidebar/auto-collapsible-menu.html +++ b/layouts/partials/sidebar/auto-collapsible-menu.html @@ -3,7 +3,7 @@ {{ $currentPage := . -}} {{ $section := $currentPage.Section -}} {{ range (where .Site.Sections "Section" "in" $section) }} - {{ range .Sections.ByWeight.Reverse }} + {{ range .Sections }} {{ $active := in $currentPage.RelPermalink .RelPermalink }} <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 }}"> @@ -54,4 +54,4 @@ </li> {{ end }} {{ end }} -</ul>
\ No newline at end of file +</ul> diff --git a/layouts/partials/sidebar/auto-default-menu.html b/layouts/partials/sidebar/auto-default-menu.html index b46bb5a..6e4565b 100644 --- a/layouts/partials/sidebar/auto-default-menu.html +++ b/layouts/partials/sidebar/auto-default-menu.html @@ -2,7 +2,7 @@ {{ $currentPage := . -}} {{ $section := $currentPage.Section -}} {{ range (where .Site.Sections "Section" "in" $section) }} - {{ range .Sections.ByWeight.Reverse }} + {{ range .Sections }} {{ $active := in $currentPage.RelPermalink .RelPermalink }} <h3 class="h6 text-uppercase mb-2">{{ .Title }}</h3> <ul class="list-unstyled"> |