diff --git a/docs b/docs index 4c004b1f..ead0f88b 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 4c004b1f6bc1c57673d03c66665d23209a7b22ee +Subproject commit ead0f88b2229823a0b1440882f5c63d0edecf2de diff --git a/hugo.toml b/hugo.toml index 4faed296..15505493 100644 --- a/hugo.toml +++ b/hugo.toml @@ -106,6 +106,8 @@ enableEmoji = true enablePWA = false # FixIt 0.2.14 | NEW whether to add external Icon for external links automatically externalIcon = false + # FixIt 0.3.0 | NEW whether to reverse the order of the navigation menu + navigationReverse = false # FixIt 0.2.14 | NEW FixIt will, by default, inject a theme meta tag in the HTML head on the home page only. # You can turn it off, but we would really appreciate if you don’t, as this is a good way to watch FixIt's popularity on the rise. disableThemeInject = false diff --git a/layouts/partials/single/collection-list.html b/layouts/partials/single/collection-list.html index 232f02ed..8c2560d5 100644 --- a/layouts/partials/single/collection-list.html +++ b/layouts/partials/single/collection-list.html @@ -5,6 +5,8 @@ {{- $collectionTerms := .GetTerms "collections" -}} {{- range $collectionTerms -}} {{- $pages := .Pages -}} + {{- $prev := cond $.Site.Params.navigationReverse ($pages.Next $) ($pages.Prev $) -}} + {{- $next := cond $.Site.Params.navigationReverse ($pages.Prev $) ($pages.Next $) -}} {{- $open := eq (index $collectionTerms 0) . -}} {{- $currentKey := 0 -}} @@ -30,7 +32,7 @@ {{- end -}}
- {{- with $pages.Prev $ -}} + {{- with $prev -}} @@ -38,7 +40,7 @@ {{- dict "Class" "fa-solid fa-angle-left fa-fw collection-nav-item text-secondary" | partial "plugin/icon.html" -}} {{- end -}} {{ sub $pages.Len $currentKey }}/{{ $pages.Len }} - {{- with $pages.Next $ -}} + {{- with $next -}} diff --git a/layouts/partials/single/collection-nav.html b/layouts/partials/single/collection-nav.html index c4ddfaa1..cd1cfe5d 100644 --- a/layouts/partials/single/collection-nav.html +++ b/layouts/partials/single/collection-nav.html @@ -15,13 +15,15 @@ {{ dict "Collections" $termLink | T "single.includedIn.collections" | safeHTML }} {{ .Pages.Len }}
- {{- with .Pages.Prev $ -}} + {{- $prev := cond $.Site.Params.navigationReverse (.Pages.Next $) (.Pages.Prev $) -}} + {{- $next := cond $.Site.Params.navigationReverse (.Pages.Prev $) (.Pages.Next $) -}} + {{- with $prev -}} {{- end -}} - {{- with .Pages.Next $ -}} + {{- with $next -}}
{{- end -}} - {{ with .Next }} + {{ with $next }}