mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 01:33:04 +00:00
Merge pull request #184 from cloudreach/willwade-master
RETRY - Params to turn off next/previous page - and breadcrumb
This commit is contained in:
commit
8726b9b02d
4 changed files with 21 additions and 9 deletions
|
@ -13,8 +13,8 @@ defaultContentLanguageInSubdir= true
|
|||
description = "Documentation for Hugo Learn Theme"
|
||||
author = "Mathieu Cornic"
|
||||
showVisitedLinks = true
|
||||
disableBreadcrumb = true
|
||||
disableNextPrev = true
|
||||
disableBreadcrumb = false
|
||||
disableNextPrev = false
|
||||
|
||||
[outputs]
|
||||
home = [ "HTML", "RSS", "JSON"]
|
||||
|
|
|
@ -33,6 +33,10 @@ Note that some of these parameters are explained in details in other sections of
|
|||
disableShortcutsTitle = false
|
||||
# When using mulitlingual website, disable the switch language button.
|
||||
disableLanguageSwitchingButton = false
|
||||
# Hide breadcrumbs in the header and only show the current page title
|
||||
disableBreadcrumb = true
|
||||
# Hide Next and Previous page buttons normally displayed full height beside content
|
||||
disableNextPrev = true
|
||||
# Order sections in menu by "weight" or "title". Default to "weight"
|
||||
ordersectionsby = "weight"
|
||||
# Change default color scheme with a variant one. Can be "red", "blue", "green".
|
||||
|
|
|
@ -40,12 +40,15 @@
|
|||
{{ end }}
|
||||
|
||||
|
||||
{{with ($.Scratch.Get "prevPage")}}
|
||||
<a class="nav nav-prev" href="{{.URL}}" title="{{.Title}}"> <i class="fas 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="fas fa-chevron-right"></i></a>
|
||||
{{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,12 @@
|
|||
<span id="toc-menu"><i class="fas fa-list-alt"></i></span>
|
||||
{{ end }}
|
||||
<span class="links">
|
||||
{{$showBreadcrumb := (and (not .Params.disableBreadcrumb) (not .Site.Params.disableBreadcrumb))}}
|
||||
{{if $showBreadcrumb}}
|
||||
{{ template "breadcrumb" dict "page" . "value" .Title }}
|
||||
{{ else }}
|
||||
{{ .Title }}
|
||||
{{ end }}
|
||||
</span>
|
||||
</div>
|
||||
{{ if $toc }}
|
||||
|
|
Loading…
Reference in a new issue