diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-12-21 16:17:28 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-12-22 22:58:30 +0100 |
commit | d00fea566004e67161ee45246b239fff5d416b0e (patch) | |
tree | 5641c0c0d0e78b046b6045ed2440512f12259560 /module/calp/html | |
parent | Complete rewrite of use2dot (diff) | |
download | calp-d00fea566004e67161ee45246b239fff5d416b0e.tar.gz calp-d00fea566004e67161ee45246b239fff5d416b0e.tar.xz |
Cleanup modules.
Primarly this moves all vcompenent input and output code to clearly
labeled modules, instead of being spread out. At the same time it also
removes a handfull of unused procedures.
Diffstat (limited to 'module/calp/html')
-rw-r--r-- | module/calp/html/components.scm | 1 | ||||
-rw-r--r-- | module/calp/html/vcomponent.scm | 8 | ||||
-rw-r--r-- | module/calp/html/view/calendar.scm | 8 | ||||
-rw-r--r-- | module/calp/html/view/calendar/month.scm | 2 | ||||
-rw-r--r-- | module/calp/html/view/calendar/week.scm | 2 | ||||
-rw-r--r-- | module/calp/html/view/search.scm | 2 |
6 files changed, 9 insertions, 14 deletions
diff --git a/module/calp/html/components.scm b/module/calp/html/components.scm index 1d677c0d..36ec5166 100644 --- a/module/calp/html/components.scm +++ b/module/calp/html/components.scm @@ -1,6 +1,5 @@ (define-module (calp html components) :use-module (calp util) - :use-module (calp util exceptions) :use-module (ice-9 curried-definitions) :use-module (ice-9 match) :export (xhtml-doc) diff --git a/module/calp/html/vcomponent.scm b/module/calp/html/vcomponent.scm index 3e7cc4dc..2abf370d 100644 --- a/module/calp/html/vcomponent.scm +++ b/module/calp/html/vcomponent.scm @@ -1,11 +1,9 @@ (define-module (calp html vcomponent) :use-module (calp util) - :use-module ((calp util exceptions) :select (warning)) - :use-module (vcomponent) :use-module (srfi srfi-1) - :use-module (srfi srfi-26) :use-module (srfi srfi-41) :use-module ((rnrs io ports) :select (put-bytevector)) + :use-module (vcomponent) :use-module (datetime) :use-module ((text util) :select (add-enumeration-punctuation)) :use-module ((web uri-query) :select (encode-query-parameters)) @@ -16,7 +14,6 @@ :use-module ((crypto) :select (sha256 checksum->string)) :use-module ((xdg basedir) :prefix xdg-) :use-module ((vcomponent recurrence) :select (repeating?)) - :use-module ((vcomponent recurrence internal) :prefix #{rrule:}#) :use-module ((vcomponent datetime output) :select (fmt-time-span format-description @@ -169,7 +166,7 @@ (src ,link)))))))) ;; URI (cond ((and=> (param attach 'FMTTYPE) - (compose (cut string= <> "image" 0 5) car)) + (lambda (p) (string=? (car p) "image" 0 5))) `(img (@ (class "attach") (src ,(value attach))))) (else `(a (@ (class "attach") @@ -289,6 +286,7 @@ "🗎"))))))) +;; TODO possibly unused? (define (repeat-info event) `(div (@ (class "eventtext")) (h2 "Upprepningar") diff --git a/module/calp/html/view/calendar.scm b/module/calp/html/view/calendar.scm index aa311fcb..64fafb3d 100644 --- a/module/calp/html/view/calendar.scm +++ b/module/calp/html/view/calendar.scm @@ -3,8 +3,6 @@ :use-module (vcomponent) :use-module ((vcomponent datetime) :select (events-between)) - :use-module ((vcomponent build) - :select (vcalendar vevent)) :use-module (datetime) :use-module (calp html components) :use-module ((calp html vcomponent) @@ -26,7 +24,7 @@ :use-module (srfi srfi-41 util) :use-module ((vcomponent recurrence) :select (repeating? generate-recurrence-set)) - :use-module ((vcomponent group) + :use-module ((vcomponent util group) :select (group-stream get-groups-between)) :use-module ((base64) :select (base64encode)) ) @@ -406,6 +404,6 @@ window.default_calendar='~a';" ;; rendered as xcal. (div (@ (style "display:none !important;") (id "xcal-data")) - ,((@ (vcomponent xcal output) ns-wrap) - (map (@ (vcomponent xcal output) vcomponent->sxcal) + ,((@ (vcomponent formats xcal output) ns-wrap) + (map (@ (vcomponent formats xcal output) vcomponent->sxcal) (append regular repeating))))))))) diff --git a/module/calp/html/view/calendar/month.scm b/module/calp/html/view/calendar/month.scm index 02689fd5..6506b0ea 100644 --- a/module/calp/html/view/calendar/month.scm +++ b/module/calp/html/view/calendar/month.scm @@ -12,7 +12,7 @@ events-between)) :use-module ((calp html vcomponent) :select (make-block output-uid)) - :use-module ((vcomponent group) + :use-module ((vcomponent util group) :select (group-stream get-groups-between)) ) diff --git a/module/calp/html/view/calendar/week.scm b/module/calp/html/view/calendar/week.scm index 499de1d6..1714c6c4 100644 --- a/module/calp/html/view/calendar/week.scm +++ b/module/calp/html/view/calendar/week.scm @@ -17,7 +17,7 @@ :select (make-block output-uid) ) ;; :use-module ((calp html components) ;; :select ()) - :use-module ((vcomponent group) + :use-module ((vcomponent util group) :select (group-stream get-groups-between)) ) diff --git a/module/calp/html/view/search.scm b/module/calp/html/view/search.scm index c356baec..b939e7a2 100644 --- a/module/calp/html/view/search.scm +++ b/module/calp/html/view/search.scm @@ -1,7 +1,7 @@ (define-module (calp html view search) :use-module (calp util) :use-module (vcomponent) - :use-module (vcomponent search) + :use-module (vcomponent util search) :use-module ((ice-9 pretty-print) :select (pretty-print)) :use-module ((web uri-query) :select (encode-query-parameters)) :use-module ((calp html components) |