aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-04-26 02:05:53 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-04-26 02:05:53 +0200
commit829680f1e6f392bbd9efc15eed52fe275097583e (patch)
tree922fd0fe10199036ce2102f82ac5dc864b608433
parentRemove wkst argument from tablify. (diff)
downloadcalp-829680f1e6f392bbd9efc15eed52fe275097583e.tar.gz
calp-829680f1e6f392bbd9efc15eed52fe275097583e.tar.xz
HTML event attributes added as html attributes.
-rw-r--r--module/output/html.scm17
1 files changed, 15 insertions, 2 deletions
diff --git a/module/output/html.scm b/module/output/html.scm
index b8e63202..e671087e 100644
--- a/module/output/html.scm
+++ b/module/output/html.scm
@@ -126,6 +126,15 @@
[_ (error "What are you doing‽")])
(attributes event)))))
+(define (data-attributes event)
+ (hash-map->list
+ (match-lambda*
+ [(key vline)
+ (list (string->symbol (format #f "data-~a" key))
+ (format #f "~a" (value vline)))]
+ [_ (error "What are you doing‽")])
+ (attributes event)))
+
;;; Procedures for wide output
@@ -193,7 +202,10 @@
;; 7 june.
,(when (date<? date (as-date (get-datetime (attr ev 'DTEND))))
" continuing"))
- (style ,style))
+ (style ,style)
+ ;; TODO only if in debug mode?
+ ,@(data-attributes ev))
+
(div (@ (class "event-inner"))
;; NOTE These popup's are far from good. Main problem being that
;; the often render off-screen for events high up on the screen.
@@ -253,7 +265,8 @@
" continuing"
)
)
- (style ,style))
+ (style ,style)
+ ,@(data-attributes ev))
(div (@ (class "event-inner"))
(div (@ (class "popup"))
,(event-debug-html ev))