From 911df059a41d3d2a3d414126dfa88c4fa44ded45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sun, 5 Apr 2020 23:37:19 +0200 Subject: Update JS to only try to mark today if posible. --- module/output/html.scm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'module/output/html.scm') diff --git a/module/output/html.scm b/module/output/html.scm index 64621e54..44e9d8d3 100644 --- a/module/output/html.scm +++ b/module/output/html.scm @@ -425,7 +425,9 @@ (define (td date) `(td (@ (class ,(when (date< date start-date) "prev ") - ,(when (date< end-date date) "next "))) + ,(when (date< end-date date) "next ")) + (id ,(date->string date "td-~Y-~m-~d")) + ) (a (@ (href ,(cond ;; We are before our time interval [(date< date start-date) @@ -444,7 +446,7 @@ "~Y-~m-~d.html" )] ;; We are in our time interval [else ""]) - "#" ,(date->string date "~Y-~m-~d")) + "#" ,(date-link date)) (class "hidelink")) ,(day date)))) @@ -511,6 +513,12 @@ (meta (@ (name description) (content "Calendar for the dates between " ,(date->string start-date) " and " ,(date->string end-date)))) + ;; NOTE this is only for the time actually part of this calendar. + ;; overflowing times from pre-start and post-end is currently ignored here. + (meta (@ (name start-time) + (content ,(date->string start-date "~s")))) + (meta (@ (name end-time) + (content ,(date->string (date+ end-date (date day: 1)) "~s")))) ,(include-css "/static/style.css") ,(include-alt-css "/static/dark.css" '(title "Dark")) ,(include-alt-css "/static/light.css" '(title "Light")) -- cgit v1.2.3