From 40c20dd98f31138cb4e27e6ab8ccfe16c250179d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Tue, 23 Apr 2019 17:11:27 +0200 Subject: Reorder CSS output for event size. --- module/html/html.scm | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/module/html/html.scm b/module/html/html.scm index 6c77030b..afe34963 100644 --- a/module/html/html.scm +++ b/module/html/html.scm @@ -69,7 +69,11 @@ never on absolute times. For that see date->decimal-hour" (define (vevent->sxml day ev) (define time (date->time-utc day)) (define style - (format #f "top: ~,3f%; left: ~,3f%; height: ~,3f%; width: ~,3f%;" + (format #f "left:~,3f%;width:~,3f%;top:~,3f%;height:~,3f%;" + + (* 100 (x-pos ev)) ; left + (* 100 (width ev)) ; width + ;; top (if (in-day? day (attr ev 'DTSTART)) (* (/ 24) 100 @@ -78,9 +82,6 @@ never on absolute times. For that see date->decimal-hour" (start-of-day* (attr ev 'DTSTART))))) 0) - ;; left - (* 100 (x-pos ev)) - ;; height (* (/ 24) 100 (time->decimal-hour @@ -98,11 +99,8 @@ never on absolute times. For that see date->decimal-hour" (attr ev 'DTSTART)) ;; start earlier, end earlier (time-difference (add-day time) - time))))) + time))))))) - ;; width - (* 100 (width ev)) - )) `(div (@ (class "event CAL_" ,(html-attr (let ((l (attr (parent ev) 'NAME))) (if (pair? l) (car l) l))) ,(if (time