aboutsummaryrefslogtreecommitdiff
path: root/module/output/html.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-04-05 23:37:19 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-04-05 23:37:19 +0200
commit911df059a41d3d2a3d414126dfa88c4fa44ded45 (patch)
tree6e971dcb7ba71295cad2f9bb992f9bd7d7cca244 /module/output/html.scm
parentIntroduce datetime->unix-time and back. (diff)
downloadcalp-911df059a41d3d2a3d414126dfa88c4fa44ded45.tar.gz
calp-911df059a41d3d2a3d414126dfa88c4fa44ded45.tar.xz
Update JS to only try to mark today if posible.
Diffstat (limited to '')
-rw-r--r--module/output/html.scm12
1 files changed, 10 insertions, 2 deletions
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"))