From ec3f104c10ba40ed5050a61afed9d5410ffae1a5 Mon Sep 17 00:00:00 2001 From: Francesco Date: Mon, 24 Jun 2024 18:44:39 +0200 Subject: Pagination on single posts --- layouts/_default/single.html | 12 ++++++++-- layouts/partials/pagination-single.html | 39 +++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 layouts/partials/pagination-single.html (limited to 'layouts') 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 @@ {{ end }} - {{/* Actual document content */}} + {{/* Page content */}}
{{ .Content }} {{ partial "comments.html" . }}
+ {{/* Next prev controls */}} + + {{ if not (.Param "hidePagination") }} + {{ partial "pagination-single.html" . }} + {{ end }} + + {{/* Back to top */}} + {{ if not (.Param "hideBackToTop") }}
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 }} + +
+
+ +
+ + + +
+ {{ with .NextInSection }} +
+ +
+
+ {{ end }} +
+ +
+ +
+
+ +{{ end }} -- cgit v1.2.3