diff options
Diffstat (limited to 'fussy.lisp')
-rw-r--r-- | fussy.lisp | 19 |
1 files changed, 13 insertions, 6 deletions
@@ -423,8 +423,8 @@ that they are not loaded during image gen.") (html:with-html (:nav (:a :href "/" (:h1 "FUSSY")) - (:a :href "/" (:h4 "Browse by theme")) - (:a :href "/packages" (:h4 "Browse by theme package"))))) + (:a :href "/themes" (:h4 "Browse by theme")) + (:a :href "/" (:h4 "Browse by theme package"))))) (defun page-nav (page page-count &optional terms) "relative pagination nav to current page." @@ -609,7 +609,7 @@ h1, h2, h3, h4 { (* page +themes-per-page+) (* (1+ page) +themes-per-page+))) -(lzb:defendpoint* :get "/" ((page an-integer) (terms a-search-query)) () +(lzb:defendpoint* :get "/themes" ((page an-integer) (terms a-search-query)) () "The landing page" (let* ((page (or page 0)) @@ -631,7 +631,7 @@ h1, h2, h3, h4 { (:div :class "main" (nav) (gallery-header (length all-themes) "themes") - (search-form "/" terms) + (search-form "/themes" terms) (when (< 1 page-count) (page-nav page page-count terms)) (:div :class "container" @@ -658,7 +658,14 @@ h1, h2, h3, h4 { (:a :href "https://melpa.org" "MELPA.") (:br) "Newest first.")))) -(lzb:defendpoint* :get "/packages" ((page an-integer) (terms a-search-query)) () +(defun redirect-to (location) + "Set the lazybones response header and response code for redirecting to LOCATION. +This procedure will error if lazybones:*request* is not currently bound." + (setf (lzb:response-header :location) location + (lzb:response-code) "303")) + + +(lzb:defendpoint* :get "/" ((page an-integer) (terms a-search-query)) () "Browse the packages" (let* ((page (or page 0)) @@ -683,7 +690,7 @@ h1, h2, h3, h4 { (:div :class "main" (nav) (gallery-header (length all-packages) "theme packages") - (search-form "/packages" terms) + (search-form "/" terms) (when (< 1 page-count) (page-nav page page-count terms)) (:div :class "container" |