From 073e3a4f11d6987774b44aac1649197dfcacae1b Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sat, 5 Feb 2022 17:43:29 -0500 Subject: Add pagination. --- theme.scm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'theme.scm') diff --git a/theme.scm b/theme.scm index 0a81d40..dcae710 100644 --- a/theme.scm +++ b/theme.scm @@ -116,7 +116,20 @@ free culture works available under the " ,%cc-by-sa-link " license.") (div (@ (class "post")) ,(first-paragraph post)) (a (@ (href ,uri)) "read more ➔")))) - posts))))) + posts))) + #:pagination-template + (lambda (site body previous-page next-page) + `(,@body + (div (@ (class "paginator")) + ,(if previous-page + `(a (@ (class "paginator-prev") (href ,previous-page)) + "🡐 Newer") + '()) + (span (@ (class "paginator-spacer"))) + ,(if next-page + `(a (@ (class "paginator-next") (href ,next-page)) + "Older 🡒") + '())))))) (define (static-page title file-name body) (lambda (site posts) -- cgit v1.2.3