Fix errors
This commit is contained in:
parent
61f3e5d50e
commit
ad78b3a0cc
1 changed files with 24 additions and 20 deletions
|
@ -19,46 +19,50 @@
|
||||||
(in-package :dev.metalisp.sbt/page)
|
(in-package :dev.metalisp.sbt/page)
|
||||||
|
|
||||||
(defparameter *bs-version* "5.3.2")
|
(defparameter *bs-version* "5.3.2")
|
||||||
|
|
||||||
|
(defparameter *use-cdn* t)
|
||||||
|
|
||||||
(defparameter *cdn-css-url*
|
(defparameter *cdn-css-url*
|
||||||
(concatenate 'string
|
(concatenate 'string
|
||||||
"https://cdn.jsdelivr.net/npm/bootstrap@"
|
"https://cdn.jsdelivr.net/npm/bootstrap@"
|
||||||
*bs-version*
|
*bs-version*
|
||||||
"/dist/css/bootstrap.min.css"))
|
"/dist/css/bootstrap.min.css"))
|
||||||
|
|
||||||
(defparameter *cdn-js-url*
|
(defparameter *cdn-js-url*
|
||||||
(concatenate 'string
|
(concatenate 'string
|
||||||
"https://cdn.jsdelivr.net/npm/bootstrap@"
|
"https://cdn.jsdelivr.net/npm/bootstrap@"
|
||||||
*bs-version*
|
*bs-version*
|
||||||
"/dist/js/bootstrap.bundle.min.js"))
|
"/dist/js/bootstrap.bundle.min.js"))
|
||||||
|
|
||||||
(defun get-cdn-css
|
(defparameter *color-theme* "dark")
|
||||||
(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")))
|
|
||||||
|
|
||||||
(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
|
`(spinneret:with-html
|
||||||
(:doctype)
|
(:doctype)
|
||||||
(:html :data-bs-theme ,theme
|
(:html :data-bs-theme ,*color-theme*
|
||||||
(:head
|
(:head
|
||||||
(:meta :charset "utf-8")
|
(:meta :charset "utf-8")
|
||||||
(:meta :name "viewport" :content "width=device-width, initial-scale=1")
|
(:meta :name "viewport" :content "width=device-width, initial-scale=1")
|
||||||
(:meta :name "author" :content ,author)
|
(:meta :name "author" :content ,author)
|
||||||
(:meta :name "description" :content ,description)
|
(:meta :name "description" :content ,description)
|
||||||
(:title ,pagetitle)
|
(: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)
|
(:body (:h1 :class "visually-hidden" ,pagetitle)
|
||||||
(:main ,@body))
|
(:main ,@body))
|
||||||
(if ,cdn
|
(if ,*use-cdn*
|
||||||
(:script :src *cdn-js*)
|
(:script :src *cdn-js-url*)
|
||||||
(:script :src "5.3.0/bootstrap.bundle.min.js")))))
|
(:script :src "5.3.0/bootstrap.bundle.min.js"))))))
|
||||||
|
|
||||||
(defmacro with-landing-page)
|
(defmacro with-landing-page ())
|
||||||
(defmacro with-blogpost-page)
|
(defmacro with-blogpost-page ())
|
||||||
(defmacro with-product-page)
|
(defmacro with-product-page ())
|
||||||
(defmacro with-contact-page)
|
(defmacro with-contact-page ())
|
||||||
(defmacro with-portfolio-page)
|
(defmacro with-portfolio-page ())
|
||||||
(defmacro with-error-page)
|
(defmacro with-error-page ())
|
||||||
(defmacro with-login-page)
|
(defmacro with-login-page ())
|
||||||
(defmacro with-dashboard-page)
|
(defmacro with-dashboard-page ())
|
||||||
(defmacro with-about-page)
|
(defmacro with-about-page ())
|
||||||
(defmacro with-faq-page)
|
(defmacro with-faq-page ())
|
||||||
(defmacro with-tos-page)
|
(defmacro with-tos-page ())
|
||||||
|
|
Loading…
Add table
Reference in a new issue