aboutsummaryrefslogtreecommitdiff
path: root/module
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@hornquist.se>2019-12-25 19:22:50 +0100
committerHugo Hörnquist <hugo@hornquist.se>2019-12-25 19:22:50 +0100
commit4a4a10fd3915b2252608254328bed8bcd38b3938 (patch)
tree15cb56d264bc30580bac40ee880d118d9b56d094 /module
parentHTML output only describe multi-day events once. (diff)
downloadcalp-4a4a10fd3915b2252608254328bed8bcd38b3938.tar.gz
calp-4a4a10fd3915b2252608254328bed8bcd38b3938.tar.xz
HTML output comments.
Diffstat (limited to 'module')
-rw-r--r--module/output/html.scm5
1 files changed, 4 insertions, 1 deletions
diff --git a/module/output/html.scm b/module/output/html.scm
index 977c73b9..f0c021c3 100644
--- a/module/output/html.scm
+++ b/module/output/html.scm
@@ -61,6 +61,7 @@
(define cs (char-set-adjoin char-set:letter+digit #\- #\_))
(string-filter (lambda (c) (char-set-contains? cs c)) str))
+;; Format single event for graphical display
(define (vevent->sxml day ev)
(define time (date->time-utc day))
(define style
@@ -90,6 +91,7 @@
(style ,style))
,((summary-filter) ev (attr ev 'SUMMARY)))))
+;; Lay out complete day (graphical)
(define (lay-out-day day)
(let* (((date . events) day))
(fix-event-widths! (date->time-utc date) (stream->list events))
@@ -129,6 +131,7 @@
(end (time->string (attr ev 'DTEND) fmt)))
(values start end)))
+;; For sidebar, just text
(define (fmt-single-event ev)
`(article (@ (id ,(UID ev))
(class "eventtext CAL_bg_"
@@ -143,10 +146,10 @@
`(div (b "Plats: ") ,(attr ev 'LOCATION)))
,(attr ev 'DESCRIPTION))))
+;; Single event in side bar (text objects)
(define (fmt-day day)
(let* (((date . events) day))
`(section (@ (class "text-day"))
- ;; TODO this gives date +1
(header (h2 ,(let ((s (date->string date "~Y-~m-~d")))
`(a (@ (href "#" ,s)
(class "hidelink")) ,s))))