aboutsummaryrefslogtreecommitdiffhomepage
path: root/site/html.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'site/html.lisp')
-rw-r--r--site/html.lisp22
1 files changed, 12 insertions, 10 deletions
diff --git a/site/html.lisp b/site/html.lisp
index d1d0f1a..4fdecd3 100644
--- a/site/html.lisp
+++ b/site/html.lisp
@@ -1,14 +1,16 @@
(in-package #:vampire)
-(defmacro page ((&key (title "") (csspath "/css/style.css")) &body body)
- `(spinneret:with-html-string
- (:doctype)
- (:head
- (:title ,title)
- (:meta :charset "UTF-8")
- (:meta :name "viewport" :content "width=device-width, initial-scale=1.0")
- (:link :rel "stylesheet" :href ,csspath))
- (:body
- ,@body)))
+(defun page (title &rest body)
+ (with-output-to-string (str)
+ (html
+ (<html>
+ (<head>
+ (<title> title)
+ (<meta> (@ :charset "UTF-8"))
+ (<meta> (@ :name "viewport" :content "width=device-width, initial-scale=1.0")))
+ (<body>
+ ($center
+ (<div> (@ :class "container") (apply 'eval body)))))
+ str)))