diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-01-13 19:32:06 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-01-13 19:33:34 +0100 |
commit | 41ac219bbea39293aab220fe74f9fe200039a587 (patch) | |
tree | 8bc41723c99b4d3e940084b6ea8628353d205e1a | |
parent | Broke event_to_jcal out into function. (diff) | |
download | calp-41ac219bbea39293aab220fe74f9fe200039a587.tar.gz calp-41ac219bbea39293aab220fe74f9fe200039a587.tar.xz |
Add debug buttons in popup for dumping xcal and jcal.
Diffstat (limited to '')
-rw-r--r-- | module/calp/html/vcomponent.scm | 14 | ||||
-rw-r--r-- | static/style.scss | 8 |
2 files changed, 18 insertions, 4 deletions
diff --git a/module/calp/html/vcomponent.scm b/module/calp/html/vcomponent.scm index ae8dd1e2..cd8c207e 100644 --- a/module/calp/html/vcomponent.scm +++ b/module/calp/html/vcomponent.scm @@ -550,10 +550,16 @@ ("⤓" title: "Nedladdning" (div (@ (class "eventtext") (style "font-family:sans")) (h2 "Ladda ner") - (ul (li (a (@ (href "/calendar/" ,(prop ev 'UID) ".ics")) - "som iCal")) - (li (a (@ (href "/calendar/" ,(prop ev 'UID) ".xcs")) - "som xCal"))))) + (div (@ (class "side-by-side")) + (ul (li (a (@ (href "/calendar/" ,(prop ev 'UID) ".ics")) + "som iCal")) + (li (a (@ (href "/calendar/" ,(prop ev 'UID) ".xcs")) + "som xCal"))) + ,@(when (debug) + `((ul + (li (button (@ (onclick "console.log(event_to_jcal(event_from_popup(this.closest('.popup-container'))));")) "js")) + (li (button (@ (onclick "console.log(jcal_to_xcal(event_to_jcal(event_from_popup(this.closest('.popup-container')))));")) "xml")))))) + )) ,@(when (prop ev 'RRULE) `(("↺" title: "Upprepningar" class: "repeating" diff --git a/static/style.scss b/static/style.scss index 4cd6b410..2d6b87b6 100644 --- a/static/style.scss +++ b/static/style.scss @@ -173,6 +173,10 @@ html, body { } } +li > button { + width: 100%; +} + /* Eventlist ---------------------------------------- The sidebar with all the events @@ -944,6 +948,10 @@ along with their colors. background-color: var(--color); } +.side-by-side { + display: flex; +} + /* Icalendar ---------------------------------------- */ |