Add next/prev post links in footer (#41) (#42)

Co-authored-by: AJ Livingston <aj.livingston.dev@gmail.com>
This commit is contained in:
slashformotion 2021-11-14 20:02:14 +01:00 committed by GitHub
parent 8ccecd55dc
commit b08e62319b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,18 @@
<footer class="page-footer"> <footer class="page-footer">
<hr> <hr>
<div class="previous-post" style="display:inline-block;">
{{ if .PrevPage }}
<a class="link-reverse" href="{{ .PrevPage.Permalink }}?ref=footer">« {{ .PrevPage.Title | truncate 50 "..."}}</a>
{{ end }}
</div>
<div class="next-post", style="display:inline-block;float:right;">
{{ if .NextPage }}
<a class="link-reverse" href="{{ .NextPage.Permalink }}?ref=footer">{{ .NextPage.Title | truncate 50 "..." }} »</a>
{{ end }}
</div>
<ul class="page-footer-menu"> <ul class="page-footer-menu">
{{/* SOCIALS */}} {{/* SOCIALS */}}