Add next/prev links
This commit is contained in:
parent
08e568622f
commit
0b1887b7b3
|
@ -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);
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue