mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 01:33:04 +00:00
arrow-nav: wildspace
This commit is contained in:
parent
c2731993b8
commit
dff23d89b4
1 changed files with 19 additions and 19 deletions
|
@ -26,29 +26,29 @@
|
|||
{{end}}
|
||||
{{ $currentNode.Scratch.Set "prevPageTmp" .menu }}
|
||||
|
||||
{{ $currentNode.Scratch.Set "pages" .menu.Pages }}
|
||||
{{ if .menu.IsHome}}
|
||||
{{ $currentNode.Scratch.Set "pages" .menu.Sections }}
|
||||
{{ else if .menu.Sections}}
|
||||
{{ $currentNode.Scratch.Set "pages" (.menu.Pages | union .menu.Sections) }}
|
||||
{{end}}
|
||||
{{ $pages := ($currentNode.Scratch.Get "pages") }}
|
||||
{{ $currentNode.Scratch.Set "pages" .menu.Pages }}
|
||||
{{ if .menu.IsHome}}
|
||||
{{ $currentNode.Scratch.Set "pages" .menu.Sections }}
|
||||
{{ else if .menu.Sections}}
|
||||
{{ $currentNode.Scratch.Set "pages" (.menu.Pages | union .menu.Sections) }}
|
||||
{{end}}
|
||||
{{ $pages := ($currentNode.Scratch.Get "pages") }}
|
||||
|
||||
{{ range $pages.ByWeight }}
|
||||
{{ template "menu-nextprev" dict "menu" . "currentnode" $currentNode }}
|
||||
{{end}}
|
||||
{{ range $pages.ByWeight }}
|
||||
{{ template "menu-nextprev" dict "menu" . "currentnode" $currentNode }}
|
||||
{{end}}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{$showPrevNext := (and (not .Params.disableNextPrev) (not .Site.Params.disableNextPrev))}}
|
||||
{{if $showPrevNext}}
|
||||
{{with ($.Scratch.Get "prevPage")}}
|
||||
<a class="nav nav-prev" href="{{.RelPermalink}}" title="{{.Title}}"> <i class="fa fa-chevron-left"></i></a>
|
||||
{{end}}
|
||||
{{with ($.Scratch.Get "nextPage")}}
|
||||
<a class="nav nav-next" href="{{.RelPermalink}}" title="{{.Title}}" style="margin-right: 0px;"><i class="fa fa-chevron-right"></i></a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{$showPrevNext := (and (not .Params.disableNextPrev) (not .Site.Params.disableNextPrev))}}
|
||||
{{if $showPrevNext}}
|
||||
{{with ($.Scratch.Get "prevPage")}}
|
||||
<a class="nav nav-prev" href="{{.RelPermalink}}" title="{{.Title}}"> <i class="fa fa-chevron-left"></i></a>
|
||||
{{end}}
|
||||
{{with ($.Scratch.Get "nextPage")}}
|
||||
<a class="nav nav-next" href="{{.RelPermalink}}" title="{{.Title}}" style="margin-right: 0px;"><i class="fa fa-chevron-right"></i></a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
|
Loading…
Reference in a new issue