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