From 99c439860dc49925630bc895a981f2e603e9dbb4 Mon Sep 17 00:00:00 2001 From: Will Faught Date: Wed, 29 May 2024 18:52:45 -0700 Subject: [PATCH] Add prev, next page links --- README.md | 6 ++++++ .../layouts/partials/paige/style-first.css | 1 + layouts/partials/paige/footer.html | 16 ++++++++++++++++ 3 files changed, 23 insertions(+) diff --git a/README.md b/README.md index a11fc6ff..54d98177 100644 --- a/README.md +++ b/README.md @@ -917,12 +917,18 @@ Page identifiers:
The menu.
#paige-metadata
The metadata.
+
#paige-next
+
The next page link.
#paige-pages
The pages.
#paige-pages-header
The pages header.
#paige-pagination
The sub-page pagination links.
+
#paige-prev
+
The previous page link.
+
#paige-prev-next
+
The container of the previous and next page links.
#paige-reading-time
The reading time.
#paige-root
diff --git a/exampleSite/layouts/partials/paige/style-first.css b/exampleSite/layouts/partials/paige/style-first.css index 5d4bb272..7631c810 100644 --- a/exampleSite/layouts/partials/paige/style-first.css +++ b/exampleSite/layouts/partials/paige/style-first.css @@ -3,6 +3,7 @@ #paige-credit, #paige-date, #paige-keywords, +#paige-prev-next, #paige-reading-time, #paige-series, #paige-toc, diff --git a/layouts/partials/paige/footer.html b/layouts/partials/paige/footer.html index 3efc4b8b..a3f516e2 100644 --- a/layouts/partials/paige/footer.html +++ b/layouts/partials/paige/footer.html @@ -15,6 +15,22 @@ {{ partial "paige/footer-first.html" . }} {{ end }} + {{ if or $page.PrevInSection $page.NextInSection }} +
+ {{ if $page.PrevInSection }} +

+ ← {{ $page.PrevInSection.Title }} +

+ {{ end }} + + {{ if $page.NextInSection }} +

+ {{ $page.NextInSection.Title }} → +

+ {{ end }} +
+ {{ end }} + {{ if and $linkcontent $linkurl (not ($page.Param "paige.file_link.disable")) }}