mirror of
https://github.com/davegallant/davegallant.github.io.git
synced 2025-08-07 00:58:13 +00:00
47 lines
1.3 KiB
HTML
47 lines
1.3 KiB
HTML
{{- $config := ( .Site.Params.settings.hideEntryNavigation ) -}}
|
|
{{- $configType := ( printf "%T" $config ) -}}
|
|
|
|
{{- if ( eq $configType "bool" ) -}}
|
|
{{- $.Scratch.Set "showEntryNav" ( not $config ) -}}
|
|
{{- else -}}
|
|
{{- $.Scratch.Set "showEntryNav" ( not ( in $config .Section ) ) -}}
|
|
{{- end -}}
|
|
|
|
{{- if ( $.Scratch.Get "showEntryNav" ) -}}
|
|
|
|
{{ if gt ( len ( where .Site.RegularPages "Section" .Section ) ) 1 }}
|
|
<nav class='entry-nav'>
|
|
<div class='container'>
|
|
|
|
{{- if .PrevInSection -}}
|
|
<div class='prev-entry sep-before'>
|
|
<a href='{{ .PrevInSection.Permalink | relURL }}'>
|
|
<span aria-hidden='true'>
|
|
{{- partial "svg/icon" "prev" -}}
|
|
{{- print " " ( i18n "previous" ) -}}
|
|
</span>
|
|
<span class='screen-reader-text'>{{ i18n "previousPost" }}: </span>
|
|
{{- .PrevInSection.Title -}}
|
|
</a>
|
|
</div>
|
|
{{- end -}}
|
|
|
|
{{- if .NextInSection -}}
|
|
<div class='next-entry sep-before'>
|
|
<a href='{{ .NextInSection.Permalink | relURL }}'>
|
|
<span class='screen-reader-text'>{{ i18n "nextPost" }}: </span>
|
|
{{- .NextInSection.Title -}}
|
|
<span aria-hidden='true'>
|
|
{{- print ( i18n "next" ) " " -}}
|
|
{{- partial "svg/icon" "next" -}}
|
|
</span>
|
|
</a>
|
|
</div>
|
|
{{- end -}}
|
|
|
|
</div>
|
|
</nav>
|
|
{{ end }}
|
|
|
|
{{- end -}}
|