Add meta tags and use global parameters
This commit is contained in:
parent
b259ff5bc8
commit
26658c5106
1 changed files with 8 additions and 3 deletions
|
@ -6,18 +6,23 @@
|
||||||
|
|
||||||
(in-package :cl-sbt)
|
(in-package :cl-sbt)
|
||||||
|
|
||||||
|
(defparameter *cdn-css* "https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css")
|
||||||
|
(defparameter *cdn-js* "https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js")
|
||||||
|
|
||||||
(defmacro with-page ((&key cdn 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 ,cdn)
|
(:meta :charset "utf-8")
|
||||||
|
(:meta :name "viewport" :content "width=device-width, initial-scale=1")
|
||||||
|
(:title ,title)
|
||||||
(if ,cdn
|
(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 ,*cdn-css*)
|
||||||
(:link :type "text/css" :rel "stylesheet" :href "5.3.0/bootstrap.min.css")))
|
(:link :type "text/css" :rel "stylesheet" :href "5.3.0/bootstrap.min.css")))
|
||||||
(:body ,@body)
|
(:body ,@body)
|
||||||
(if ,cdn
|
(if ,cdn
|
||||||
(:script :src "https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js")
|
(:script :src *cdn-js*)
|
||||||
(:script :src "5.3.0/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)
|
||||||
|
|
Loading…
Add table
Reference in a new issue