aboutsummaryrefslogtreecommitdiff
path: root/module
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-03-30 00:53:24 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-03-30 00:53:24 +0200
commitbc0ee663a7fb3df71cf1547455d9eb93007b4459 (patch)
treec628b729b8b3c298fd812a3ca03d89c29c9d7262 /module
parentCreate LICENSE (diff)
downloadcalp-bc0ee663a7fb3df71cf1547455d9eb93007b4459.tar.gz
calp-bc0ee663a7fb3df71cf1547455d9eb93007b4459.tar.xz
Fixed minor errors in HTML output.
Diffstat (limited to 'module')
-rw-r--r--module/output/html.scm33
1 files changed, 19 insertions, 14 deletions
diff --git a/module/output/html.scm b/module/output/html.scm
index 6e64d176..454f9dc4 100644
--- a/module/output/html.scm
+++ b/module/output/html.scm
@@ -416,19 +416,24 @@
`(td (@ (class
,(when (date< date start-date) "prev ")
,(when (date< end-date date) "next ")))
- (a (@ (href ,(cond [(date< date start-date)
- ;; TODO find a prettier way to generate links to previous and next time intervals
- ;; TODO also, it would do good with a bit of testing for off-by-one errors
- (date->string
- (stream-find (lambda (d) (date<= d date (next-start d)))
- (stream-iterate prev-start start-date))
- "~Y-~m-~d.html")]
- [(date< end-date date)
- (date->string
- (stream-find (lambda (d) (and (date<= d date)
- (date< date (next-start d))))
- (stream-iterate next-start start-date))
- "~Y-~m-~d.html" )])
+ (a (@ (href ,(cond
+ ;; We are before our time interval
+ [(date< date start-date)
+ ;; TODO find a prettier way to generate links to previous and next time intervals
+ ;; TODO also, it would do good with a bit of testing for off-by-one errors
+ (date->string
+ (stream-find (lambda (d) (date<= d date (next-start d)))
+ (stream-iterate prev-start start-date))
+ "~Y-~m-~d.html")]
+ ;; We are after our time interval
+ [(date< end-date date)
+ (date->string
+ (stream-find (lambda (d) (and (date<= d date)
+ (date< date (next-start d))))
+ (stream-iterate next-start start-date))
+ "~Y-~m-~d.html" )]
+ ;; We are in our time interval
+ [else ""])
"#" ,(date->string date "~Y-~m-~d"))
(class "hidelink"))
,(day date))))
@@ -489,7 +494,7 @@
(head
(title "Calendar")
(meta (@ (charset "utf-8")))
- (meta (@ (http-equiv "Content-Type") (content "application/xhtml+xml")))
+ ;; (meta (@ (http-equiv "Content-Type") (content "application/xhtml+xml")))
(meta (@ (name viewport)
(content "width=device-width, initial-scale=0.5")))
(meta (@ (name description)