diff --git a/src/section.lisp b/src/section.lisp index d649070..a7af66b 100644 --- a/src/section.lisp +++ b/src/section.lisp @@ -6,9 +6,14 @@ (in-package :ml-sbt/section) -(defmacro with-section (headline &body body) +(defmacro with-section ((headline &optional functions) &body body) `(spinneret:with-html (: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" - (: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)))