From a95cdd714187903ed24e40804c449e8e4737f027 Mon Sep 17 00:00:00 2001 From: Grant Shoshin Shangreaux Date: Sat, 6 Jul 2024 15:44:51 -0500 Subject: Add: redefined pages with hypnotisml syntax --- site/html.lisp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'site/html.lisp') 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 + ( + ( + ( 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))) -- cgit v1.2.3