From 8314b6f9cfb618e7d1cd8947e7da6ad531248a61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sat, 23 May 2020 01:13:00 +0200 Subject: HTML add debug parameter. --- module/output/html.scm | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'module/output/html.scm') diff --git a/module/output/html.scm b/module/output/html.scm index a80b26e9..efe93ab8 100644 --- a/module/output/html.scm +++ b/module/output/html.scm @@ -32,6 +32,7 @@ "" procedure?) +(define debug (make-parameter #f)) (define* (slider-input key: variable (min 0) @@ -203,8 +204,7 @@ (string= "TENTATIVE" (attr ev 'PARTSTAT))) " tentative")) (data-tipped-options ,(format #f "inline: '~a'" popup-id)) - ;; TODO only if in debug mode? - ,@(data-attributes ev)))) + ,@(when (debug) (data-attributes ev))))) ,(when (attr ev 'RRULE) `(span (@ (class "repeating")) "↺")) ,((get-config 'summary-filter) ev (attr ev 'SUMMARY)) @@ -729,25 +729,25 @@ (div (@ (style "grid-area: details")) - ;; TODO only include these sliders in debug builds - (details (@ (class "sliders")) - (summary "Option sliders") - (label "Event blankspace") - ,(slider-input - variable: "editmode" - min: 0 - max: 1 - step: 0.01 - value: 1) - - (label "Fontsize") - ,(slider-input - unit: "pt" - min: 1 - max: 20 - step: 1 - value: 8 - variable: "event-font-size")) + ,(when (debug) + `(details (@ (class "sliders")) + (summary "Option sliders") + (label "Event blankspace") + ,(slider-input + variable: "editmode" + min: 0 + max: 1 + step: 0.01 + value: 1) + + (label "Fontsize") + ,(slider-input + unit: "pt" + min: 1 + max: 20 + step: 1 + value: 8 + variable: "event-font-size"))) ;; List of calendars (details (@ (class "calendarlist")) -- cgit v1.2.3