web/themes/Lanyon/layouts/partials/prev_next.html
2019-04-09 16:33:16 +02:00

29 lines
938 B
HTML

<!--
This is a helper file that adds previous and next links to the bottom of each
blog post. (below next and previous refer to chronological next and previous)
It will check to see if there is a previous blog post. If is, it will print
an arrow as well as the title of the previous post as a link as
left-justified text.
It will then check for a next blog post. If there is one it prints the title
of the next post with a right arrow as right justified text on the same line.
If there is ever not a next or previous post, it does nothing.
-->
<div class="container">
<hr />
<hr />
{{if .Prev}}
<span class="left">
&nbsp; <em>&laquo; Previous:</em> <a class="next" href="{{.Prev.Permalink}}">{{.Prev.Title}}</a>
</span>
{{end}}
{{if .Next}}
<span class="right">
<em>Next: </em><a class="next" href="{{.Next.Permalink}}"> &nbsp; {{ .Next.Title }}</a> &raquo;
</span>
{{end}}
</div>