Redefine and export symbols
This commit is contained in:
parent
53d1c80b2d
commit
690fc888be
5 changed files with 80 additions and 56 deletions
|
@ -5,7 +5,10 @@
|
|||
:depends-on (:spinneret)
|
||||
:components ((:module "src"
|
||||
:components
|
||||
((:file "main"))))
|
||||
((:file "main")
|
||||
(:file "buttons")
|
||||
(:file "accordion")
|
||||
(:file "alerts"))))
|
||||
:description ""
|
||||
:in-order-to ((test-op (test-op "cl-sbt/tests"))))
|
||||
|
||||
|
|
19
src/accordion.lisp
Normal file
19
src/accordion.lisp
Normal file
|
@ -0,0 +1,19 @@
|
|||
(in-package :cl-sbt)
|
||||
|
||||
(defmacro accordion-item ()
|
||||
`(spinneret:with-html
|
||||
(:div :class "accordion-item"
|
||||
(:h2 :class "accordion-header"
|
||||
(:button :class "accordion-button"
|
||||
:type "button"
|
||||
:data-bs-toggle="collapse"
|
||||
:data-bs-target="#collapseOne"
|
||||
:aria-expanded="true"
|
||||
:aria-controls="collapseOne"
|
||||
"Accordion Item #1")))))
|
||||
|
||||
(defmacro accordion ()
|
||||
`(spinneret:with-html
|
||||
(:div :class "accordion"
|
||||
:id "accordionExample"
|
||||
(sbt-accordion-item))))
|
|
@ -1,6 +1,6 @@
|
|||
(in-package :cl-sbt)
|
||||
|
||||
(defmacro sbt-alert ((&key (type nil) (dismissible nil)) &body body)
|
||||
(defmacro alert ((&key (type nil) (dismissible nil)) &body body)
|
||||
`(spinneret:with-html
|
||||
(:div :class ,(if dismissible
|
||||
(format nil "alert alert-~a alert-dismissible" type)
|
||||
|
@ -10,26 +10,26 @@
|
|||
(:span :aria-hidden "true" "×")))
|
||||
,@body)))
|
||||
|
||||
(defmacro sbt-alert-primary (&body body)
|
||||
`(sbt-alert (:type "primary") ,@body))
|
||||
(defmacro alert-primary (&body body)
|
||||
`(alert (:type "primary") ,@body))
|
||||
|
||||
(defmacro sbt-alert-secondary (&body body)
|
||||
`(sbt-alert (:type "secondary") ,@body))
|
||||
(defmacro alert-secondary (&body body)
|
||||
`(alert (:type "secondary") ,@body))
|
||||
|
||||
(defmacro sbt-alert-success (&body body)
|
||||
`(sbt-alert (:type "success") ,@body))
|
||||
(defmacro alert-success (&body body)
|
||||
`(alert (:type "success") ,@body))
|
||||
|
||||
(defmacro sbt-alert-danger (&body body)
|
||||
`(sbt-alert (:type "danger") ,@body))
|
||||
(defmacro alert-danger (&body body)
|
||||
`(alert (:type "danger") ,@body))
|
||||
|
||||
(defmacro sbt-alert-warning (&body body)
|
||||
`(sbt-alert (:type "warning") ,@body))
|
||||
(defmacro alert-warning (&body body)
|
||||
`(alert (:type "warning") ,@body))
|
||||
|
||||
(defmacro sbt-alert-info (&body body)
|
||||
`(sbt-alert (:type "info") ,@body))
|
||||
(defmacro alert-info (&body body)
|
||||
`(alert (:type "info") ,@body))
|
||||
|
||||
(defmacro sbt-alert-ligth (&body body)
|
||||
`(sbt-alert (:type "light") ,@body))
|
||||
(defmacro alert-light (&body body)
|
||||
`(alert (:type "light") ,@body))
|
||||
|
||||
(defmacro sbt-alert-dark (&body body)
|
||||
`(sbt-alert (:type "dark") ,@body))
|
||||
(defmacro alert-dark (&body body)
|
||||
`(alert (:type "dark") ,@body))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
(in-package :cl-sbt)
|
||||
|
||||
(defmacro sbt-btn ((&key (type nil) (size nil)) &body body)
|
||||
(defmacro btn ((&key (type nil) (size nil)) &body body)
|
||||
`(spinneret:with-html
|
||||
(:button :type "button"
|
||||
:class (concatenate 'string "btn"
|
||||
|
@ -8,56 +8,56 @@
|
|||
(if ,size (format nil " btn-~a" ,size)))
|
||||
,@body)))
|
||||
|
||||
(defmacro sbt-btn-primary (&body body)
|
||||
`(sbt-btn (:type "primary") ,@body))
|
||||
(defmacro btn-primary (&body body)
|
||||
`(btn (:type "primary") ,@body))
|
||||
|
||||
(defmacro sbt-btn-secondary (&body body)
|
||||
`(sbt-btn (:type "secondary") ,@body))
|
||||
(defmacro btn-secondary (&body body)
|
||||
`(btn (:type "secondary") ,@body))
|
||||
|
||||
(defmacro sbt-btn-success (&body body)
|
||||
`(sbt-btn (:type "success") ,@body))
|
||||
(defmacro btn-success (&body body)
|
||||
`(btn (:type "success") ,@body))
|
||||
|
||||
(defmacro sbt-btn-danger (&body body)
|
||||
`(sbt-btn (:type "danger") ,@body))
|
||||
(defmacro btn-danger (&body body)
|
||||
`(btn (:type "danger") ,@body))
|
||||
|
||||
(defmacro sbt-btn-warning (&body body)
|
||||
`(sbt-btn (:type "warning") ,@body))
|
||||
(defmacro btn-warning (&body body)
|
||||
`(btn (:type "warning") ,@body))
|
||||
|
||||
(defmacro sbt-btn-info (&body body)
|
||||
`(sbt-btn (:type "info") ,@body))
|
||||
(defmacro btn-info (&body body)
|
||||
`(btn (:type "info") ,@body))
|
||||
|
||||
(defmacro sbt-btn-light (&body body)
|
||||
`(sbt-btn (:type "light") ,@body))
|
||||
(defmacro btn-light (&body body)
|
||||
`(btn (:type "light") ,@body))
|
||||
|
||||
(defmacro sbt-btn-dark (&body body)
|
||||
`(sbt-btn (:type "dark") ,@body))
|
||||
(defmacro btn-dark (&body body)
|
||||
`(btn (:type "dark") ,@body))
|
||||
|
||||
(defmacro sbt-btn-link (&body body)
|
||||
`(sbt-btn (:type "link") ,@body))
|
||||
(defmacro btn-link (&body body)
|
||||
`(btn (:type "link") ,@body))
|
||||
|
||||
(defmacro sbt-btn-outline-primary (&body body)
|
||||
`(sbt-btn (:type "outline-primary") ,@body))
|
||||
(defmacro btn-outline-primary (&body body)
|
||||
`(btn (:type "outline-primary") ,@body))
|
||||
|
||||
(defmacro sbt-btn-outline-secondary (&body body)
|
||||
`(sbt-btn (:type "outline-secondary") ,@body))
|
||||
(defmacro btn-outline-secondary (&body body)
|
||||
`(btn (:type "outline-secondary") ,@body))
|
||||
|
||||
(defmacro sbt-btn-outline-success (&body body)
|
||||
`(sbt-btn (:type "outline-success") ,@body))
|
||||
(defmacro btn-outline-success (&body body)
|
||||
`(btn (:type "outline-success") ,@body))
|
||||
|
||||
(defmacro sbt-btn-outline-danger (&body body)
|
||||
`(sbt-btn (:type "outline-danger") ,@body))
|
||||
(defmacro btn-outline-danger (&body body)
|
||||
`(btn (:type "outline-danger") ,@body))
|
||||
|
||||
(defmacro sbt-btn-outline-warning (&body body)
|
||||
`(sbt-btn (:type "outline-warning") ,@body))
|
||||
(defmacro btn-outline-warning (&body body)
|
||||
`(btn (:type "outline-warning") ,@body))
|
||||
|
||||
(defmacro sbt-btn-outline-info (&body body)
|
||||
`(sbt-btn (:type "outline-info") ,@body))
|
||||
(defmacro btn-outline-info (&body body)
|
||||
`(btn (:type "outline-info") ,@body))
|
||||
|
||||
(defmacro sbt-btn-outline-light (&body body)
|
||||
`(sbt-btn (:type "outline-light") ,@body))
|
||||
(defmacro btn-outline-light (&body body)
|
||||
`(btn (:type "outline-light") ,@body))
|
||||
|
||||
(defmacro sbt-btn-outline-dark (&body body)
|
||||
`(sbt-btn (:type "outline-dark") ,@body))
|
||||
(defmacro btn-outline-dark (&body body)
|
||||
`(btn (:type "outline-dark") ,@body))
|
||||
|
||||
(defmacro sbt-btn-outline-link (&body body)
|
||||
`(sbt-btn (:type "outline-link") ,@body))
|
||||
(defmacro btn-outline-link (&body body)
|
||||
`(btn (:type "outline-link") ,@body))
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
(defpackage cl-sbt
|
||||
(:use :cl))
|
||||
(:use :cl)
|
||||
(:export :alert :alert-primary :alert-secondary :alert-success :alert-danger :alert-warning :alert-info :alert-light :alert-dark :btn :btn-primary :btn-secondary :btn-success :btn-danger :btn-warning :btn-info :btn-light :btn-dark :btn-link :btn-outline-primary :btn-outline-secondary :btn-outline-success :btn-outline-danger :btn-outline-warning :btn-outline-info :btn-outline-light :btn-outline-dark :btn-outline-link))
|
||||
|
||||
(in-package :cl-sbt)
|
||||
|
|
Loading…
Add table
Reference in a new issue