mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-02-18 17:50:06 +00:00
changes so can now use page params as well as site
This commit is contained in:
parent
6d6fde35b9
commit
a29add8d5e
2 changed files with 12 additions and 9 deletions
|
@ -39,14 +39,16 @@
|
|||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{if ne .Site.Params.disableNextPrev true }}
|
||||
{{with ($.Scratch.Get "prevPage")}}
|
||||
<a class="nav nav-prev" href="{{.URL}}" title="{{.Title}}"> <i class="fa fa-chevron-left"></i></a>
|
||||
{{end}}
|
||||
{{with ($.Scratch.Get "nextPage")}}
|
||||
<a class="nav nav-next" href="{{.URL}}" 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="{{.URL}}" title="{{.Title}}"> <i class="fa fa-chevron-left"></i></a>
|
||||
{{end}}
|
||||
{{with ($.Scratch.Get "nextPage")}}
|
||||
<a class="nav nav-next" href="{{.URL}}" title="{{.Title}}" style="margin-right: 0px;"><i class="fa fa-chevron-right"></i></a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
|
|
@ -66,7 +66,8 @@
|
|||
<span id="toc-menu"><i class="fa fa-list-alt"></i></span>
|
||||
{{ end }}
|
||||
<span class="links">
|
||||
{{if ne .Site.Params.disableBreadcrumb true}}
|
||||
{{$showBreadcrumb := (and (not .Params.disableBreadcrumb) (not .Site.Params.disableBreadcrumb))}}
|
||||
{{if $showBreadcrumb}}
|
||||
{{ template "breadcrumb" dict "page" . "value" .Title }}
|
||||
{{ else }}
|
||||
{{ .Title }}
|
||||
|
|
Loading…
Add table
Reference in a new issue