aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--module/calp/server/routes.scm6
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