Make clear body-header and body-main are macros
This commit is contained in:
parent
d56575f066
commit
7cc6b8b1bc
1 changed files with 7 additions and 11 deletions
|
@ -21,8 +21,8 @@
|
|||
:download-bs-js
|
||||
:write-html-to-file
|
||||
:with-page
|
||||
:body-header
|
||||
:body-main
|
||||
:with-body-header
|
||||
:with-body-main
|
||||
:remove-special-chars
|
||||
:clean-form-str
|
||||
:build-str-name
|
||||
|
@ -170,25 +170,21 @@ Example usage:
|
|||
,@(loop for url in add-js-urls
|
||||
collect `(:script :src ,url)))))
|
||||
|
||||
(defmacro body-header (container main-heading &body body)
|
||||
(defmacro with-body-header (container-type main-heading lang &body body)
|
||||
`(spinneret:with-html
|
||||
(:header :class "mb-3"
|
||||
(:div :class "skippy visually-hidden-focusable overflow-hidden"
|
||||
(:a :href "#main-content"
|
||||
:class "d-inline-flex p-2 m-1"
|
||||
(t9n "skip-link" "en")))
|
||||
(t9n "skip-link" ,lang)))
|
||||
,@body
|
||||
(:div :class (if ,container
|
||||
(concatenate 'string "container-" ,container)
|
||||
"container")
|
||||
(:div :class (format nil "container~@[-~A~]" ,container-type)
|
||||
(:h1 ,main-heading)))))
|
||||
|
||||
(defmacro body-main (container &body body)
|
||||
(defmacro with-body-main (container-type &body body)
|
||||
`(spinneret:with-html
|
||||
(:main :id "main-content"
|
||||
:class (if ,container
|
||||
(concatenate 'string "container-" ,container)
|
||||
"container")
|
||||
:class (format nil "container~@[-~A~]" ,container-type)
|
||||
,@body)))
|
||||
|
||||
(defun remove-special-chars (str)
|
||||
|
|
Loading…
Add table
Reference in a new issue