diff --git a/web/dom.lisp b/web/dom.lisp index fdc2158..71a5556 100644 --- a/web/dom.lisp +++ b/web/dom.lisp @@ -7,6 +7,8 @@ (in-package :scopes/web/dom) +;;;; basic / common stuff + (defvar *output* nil) (defmacro render (&body body) @@ -14,19 +16,28 @@ ,@body (get-output-stream-string *output*))) +(defmacro write-nested (start end &body body) + `(progn + (write-string ,start *output*) + ,@body + (write-line ,end *output*))) + +(defun write-simple (start end val) + (write-string start *output*) + (write-string val *output*) + (write-string end *output*)) + +;;;; tag-specific renderers + (defun dl (plist) - (write-string "