Update badges
This commit is contained in:
parent
2d70b291f6
commit
4c21a5049c
1 changed files with 27 additions and 2 deletions
|
@ -1,13 +1,38 @@
|
||||||
|
;; https://getbootstrap.com/docs/5.3/components/badge/
|
||||||
|
|
||||||
(in-package :cl-sbt)
|
(in-package :cl-sbt)
|
||||||
|
|
||||||
(defmacro badge ((&key (classes nil)) &body body)
|
(defmacro badge ((&key (classes nil)) &body body)
|
||||||
"https://getbootstrap.com/docs/5.3/components/badge/
|
"https://getbootstrap.com/docs/5.3/components/badge/
|
||||||
Documentation and examples for badges, our small count and labeling component."
|
Documentation and examples for badges, our small count and labeling component."
|
||||||
`(spinneret:with-html
|
`(spinneret:with-html
|
||||||
(:span :class (concatenate 'string "badge"
|
(:span :class (concatenate 'string "badge " ,classes)
|
||||||
(if ,classes (format nil " ~a" ,classes)))
|
|
||||||
,@body)))
|
,@body)))
|
||||||
|
|
||||||
|
(defmacro badge-primary (&body body)
|
||||||
|
`(badge (:classes "text-bg-primary") ,@body))
|
||||||
|
|
||||||
|
(defmacro badge-secondary (&body body)
|
||||||
|
`(badge (:classes "text-bg-secondary") ,@body))
|
||||||
|
|
||||||
|
(defmacro badge-success (&body body)
|
||||||
|
`(badge (:classes "text-bg-success") ,@body))
|
||||||
|
|
||||||
|
(defmacro badge-danger (&body body)
|
||||||
|
`(badge (:classes "text-bg-danger") ,@body))
|
||||||
|
|
||||||
|
(defmacro badge-warning (&body body)
|
||||||
|
`(badge (:classes "text-bg-warning") ,@body))
|
||||||
|
|
||||||
|
(defmacro badge-info (&body body)
|
||||||
|
`(badge (:classes "text-bg-info") ,@body))
|
||||||
|
|
||||||
|
(defmacro badge-light (&body body)
|
||||||
|
`(badge (:classes "text-bg-light") ,@body))
|
||||||
|
|
||||||
|
(defmacro badge-dark (&body body)
|
||||||
|
`(badge (:classes "text-bg-dark") ,@body))
|
||||||
|
|
||||||
(defmacro badge-pill-primary (&body body)
|
(defmacro badge-pill-primary (&body body)
|
||||||
`(badge (:classes "rounded-pill text-bg-primary") ,@body))
|
`(badge (:classes "rounded-pill text-bg-primary") ,@body))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue