Add tables

This commit is contained in:
Marcus Kammer 2023-07-02 13:21:47 +02:00
parent f6f90d4cfe
commit 32781d8d88
Signed by: marcuskammer
GPG key ID: C374817BE285268F
3 changed files with 29 additions and 2 deletions

View file

@ -10,7 +10,8 @@
(:file "buttons")
(:file "accordion")
(:file "alerts")
(:file "dropdowns"))))
(:file "dropdowns")
(:file "tables"))))
:description ""
:in-order-to ((test-op (test-op "cl-sbt/tests"))))

View file

@ -1,5 +1,5 @@
(defpackage cl-sbt
(:use :cl)
(:export :alert :alert-primary :alert-secondary :alert-success :alert-danger :alert-warning :alert-info :alert-light :alert-dark :badge :badge-pill-primary :badge-pill-secondary :badge-pill-success :badge-pill-danger :badge-pill-warning :badge-pill-info :badge-pill-light :badge-pill-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 :dropdown :dropdown-menu :dropdown-item :pagination :pagination-with-icons))
(:export :alert :alert-primary :alert-secondary :alert-success :alert-danger :alert-warning :alert-info :alert-light :alert-dark :badge :badge-pill-primary :badge-pill-secondary :badge-pill-success :badge-pill-danger :badge-pill-warning :badge-pill-info :badge-pill-light :badge-pill-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 :dropdown :dropdown-menu :dropdown-item :pagination :pagination-with-icons :table :table-striped :table-bordered :table-hover :table-condensed))
(in-package :cl-sbt)

26
src/tables.lisp Normal file
View file

@ -0,0 +1,26 @@
(in-package :cl-sbt)
(defmacro table (&body body)
`(spinneret:with-html
(:table :class "table"
,@body)))
(defmacro table-striped (&body body)
`(spinneret:with-html
(:table :class "table table-striped"
,@body)))
(defmacro table-bordered (&body body)
`(spinneret:with-html
(:table :class "table table-bordered"
,@body)))
(defmacro table-hover (&body body)
`(spinneret:with-html
(:table :class "table table-hover"
,@body)))
(defmacro table-condensed (&body body)
`(spinneret:with-html
(:table :class "table table-condensed"
,@body)))