fix(web/panettone): Fix html5 compliance

- who:html-mode needs to be html5 rather than HTML5 apparently, even
  though the documentation says otherwise
- wrap content in an :html tag with the :lang "en" attribute

Fixes: #22
Change-Id: I58ff8947d17ac02659e4c8d98155f57127ec7005
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1421
Tested-by: BuildkiteCI
Reviewed-by: isomer <isomer@tvl.fyi>
This commit is contained in:
Griffin Smith 2020-07-24 17:49:52 -04:00 committed by glittershark
parent 989563a75b
commit ece66d081b

View file

@ -176,7 +176,7 @@ updated issue"
(defvar *user* nil)
(setf (who:html-mode) :HTML5)
(setf (who:html-mode) :html5)
(defun render/footer-nav (&rest extra)
(who:with-html-output (*standard-output*)
@ -198,15 +198,17 @@ updated issue"
(defmacro render ((&key (footer t)) &body body)
`(who:with-html-output-to-string (*standard-output* nil :prologue t)
(:head
(:title (who:esc *title*))
(:link :rel "stylesheet" :type "text/css" :href "/main.css"))
(:body
(:div
:class "content"
,@body
(when ,footer
(render/footer-nav))))))
(:html
:lang "en"
(:head
(:title (who:esc *title*))
(:link :rel "stylesheet" :type "text/css" :href "/main.css"))
(:body
(:div
:class "content"
,@body
(when ,footer
(render/footer-nav)))))))
(defun render/alert (message)
"Render an alert box for MESSAGE, if non-null"