diff --git a/src/section.lisp b/src/section.lisp index cf19d59..e36ee4b 100644 --- a/src/section.lisp +++ b/src/section.lisp @@ -13,10 +13,22 @@ #:with-section-row #:with-section-col #:define-section-type + #:titlebar #:with-title-bar)) (in-package :ml-sbt/section) +(defun titlebar (head &rest items) + "Creates a Bootstrap-styled title bar with an optional set of action buttons. + +HEAD: The text for the title bar's heading. + +ITEMS: An optional list of alternating label and URL pairs for action buttons." + (spinneret:with-html + (:div :class "d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom" + (:h* head) + (btn-group-outline-primary items)))) + (defmacro with-title-bar (head &rest items) "Creates a Bootstrap-styled title bar with an optional set of action buttons.