aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-08-06 22:53:22 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-08-06 22:53:26 +0200
commit00495be91cacce36b0078bba3fa109806ea51c3e (patch)
tree461decf0a7bd22cbbfd7f5a06bd2063347d74449
parentMinor UI improvements. (diff)
downloadcalp-00495be91cacce36b0078bba3fa109806ea51c3e.tar.gz
calp-00495be91cacce36b0078bba3fa109806ea51c3e.tar.xz
HTML month day numbers now links to week view.
-rw-r--r--module/output/html.scm31
1 files changed, 17 insertions, 14 deletions
diff --git a/module/output/html.scm b/module/output/html.scm
index f08f6360..1bc0d74f 100644
--- a/module/output/html.scm
+++ b/module/output/html.scm
@@ -446,20 +446,23 @@
(map (lambda (day-date i)
`(div (@ (style "grid-area:time " ,i)
(class "cal-cell cal-cell-time"))
- (time (@ (class "date-info "
- ,(if (or (date< day-date start-date)
- (date< end-date day-date))
- "non-current"
- "current"))
- (datetime ,(date->string day-date "~1")))
- (span (@ (class "day-number"))
- ,(date->string day-date "~e"))
- ,(when (= 1 (day day-date))
- `(span (@ (class "month-name"))
- ,(date->string day-date "~b")))
- ,(when (= 1 (month day-date) (day day-date))
- `(span (@ (class "year-number"))
- ", " ,(date->string day-date "~Y"))))))
+ (a (@ (class "hidelink")
+ (href "/week/" ,(date->string day-date "~Y-~m-~d")
+ ".html#" ,(date->string day-date "~Y-~m-~d")))
+ (time (@ (class "date-info "
+ ,(if (or (date< day-date start-date)
+ (date< end-date day-date))
+ "non-current"
+ "current"))
+ (datetime ,(date->string day-date "~1")))
+ (span (@ (class "day-number"))
+ ,(date->string day-date "~e"))
+ ,(when (= 1 (day day-date))
+ `(span (@ (class "month-name"))
+ ,(date->string day-date "~b")))
+ ,(when (= 1 (month day-date) (day day-date))
+ `(span (@ (class "year-number"))
+ ", " ,(date->string day-date "~Y")))))))
(date-range pre-start post-end)
(map floor (iota (length (date-range pre-start post-end)) 1 1/7))))