Add docstring to macro

This commit is contained in:
Marcus Kammer 2024-06-23 13:07:45 +02:00
parent 00599f0751
commit b70b23bfcc
Signed by: marcuskammer
GPG key ID: C374817BE285268F

View file

@ -13,10 +13,17 @@
nil) nil)
(defmacro with-form (&body body) (defmacro with-form (&body body)
"Create a standardized HTML form wrapped in a <main> tag with a pre-defined
class and structure, using the Spinneret library. The form is designed to be
used within a web application served by Hunchentoot, utilizing common layout
and localization practices. The macro automatically sets the forms action to
the current request URI and expects certain functions and variables to be
available in its environment for full functionality."
`(spinneret:with-html `(spinneret:with-html
(:main :id "main-content" (:main :id "main-content"
:class "container my-5" :class "container my-5"
(:p "Please fill out the following forms and press the submit button.") (:p "Please fill out the following forms and press the submit button.")
;; action is defined as hunchentoot:request-uri* function
(:form :action (request-uri*) (:form :action (request-uri*)
:method "post" :method "post"
:class (spacing :property "m" :side "y" :size 5) :class (spacing :property "m" :side "y" :size 5)