Unverified Commit 6b5db779 authored by Philip Kaludercic's avatar Philip Kaludercic 🌝
Browse files

improved pagination in (local theme)

parent b2a15fee
...@@ -78,14 +78,12 @@ ...@@ -78,14 +78,12 @@
#:prefix prefix) #:prefix prefix)
posts) posts)
`(footer `(footer
,(let ((prev (link "&larr;" (format #f "/page-~d.html" (1- number)))) ,(let ((prev (link (format #f "<< Page ~d" (1- number))
(next (link "&rarr;" (format #f "/page-~d.html" (1+ number)))) (if (= number 2) "/index.html"
(name (format #f "Page ~d" number))) (format #f "/page-~d.html" (1- number)))))
(cond ((and last? (= number 1)) (next (link (format #f "Page ~d >>" (1+ number))
(list name)) (format #f "/page-~d.html" (1+ number)))))
(last? (cond ((and last? (= number 1)) '())
(list prev " " name)) (last? (list prev))
((= number 1) ((= number 1) (list next))
(list name " " prev)) (else (list prev " | " next)))))))))
(else
(list prev " " name " " next)))))))))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment