mirror of
https://github.com/davegallant/davegallant.github.io.git
synced 2025-08-08 01:22:29 +00:00
Switch themes to minimo
This commit is contained in:
46
themes/minimo/layouts/partials/nav/entry_nav.html
Normal file
46
themes/minimo/layouts/partials/nav/entry_nav.html
Normal file
@@ -0,0 +1,46 @@
|
||||
{{- $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 -}}
|
Reference in New Issue
Block a user