A couple fixes for page navigation
- Put the previous post on the left, and the next post on the right - Simplify the CSS class names and styles
This commit is contained in:
parent
1eba82c96b
commit
accd1aceeb
2 changed files with 9 additions and 9 deletions
|
@ -1,18 +1,18 @@
|
|||
{{ if .FirstSection }}
|
||||
{{- $pages := where .FirstSection.RegularPagesRecursive "Draft" "eq" false -}}
|
||||
{{- $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="previous-page">
|
||||
<li class="prev">
|
||||
<a href="{{ .Permalink }}">{{ .LinkTitle | markdownify }}</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
|
||||
{{ with $previousInSection -}}
|
||||
<li class="next-page">
|
||||
<li class="next">
|
||||
<a href="{{ .Permalink }}">{{ .LinkTitle | markdownify }}</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue