summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arclade.lisp9
-rw-r--r--model.lisp9
-rw-r--r--style.css20
-rw-r--r--utilities.lisp6
4 files changed, 33 insertions, 11 deletions
diff --git a/arclade.lisp b/arclade.lisp
index 67f4183..63bd975 100644
--- a/arclade.lisp
+++ b/arclade.lisp
@@ -60,6 +60,9 @@
(:div
:class "game"
(:h2 (name game))
- (:div :class "feats"
- (dolist (feat feats)
- (:div :class "feat" (render feat)))))))))))
+ (:div
+ :class "feats"
+ (dolist (feat feats) (render feat))))))))))
+
+(defendpoint* :get "/css/style.css" () ()
+ (pathname "./style.css"))
diff --git a/model.lisp b/model.lisp
index 4bf59c2..8849aa3 100644
--- a/model.lisp
+++ b/model.lisp
@@ -86,8 +86,13 @@ Example:
(defmethod render ((obj steam-achievement))
(with-slots (name description fulfillment icon icongray) obj
(with-html
- (:img :src icon)
- (:b name) description (:i (format-time fulfillment)))))
+ (:div
+ :class "feat"
+ (:div (:img :src icon))
+ (:div
+ (:div (:b name))
+ (:div description)
+ (:div (:i (format-time fulfillment))))))))
;;; "queries"
diff --git a/style.css b/style.css
index 5a3b781..5e31b5e 100644
--- a/style.css
+++ b/style.css
@@ -1,9 +1,7 @@
body {
background-color: black;
-
- animation-name: textColorPalette;
- animation-duration: .4s;
- animation-iteration-count: infinite;
+ color: cyan;
+ font-family: Victor Mono;
}
.container {
@@ -23,10 +21,20 @@ body {
}
.feat {
+ margin-bottom: .5rem;
+ width: 100%;
text-align: left;
display: flex;
- justify-content: left;
- align-items: center;
+ justify-content: flex-start;
+ align-items: flex-start;
+
+ animation-name: textColorPalette;
+ animation-duration: .4s;
+ animation-iteration-count: infinite;
+}
+
+img {
+ margin-right: 1rem;
}
@keyframes textColorPalette {
diff --git a/utilities.lisp b/utilities.lisp
index c3f49c1..5499755 100644
--- a/utilities.lisp
+++ b/utilities.lisp
@@ -16,6 +16,11 @@
(format nil "~2,'0d-~2,'0d-~a ~2,'0d:~2,'0d"
month day year hour min)))
+(defun host-path (str)
+ (with-slots (host port) *config*
+ (quri:render-uri
+ (quri:make-uri-http :host host :port port :path str))))
+
(defmacro with-page ((&key title) &body body)
"A helper macro for defining some standard page boilerplate."
(let ((title-var (gensym)))
@@ -25,6 +30,7 @@
(:html
(:head
(:script :src "http://localhost:8080/skewer")
+ (:link :href ,(host-path "css/style.css") :rel "stylesheet")
(:title ,title-var))
(:body
,@body))))))