summaryrefslogtreecommitdiff
path: root/fussy.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'fussy.lisp')
-rw-r--r--fussy.lisp13
1 files changed, 7 insertions, 6 deletions
diff --git a/fussy.lisp b/fussy.lisp
index 0c44405..68ac9ea 100644
--- a/fussy.lisp
+++ b/fussy.lisp
@@ -357,10 +357,7 @@ that they are not loaded during image gen.")
(:span " "
(:a :href (format nil "?page=~a" pg)
(format nil "~a" (1+ pg)))
- " ")))
-
-
- )))
+ " "))))))
(defun theme-preview-image (theme &optional variant)
(html:with-html
@@ -531,7 +528,7 @@ h1 {
(defun package-namestring (pkg)
(hq:>> () pkg theme-pkg-name symbol-name string-downcase))
-(lzb:defendpoint* :get "/package/:pkg a-package:" () ()
+(lzb:defendpoint* :get "/package/:pkg a-package:" ((page an-integer)) ()
"The page endpoint for a theme package"
(let ((themes
(themes-in-package pkg)))
@@ -552,8 +549,12 @@ h1 {
(if (= 1 (length themes)) " theme" " themes"))
(:p (:a :href (theme-pkg-url pkg)
(theme-pkg-url pkg))))
+ (when (< +themes-per-page+ (length themes))
+ (page-nav (or page 0) (1- (length themes))))
(:div :class "container"
- (dolist (theme themes)
+ (dolist (theme (a:subseq* themes
+ (* page +themes-per-page+)
+ (* (1+ page) +themes-per-page+)))
(theme-preview-card theme)))))))))
(lzb:defendpoint* :get "/theme/:pkg a-package:/:theme a-theme:" () ()