From 336856152c5b4bb395280abb098d50da9a5c1401 Mon Sep 17 00:00:00 2001 From: Marcus Kammer Date: Wed, 31 Jul 2024 18:26:25 +0200 Subject: [PATCH] Add section macro --- src/section.lisp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/section.lisp diff --git a/src/section.lisp b/src/section.lisp new file mode 100644 index 0000000..d649070 --- /dev/null +++ b/src/section.lisp @@ -0,0 +1,14 @@ +;;;; -*- mode: common-lisp; coding: utf-8; -*- + +(defpackage ml-sbt/section + (:use :cl) + (:export :with-section)) + +(in-package :ml-sbt/section) + +(defmacro with-section (headline &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)) + ,@body)))