Add prev/next links

This commit is contained in:
Philipp Oppermann
2016-05-01 12:53:03 +02:00
parent 6a4dbe8446
commit a5ed209fe9
2 changed files with 46 additions and 0 deletions

View File

@@ -12,6 +12,16 @@
{{ .Content }}
</article>
<hr>
<div class="PageNavigation">
{{ if .PrevInSection }}
<a class="prev" href="{{ .PrevInSection.RelPermalink }}">&laquo; {{ .PrevInSection.Title }}</a>
{{ end }}
{{ if .NextInSection }}
<a class="next" href="{{ .NextInSection.RelPermalink }}">{{ .NextInSection.Title }} &raquo;</a>
{{ end }}
</div>
<hr>
{{ partial "disqus.html" . }}
{{ partial "footer.html" . }}

View File

@@ -66,3 +66,39 @@ main img {
.post-category.memory-management {
color: #990;
}
.PageNavigation {
font-size: 0.9em;
display: table;
width: 100%;
overflow: hidden;
}
.PageNavigation a {
display: table-cell;
}
.PageNavigation .previous {
text-align: left;
}
.PageNavigation .next {
text-align: right;
}
footer.footer {
margin-top: 1rem;
margin-bottom: 1rem;
}
.footnotes {
font-size: 85%;
}
.footnotes li {
margin-bottom: 1rem;
}
sup, sub {
line-height: 0;
}