From 83981ff008ae59a7f5e62f0d5503f78d781f7f0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Thu, 14 Jan 2021 00:13:49 +0100 Subject: Add horrendous / -> /today redirect. --- module/calp/server/routes.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/module/calp/server/routes.scm b/module/calp/server/routes.scm index 16ab2662..368c7cb0 100644 --- a/module/calp/server/routes.scm +++ b/module/calp/server/routes.scm @@ -85,9 +85,13 @@ (make-routes ;; Manual redirect to not reserve root. + ;; Also reason for really ugly frontend redirect. (GET "/" () (return '((content-type text/html)) - (sxml->html-string '(a (@ (href "/today")) "Gå till idag")))) + (sxml->html-string + '(body (a (@ (href "/today")) "Gå till idag") + (script "window.onload = function() { + document.getElementsByTagName('a')[0].click();}"))))) (GET "/favicon.ico" () (return -- cgit v1.2.3