From 4810e380ed10c1983f00944d31716f1d0683b6a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Tue, 23 Apr 2019 19:12:48 +0200 Subject: Add command line option parsing. --- module/html/html.scm | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to 'module/html/html.scm') diff --git a/module/html/html.scm b/module/html/html.scm index 467ed413..3dcfdb55 100644 --- a/module/html/html.scm +++ b/module/html/html.scm @@ -145,19 +145,20 @@ car) (group-stream events))) - `(html (head - (title "Calendar") - (meta (@ (charset "utf-8"))) - ,(include-css "static/style.css") - (style ,(format #f "~:{.CAL_~a { background-color: ~a; color: ~a }~%~}" - (map (lambda (c) - (list (html-attr (if (pair? (attr c 'NAME)) - (car (attr c 'NAME)) - (attr c 'NAME))) - (or (attr c 'COLOR) "white") - (or (and=> (attr c 'COLOR) calculate-fg-color) "black"))) - calendars)))) - (body (div (@ (class "calendar")) - ,@(time-marker-div) - (div (@ (class "days")) - ,@(stream->list (stream-map lay-out-day evs))))))) + ((@ (sxml simple) sxml->xml) + `(html (head + (title "Calendar") + (meta (@ (charset "utf-8"))) + ,(include-css "static/style.css") + (style ,(format #f "~:{.CAL_~a { background-color: ~a; color: ~a }~%~}" + (map (lambda (c) + (list (html-attr (if (pair? (attr c 'NAME)) + (car (attr c 'NAME)) + (attr c 'NAME))) + (or (attr c 'COLOR) "white") + (or (and=> (attr c 'COLOR) calculate-fg-color) "black"))) + calendars)))) + (body (div (@ (class "calendar")) + ,@(time-marker-div) + (div (@ (class "days")) + ,@(stream->list (stream-map lay-out-day evs)))))))) -- cgit v1.2.3