Render titlebar

This commit is contained in:
Marcus Kammer 2025-01-23 08:14:58 +01:00
parent 7cc6b8b1bc
commit bf7760b95d
Signed by: marcuskammer
GPG key ID: C374817BE285268F

View file

@ -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.