summaryrefslogtreecommitdiff
path: root/utilities.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'utilities.lisp')
-rw-r--r--utilities.lisp6
1 files changed, 6 insertions, 0 deletions
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))))))