about summary refs log tree commit diff
path: root/web/panettone/src
diff options
context:
space:
mode:
authorGriffin Smith <grfn@gws.fyi>2020-07-24T21·49-0400
committerglittershark <grfn@gws.fyi>2020-07-24T23·39+0000
commitece66d081b1833ee0bb508fad2843f2d49c9e50d (patch)
tree01410308f3e14efdcdd72f1a382678ec58976535 /web/panettone/src
parent989563a75b622a14ad674b79222145c7c8177fed (diff)
fix(web/panettone): Fix html5 compliance r/1461
- 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>
Diffstat (limited to 'web/panettone/src')
-rw-r--r--web/panettone/src/panettone.lisp22
1 files changed, 12 insertions, 10 deletions
diff --git a/web/panettone/src/panettone.lisp b/web/panettone/src/panettone.lisp
index 3ff3285052ef..e71be53eb975 100644
--- a/web/panettone/src/panettone.lisp
+++ b/web/panettone/src/panettone.lisp
@@ -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"