From 58b558cca27480ffd63b36302d5e1f733eaf44ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Tue, 31 Mar 2020 00:43:11 +0200 Subject: Add toggles between week and month view for HTML. --- module/output/html.scm | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'module') diff --git a/module/output/html.scm b/module/output/html.scm index 50822ccf..8c7d9674 100644 --- a/module/output/html.scm +++ b/module/output/html.scm @@ -537,7 +537,21 @@ ,(let* ((hash (get-git-version)) (url (format #f "~a/calparse/commit/?id=~a" (repo-url) hash))) - `(span "Version " (a (@ (href ,url)) ,hash))))) + `(span "Version " (a (@ (href ,url)) ,hash))) + (span (@ (class "nav")) + "View " + (a (@ (href "/week/" ,(date->string + (if (= 1 (day start-date)) + (start-of-week start-date (week-start)) + start-date) + "~1") + ".html")) + "weekly") + ", " + (a (@ (href "/month/" ,(date->string (set (day start-date) 1) "~1") ".html")) + "monthly") + ".") + )) ;; Whole sidebar (aside (@ (class "sideinfo")) -- cgit v1.2.3