Fix errors

This commit is contained in:
Marcus Kammer 2024-01-24 14:46:44 +01:00
parent 61f3e5d50e
commit ad78b3a0cc

View file

@ -19,46 +19,50 @@
(in-package :dev.metalisp.sbt/page)
(defparameter *bs-version* "5.3.2")
(defparameter *use-cdn* t)
(defparameter *cdn-css-url*
(concatenate 'string
"https://cdn.jsdelivr.net/npm/bootstrap@"
*bs-version*
"/dist/css/bootstrap.min.css"))
(defparameter *cdn-js-url*
(concatenate 'string
"https://cdn.jsdelivr.net/npm/bootstrap@"
*bs-version*
"/dist/js/bootstrap.bundle.min.js"))
(defun get-cdn-css
(if *use-cdn*
(:link :type "text/css" :rel "stylesheet" :href *cdn-css-url*)
(:link :type "text/css" :rel "stylesheet" :href "5.3.0/bootstrap.min.css")))
(defparameter *color-theme* "dark")
(defmacro with-page ((&key (author "") (description "") (cdn t) (pagetitle "") (theme "dark")) &body body)
(defmacro with-page ((&key (author "") (description "") (pagetitle "")) &body body)
`(spinneret:with-html
(:doctype)
(:html :data-bs-theme ,theme
(:html :data-bs-theme ,*color-theme*
(:head
(:meta :charset "utf-8")
(:meta :name "viewport" :content "width=device-width, initial-scale=1")
(:meta :name "author" :content ,author)
(:meta :name "description" :content ,description)
(:title ,pagetitle)
(if *use-cdn*
(:link :type "text/css" :rel "stylesheet" :href ,*cdn-css-url*)
(:link :type "text/css" :rel "stylesheet" :href "5.3.0/bootstrap.min.css"))
(:body (:h1 :class "visually-hidden" ,pagetitle)
(:main ,@body))
(if ,cdn
(:script :src *cdn-js*)
(:script :src "5.3.0/bootstrap.bundle.min.js")))))
(if ,*use-cdn*
(:script :src *cdn-js-url*)
(:script :src "5.3.0/bootstrap.bundle.min.js"))))))
(defmacro with-landing-page)
(defmacro with-blogpost-page)
(defmacro with-product-page)
(defmacro with-contact-page)
(defmacro with-portfolio-page)
(defmacro with-error-page)
(defmacro with-login-page)
(defmacro with-dashboard-page)
(defmacro with-about-page)
(defmacro with-faq-page)
(defmacro with-tos-page)
(defmacro with-landing-page ())
(defmacro with-blogpost-page ())
(defmacro with-product-page ())
(defmacro with-contact-page ())
(defmacro with-portfolio-page ())
(defmacro with-error-page ())
(defmacro with-login-page ())
(defmacro with-dashboard-page ())
(defmacro with-about-page ())
(defmacro with-faq-page ())
(defmacro with-tos-page ())