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

improved pagination in (local theme)

parent b2a15fee
......@@ -78,14 +78,12 @@
#:prefix prefix)
posts)
`(footer
,(let ((prev (link "←" (format #f "/page-~d.html" (1- number))))
(next (link "→" (format #f "/page-~d.html" (1+ number))))
(name (format #f "Page ~d" number)))
(cond ((and last? (= number 1))
(list name))
(last?
(list prev " " name))
((= number 1)
(list name " " prev))
(else
(list prev " " name " " next)))))))))
,(let ((prev (link (format #f "<< Page ~d" (1- number))
(if (= number 2) "/index.html"
(format #f "/page-~d.html" (1- number)))))
(next (link (format #f "Page ~d >>" (1+ number))
(format #f "/page-~d.html" (1+ number)))))
(cond ((and last? (= number 1)) '())
(last? (list prev))
((= number 1) (list next))
(else (list prev " | " 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