Add post navigation
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
22
layouts/partials/components/postnav/index.html
Normal file
22
layouts/partials/components/postnav/index.html
Normal file
@@ -0,0 +1,22 @@
|
||||
{{ $pages := .CurrentSection.Pages.ByDate }}
|
||||
|
||||
|
||||
<div class="postnav">
|
||||
{{ with $pages.Prev . }}
|
||||
<a href="{{ .RelPermalink }}">
|
||||
<div class="previous">
|
||||
<p class="caption">Previous Post</p>
|
||||
<p class="title">{{ .Title }}</p>
|
||||
</div>
|
||||
</a>
|
||||
{{ end }}
|
||||
|
||||
{{ with $pages.Next . }}
|
||||
<a href="{{ .RelPermalink }}">
|
||||
<div class="next">
|
||||
<p class="caption">Next Post</p>
|
||||
<p class="title">{{ .Title }}</p>
|
||||
</div>
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
Reference in New Issue
Block a user