From e0950b6c7463653c7049de196dc6448bf5e03fdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sun, 3 May 2020 00:27:36 +0200 Subject: Add [today] and [jump to] button in frontend. Currently the JavaScript updates these buttons to work, but they by default reference backend endpoints which are not yet written. --- module/output/html.scm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'module/output') diff --git a/module/output/html.scm b/module/output/html.scm index bbd8ce91..3aeadd7e 100644 --- a/module/output/html.scm +++ b/module/output/html.scm @@ -684,6 +684,24 @@ ,(btn href: (date->string (set (day start-date) 1) "/month/~1.html") "månadsvy") + ,(btn id: "today-button" + href: (string-append + "/today" (case intervaltype + [(month) "/month"] + [(week) "/week"] + [else "/month"])) + "idag")) + + (div (@ (class "jump-to")) + (form (@ (action ,(case intervaltype + [(month) "/month"] + [(week) "/week"] + [else "/month"]))) + (input (@ (type date) + (name "start-date") + (value (date->string start-date "~1")) + )) + ,(btn "➔")))) (details (@ (open) (style "grid-area: cal")) (summary "Month overview") -- cgit v1.2.3