aboutsummaryrefslogtreecommitdiff
path: root/module
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@hornquist.se>2020-02-14 00:28:37 +0100
committerHugo Hörnquist <hugo@hornquist.se>2020-02-14 00:28:37 +0100
commit8ed06c632b0113e104584556f222be46e8a70de8 (patch)
tree745ff3a0e2a491b1903e763239ff357666471776 /module
parentKinda fixed contiuing css class. (diff)
downloadcalp-8ed06c632b0113e104584556f222be46e8a70de8.tar.gz
calp-8ed06c632b0113e104584556f222be46e8a70de8.tar.xz
Minor cleanup.
Diffstat (limited to 'module')
-rw-r--r--module/output/html.scm13
-rw-r--r--module/srfi/srfi-19/alt.scm1
2 files changed, 5 insertions, 9 deletions
diff --git a/module/output/html.scm b/module/output/html.scm
index 5e721a4e..b016d977 100644
--- a/module/output/html.scm
+++ b/module/output/html.scm
@@ -123,10 +123,7 @@
(datetime-difference (attr ev 'DTEND)
(attr ev 'DTSTART)))))
(stream->list events))))
- ;; (format (current-error-port) "lay-out-day: ~a~%" (date->string date))
- (format (current-error-port) "long=~a, short=~a~%"
- (length long-events)
- (length short-events))
+
(fix-event-widths! date short-events)
(fix-event-widths! date long-events)
`(div (@ (class "day"))
@@ -203,7 +200,6 @@
;; Single event in side bar (text objects)
(define (fmt-day day)
(let* (((date . events) day))
- ;; (format (current-error-port) "fmt-day: ~a~%" (date->string date))
`(section (@ (class "text-day"))
(header (h2 ,(let ((s (date->string date "~Y-~m-~d")))
`(a (@ (href "#" ,s)
@@ -221,9 +217,7 @@
events))))))
(define* (month+ date-object #:optional (change 1))
- ;; (normalize-date* (set (date-month date) = (+ change)))
- (date+ date-object (date month: change))
- )
+ (date+ date-object (date month: change)))
(define* (month- date-object #:optional (change 1))
(date- date-object (date month: change)))
@@ -280,10 +274,11 @@
;;; All this filtering is probably slow, and should be looked into.
(define-public (html-generate calendars events start-date end-date)
+ ;; TODO maybe don't do this again for every month
(define evs (get-groups-between (group-stream events)
start-date end-date))
- ;; (display "<!doctype HTML>") (newline)
+
(define (nav-link display date)
`(a (@ (href ,(date->string date "~Y-~m-~d") ".html")
(class "nav hidelink"))
diff --git a/module/srfi/srfi-19/alt.scm b/module/srfi/srfi-19/alt.scm
index c07bcbd8..c02cdaf7 100644
--- a/module/srfi/srfi-19/alt.scm
+++ b/module/srfi/srfi-19/alt.scm
@@ -186,6 +186,7 @@
(and (date<=% first second)
(apply date<= second rest))]))
+;; TODO TZ
(define-public (time< a b)
(let ((ah (hour a))
(bh (hour b)))