summaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/single.html12
-rw-r--r--layouts/partials/pagination-single.html39
2 files changed, 49 insertions, 2 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index dc391d6..a8f5079 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,6 +1,6 @@
{{ define "main" }}
-{{/* Intro */}}
+{{/* Breadcrumbs */}}
{{ partial "breadcrumbs.html" . }}
@@ -59,13 +59,21 @@
</aside>
{{ end }}
- {{/* Actual document content */}}
+ {{/* Page content */}}
<div class="single-content">
{{ .Content }}
{{ partial "comments.html" . }}
</div>
+ {{/* Next prev controls */}}
+
+ {{ if not (.Param "hidePagination") }}
+ {{ partial "pagination-single.html" . }}
+ {{ end }}
+
+ {{/* Back to top */}}
+
{{ if not (.Param "hideBackToTop") }}
<div class="back-to-top">
<a href="#top">
diff --git a/layouts/partials/pagination-single.html b/layouts/partials/pagination-single.html
new file mode 100644
index 0000000..9bc5ced
--- /dev/null
+++ b/layouts/partials/pagination-single.html
@@ -0,0 +1,39 @@
+{{ if or .NextInSection .PrevInSection }}
+
+<div class="single-pagination">
+ <hr />
+
+ <div class="flex">
+
+ <div class="single-pagination-prev">
+ {{ with .PrevInSection }}
+ <div class="single-pagination-container-prev">
+ <div class="single-pagination-text">←</div>
+ <div class="single-pagination-text">
+ <a href="{{ .Permalink }}">
+ {{ .Title }}
+ </a>
+ </div>
+ </div>
+ {{ end }}
+ </div>
+
+ <div class="single-pagination-next">
+ {{ with .NextInSection }}
+ <div class="single-pagination-container-next">
+ <div class="single-pagination-text">
+ <a href="{{ .Permalink }}">
+ {{ .Title }}
+ </a>
+ </div>
+ <div class="single-pagination-text">→</div>
+ </div>
+ {{ end }}
+ </div>
+
+ </div>
+
+ <hr />
+</div>
+
+{{ end }}