aboutsummaryrefslogtreecommitdiff
path: root/module/calp/html/components.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-06-23 03:23:44 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2022-06-23 03:48:22 +0200
commit1976980d4a272fb7fc3694c734bfc6825edfc721 (patch)
tree8460db1176c64895e9968447588953fac85fe7d6 /module/calp/html/components.scm
parentRemove all inline use-modules. (diff)
downloadcalp-1976980d4a272fb7fc3694c734bfc6825edfc721.tar.gz
calp-1976980d4a272fb7fc3694c734bfc6825edfc721.tar.xz
Centralize (almost) all exports to :export in define-module.
Diffstat (limited to 'module/calp/html/components.scm')
-rw-r--r--module/calp/html/components.scm32
1 files changed, 19 insertions, 13 deletions
diff --git a/module/calp/html/components.scm b/module/calp/html/components.scm
index a36dbef9..2b7f58bd 100644
--- a/module/calp/html/components.scm
+++ b/module/calp/html/components.scm
@@ -3,8 +3,14 @@
:use-module (ice-9 curried-definitions)
:use-module (ice-9 match)
:use-module (calp translation)
- :export (xhtml-doc)
- )
+ :export (xhtml-doc
+ slider-input
+ btn
+ tabset
+ include-css
+ include-alt-css
+ input-plus-minus
+ ))
;; Wraps a number of sxml forms into a valid sxhtml-tree.
(define-syntax xhtml-doc
@@ -20,12 +26,12 @@
;; Add a slider with an associated number input. Keeps the two in sync.
-(define*-public (slider-input key: variable
- (min 0)
- (max 10)
- (step 1)
- (value 1)
- (unit ""))
+(define* (slider-input key: variable
+ (min 0)
+ (max 10)
+ (step 1)
+ (value 1)
+ (unit ""))
`(slider-input
(@ (min ,min)
@@ -37,7 +43,7 @@
variable unit)))))
;; Generates a button or button-like link.
-(define*-public (btn key: onclick href (class '())
+(define* (btn key: onclick href (class '())
allow-other-keys:
rest: args)
(when (and onclick href)
@@ -80,7 +86,7 @@
;; @end example
;; Creates a tab with an calendar emoji as icon, "Översikt" is sent as the
;; extra argument #:title, and the body is the return from fmt-single-event.
-(define-public (tabset elements)
+(define (tabset elements)
(define tabgroup (symbol->string (gensym "tabgroup")))
`(div (@ (class "tabgroup"))
@@ -110,21 +116,21 @@
,@inner-body)]))
-(define-public (include-css path . extra-attributes)
+(define (include-css path . extra-attributes)
`(link (@ (type "text/css")
(rel "stylesheet")
(href ,path)
,@extra-attributes)))
-(define-public (include-alt-css path . extra-attributes)
+(define (include-alt-css path . extra-attributes)
`(link (@ (type "text/css")
(rel "alternate stylesheet")
(href ,path)
,@extra-attributes)))
-(define-public (input-plus-minus positive?)
+(define (input-plus-minus positive?)
(define id (gensym "id"))
`(span (@ (class "input-timespan"))
(input (@ (type "checkbox")