summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcolin <colin@cicadas.surf>2023-04-06 13:54:22 -0700
committercolin <colin@cicadas.surf>2023-04-06 13:54:22 -0700
commitcf12cbb055e8065b7c039eef844ce1cf18cf970c (patch)
treeb04c60b255a418ef8eed7a2931e5b3fd60ed0cd3
parent1be7a027f676a0499aa79c3773e07af29fd3bda3 (diff)
css futzing, initial horrible nav
-rw-r--r--fussy.lisp38
1 files changed, 27 insertions, 11 deletions
diff --git a/fussy.lisp b/fussy.lisp
index 3bc87f7..b67a8cb 100644
--- a/fussy.lisp
+++ b/fussy.lisp
@@ -337,16 +337,22 @@ that they are not loaded during image gen.")
(defparameter +themes-per-page+ 21)
+(defun nav ()
+ (html:with-html
+ (:nav
+ (:a :href "/" "Fussy"))))
+
(defun page-nav (page page-count)
+ "relative pagination nav to current page."
(html:with-html
- (:nav
- (dotimes (pg (ceiling (/ page-count +themes-per-page+)))
- (if (= pg page)
- (:span (format nil " ~a " (1+ pg)))
- (:span " "
- (:a :href (format nil "/?page=~a" pg)
- (format nil "~a" (1+ pg)))
- " "))))))
+ (:div
+ (dotimes (pg (ceiling (/ page-count +themes-per-page+)))
+ (if (= pg page)
+ (:span (format nil " ~a " (1+ pg)))
+ (:span " "
+ (:a :href (format nil "?page=~a" pg)
+ (format nil "~a" (1+ pg)))
+ " "))))))
(defun theme-preview-image (theme &optional variant)
(html:with-html
@@ -357,8 +363,8 @@ that they are not loaded during image gen.")
(defun theme-preview-card (theme)
(html:with-html
(:div :class "card"
- (:a :href (url-path theme) (:h4 theme))
- (theme-preview-image theme))))
+ (:a :href (url-path theme) (:h4 theme)
+ (theme-preview-image theme)))))
(defun style ()
(html:with-html
@@ -395,7 +401,12 @@ img {
(defparameter +style-css+
"
+html, body {
+ height: 100%;
+}
+
.main {
+ height: 100%;
width: 100%;
background-color: #eeeeff;
}
@@ -477,8 +488,11 @@ h1 {
(:div :class "main"
(:h1 "FUSSY")
(:p :class "center"
- "Emacs Themes Gallery for your Daily Procrastination Needs")
+ "Emacs Themes Gallery for your Daily Procrastination Needs." (:br)
+ (write-to-string (length all-themes)) " themes and counting...")
+ (nav)
(page-nav page (length all-themes))
+ (:div )
(:div :class "container"
(dolist (theme themes)
(theme-preview-card theme)))))))))
@@ -510,6 +524,7 @@ h1 {
(:body
(:div :class "main"
(:h1 (package-namestring pkg) )
+ (nav)
(:div :class "info"
(:dl
(:dt "Description")
@@ -539,6 +554,7 @@ h1 {
(:body
(:div :class "main"
(:h1 theme)
+ (nav)
(:div
(:p "A theme in the package "
(:a :href (url-path pkg) (package-namestring pkg))))