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