add class property on create

This commit is contained in:
David Botton 2021-01-26 01:53:37 -05:00
parent a3daf45085
commit c98e1495e2
2 changed files with 78 additions and 39 deletions

View file

@ -11,37 +11,32 @@
(defun on-new-window (body)
(load-css (html-document body) "https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css")
;; Bootstrap requires jQuery but there is no need to load it as so does CLOG so already loaded
;; the generic boot.html
(load-script (html-document body) "https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js")
(load-script (html-document body) "https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js")
(setf (title (html-document body)) "Hello Boostrap")
(let* ((jumbo (create-div body))
(let* ((jumbo (create-div body :class "jumbotron text-center"))
(tmp (create-section jumbo :h1 :content "My First Bootstrap Page"))
(tmp (create-p jumbo :content "Resize this responsive page to see the effect!"))
(container (create-div body))
(row (create-div container))
(container (create-div body :class "container"))
(row (create-div container :class "row"))
(col1 (create-div row))
(col1 (create-div row :class "col-sm-4"))
(tmp (create-section col1 :h3 :content "Column 1"))
(tmp (create-p col1 :content "Lorem ipsum dolor.."))
(col2 (create-div row))
(col2 (create-div row :class "col-sm-4"))
(tmp (create-section col2 :h3 :content "Column 2"))
(tmp (create-p col2 :content "Lorem ipsum dolor.."))
(col3 (create-div row))
(col3 (create-div row :class "col-sm-4"))
(tmp (create-section col3 :h3 :content "Column 3"))
(tmp (create-p col3 :content "Lorem ipsum dolor..")))
(tmp (create-p col3 :content "Lorem ipsum dolor.."))))
(setf (css-class-name jumbo) "jumbotron text-center")
(setf (css-class-name container) "container")
(setf (css-class-name row) "row")
(setf (css-class-name col1) "col-sm-4")
(setf (css-class-name col2) "col-sm-4")
(setf (css-class-name col3) "col-sm-4"))
(run body))
(defun start-tutorial ()