diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-01-14 00:13:49 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-01-14 00:13:49 +0100 |
commit | 83981ff008ae59a7f5e62f0d5503f78d781f7f0a (patch) | |
tree | b9d0e3b7c57ccb65761cfaaf14ab22dd6454464e /module/c | |
parent | Clarify commentary for recurrence tests. (diff) | |
download | calp-83981ff008ae59a7f5e62f0d5503f78d781f7f0a.tar.gz calp-83981ff008ae59a7f5e62f0d5503f78d781f7f0a.tar.xz |
Add horrendous / -> /today redirect.
Diffstat (limited to '')
-rw-r--r-- | module/calp/server/routes.scm | 6 |
1 files changed, 5 insertions, 1 deletions
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 |