Add optional functions to with-section
This commit is contained in:
parent
2f60f80d04
commit
9c79b7b5e5
1 changed files with 7 additions and 2 deletions
|
@ -6,9 +6,14 @@
|
||||||
|
|
||||||
(in-package :ml-sbt/section)
|
(in-package :ml-sbt/section)
|
||||||
|
|
||||||
(defmacro with-section (headline &body body)
|
(defmacro with-section ((headline &optional functions) &body body)
|
||||||
`(spinneret:with-html
|
`(spinneret:with-html
|
||||||
(:section :class "mb-3"
|
(:section :class "mb-3"
|
||||||
(:div :class "d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom"
|
(:div :class "d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom"
|
||||||
(:h* ,headline))
|
(:h* ,headline)
|
||||||
|
,@(loop for (label url) on functions by #'cddr
|
||||||
|
when functions
|
||||||
|
collect `(:a :class "btn btn-outline-primary"
|
||||||
|
:href ,url
|
||||||
|
,label)))
|
||||||
,@body)))
|
,@body)))
|
||||||
|
|
Loading…
Add table
Reference in a new issue