- Put the previous post on the left, and the next post on the right - Simplify the CSS class names and styles
21 lines
644 B
HTML
21 lines
644 B
HTML
{{ if .FirstSection }}
|
|
{{- $pages := (where .FirstSection.RegularPagesRecursive "Draft" "eq" false).ByDate -}}
|
|
{{- $previousInSection := $pages.Prev . -}}
|
|
{{- $nextInSection := $pages.Next . -}}
|
|
|
|
{{ if or $previousInSection $nextInSection }}
|
|
<ul class="page-navigation">
|
|
{{ with $nextInSection -}}
|
|
<li class="prev">
|
|
<a href="{{ .Permalink }}">{{ .LinkTitle | markdownify }}</a>
|
|
</li>
|
|
{{- end }}
|
|
|
|
{{ with $previousInSection -}}
|
|
<li class="next">
|
|
<a href="{{ .Permalink }}">{{ .LinkTitle | markdownify }}</a>
|
|
</li>
|
|
{{- end }}
|
|
</ul>
|
|
{{ end }}
|
|
{{ end }}
|