Decide to use cdn to load bootstrap js and css
This commit is contained in:
parent
5ea6467282
commit
b259ff5bc8
1 changed files with 8 additions and 4 deletions
|
@ -6,15 +6,19 @@
|
||||||
|
|
||||||
(in-package :cl-sbt)
|
(in-package :cl-sbt)
|
||||||
|
|
||||||
(defmacro with-page ((&key title) &body body)
|
(defmacro with-page ((&key cdn title) &body body)
|
||||||
`(spinneret:with-html
|
`(spinneret:with-html
|
||||||
(:doctype)
|
(:doctype)
|
||||||
(:html
|
(:html
|
||||||
(:head
|
(:head
|
||||||
(:title ,title)
|
(:title ,title ,cdn)
|
||||||
(:link :type "text/css" :rel "stylesheet" :href "public/5.3.0/bootstrap.min.css"))
|
(if ,cdn
|
||||||
|
(:link :type "text/css" :rel "stylesheet" :href "https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css")
|
||||||
|
(:link :type "text/css" :rel "stylesheet" :href "5.3.0/bootstrap.min.css")))
|
||||||
(:body ,@body)
|
(:body ,@body)
|
||||||
(:script :src "public/5.3.0/bootstrap.bundle.min.js"))))
|
(if ,cdn
|
||||||
|
(:script :src "https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js")
|
||||||
|
(:script :src "5.3.0/bootstrap.bundle.min.js")))))
|
||||||
|
|
||||||
(defun write-string-to-file (filename string)
|
(defun write-string-to-file (filename string)
|
||||||
(with-open-file (stream filename :direction :output :if-exists :supersede)
|
(with-open-file (stream filename :direction :output :if-exists :supersede)
|
||||||
|
|
Loading…
Add table
Reference in a new issue