Add next/prev links

This commit is contained in:
Drew DeVault 2022-01-10 15:54:12 +01:00
parent 08e568622f
commit 0b1887b7b3
2 changed files with 27 additions and 0 deletions

View File

@ -457,6 +457,21 @@ article.content {
line-height: 1.3;
}
.next-prev {
max-width: 920px;
margin: 0 auto;
display: flex;
justify-content: space-between;
.prev {
align-self: flex-start;
}
.next {
align-self: flex-end;
}
}
blockquote {
margin-left: calc(-4px - 1rem);
margin-right: calc(-4px - 1rem);

View File

@ -25,6 +25,18 @@
<article class="content">
{{.Content}}
</article>
<div class="next-prev">
<div class="prev">
{{ if .PrevPage }}
<a href="{{ .PrevPage.Permalink }}?ref=footer">« {{ .PrevPage.Title | truncate 50 "..."}}</a>
{{ end }}
</div>
<div class="next">
{{ if .NextPage }}
<a href="{{ .NextPage.Permalink }}?ref=footer">{{ .NextPage.Title | truncate 50 "..." }} »</a>
{{ end }}
</div>
</div>
</main>
{{ partial "footer.html" }}
</body>