mirror of
https://github.com/McShelby/hugo-theme-relearn
synced 2025-04-30 23:23:32 +08: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
@ -13,8 +13,8 @@ defaultContentLanguageInSubdir= true
|
|||||||
description = "Documentation for Hugo Learn Theme"
|
description = "Documentation for Hugo Learn Theme"
|
||||||
author = "Mathieu Cornic"
|
author = "Mathieu Cornic"
|
||||||
showVisitedLinks = true
|
showVisitedLinks = true
|
||||||
disableBreadcrumb = true
|
disableBreadcrumb = false
|
||||||
disableNextPrev = true
|
disableNextPrev = false
|
||||||
|
|
||||||
[outputs]
|
[outputs]
|
||||||
home = [ "HTML", "RSS", "JSON"]
|
home = [ "HTML", "RSS", "JSON"]
|
||||||
|
@ -33,6 +33,10 @@ Note that some of these parameters are explained in details in other sections of
|
|||||||
disableShortcutsTitle = false
|
disableShortcutsTitle = false
|
||||||
# When using mulitlingual website, disable the switch language button.
|
# When using mulitlingual website, disable the switch language button.
|
||||||
disableLanguageSwitchingButton = false
|
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"
|
# Order sections in menu by "weight" or "title". Default to "weight"
|
||||||
ordersectionsby = "weight"
|
ordersectionsby = "weight"
|
||||||
# Change default color scheme with a variant one. Can be "red", "blue", "green".
|
# Change default color scheme with a variant one. Can be "red", "blue", "green".
|
||||||
|
@ -40,12 +40,15 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
||||||
{{with ($.Scratch.Get "prevPage")}}
|
{{$showPrevNext := (and (not .Params.disableNextPrev) (not .Site.Params.disableNextPrev))}}
|
||||||
<a class="nav nav-prev" href="{{.URL}}" title="{{.Title}}"> <i class="fas fa-chevron-left"></i></a>
|
{{if $showPrevNext}}
|
||||||
{{end}}
|
{{with ($.Scratch.Get "prevPage")}}
|
||||||
{{with ($.Scratch.Get "nextPage")}}
|
<a class="nav nav-prev" href="{{.URL}}" title="{{.Title}}"> <i class="fa fa-chevron-left"></i></a>
|
||||||
<a class="nav nav-next" href="{{.URL}}" title="{{.Title}}" style="margin-right: 0px;"><i class="fas fa-chevron-right"></i></a>
|
{{end}}
|
||||||
{{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>
|
</div>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
@ -66,7 +66,12 @@
|
|||||||
<span id="toc-menu"><i class="fas fa-list-alt"></i></span>
|
<span id="toc-menu"><i class="fas fa-list-alt"></i></span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<span class="links">
|
<span class="links">
|
||||||
|
{{$showBreadcrumb := (and (not .Params.disableBreadcrumb) (not .Site.Params.disableBreadcrumb))}}
|
||||||
|
{{if $showBreadcrumb}}
|
||||||
{{ template "breadcrumb" dict "page" . "value" .Title }}
|
{{ template "breadcrumb" dict "page" . "value" .Title }}
|
||||||
|
{{ else }}
|
||||||
|
{{ .Title }}
|
||||||
|
{{ end }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
{{ if $toc }}
|
{{ if $toc }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user