From a3daf45085ba5d9c7aaf48dabe2912f6e4a6d43f Mon Sep 17 00:00:00 2001 From: David Botton Date: Tue, 26 Jan 2021 01:29:39 -0500 Subject: [PATCH] Turorial 16 --- README.md | 1 + clog-document.lisp | 16 ++++++++++-- clog.lisp | 1 + tutorial/16-tutorial.lisp | 51 +++++++++++++++++++++++++++++++++++++++ tutorial/README.md | 1 + 5 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 tutorial/16-tutorial.lisp diff --git a/README.md b/README.md index 3aeb0af..d49a885 100644 --- a/README.md +++ b/README.md @@ -141,6 +141,7 @@ Tutorial Summary - 13-tutorial/ - Flying Solo - A minimalist CLOG project - 14-tutorial.lisp - Local (persistent) and Session client-side storage - 15-tutorial.lisp - Multi-media +- 16-tutorial.lisp - Bootstrap 4, Loading css files and javascript Demo Summary diff --git a/clog-document.lisp b/clog-document.lisp index 25d9527..355527d 100644 --- a/clog-document.lisp +++ b/clog-document.lisp @@ -155,8 +155,20 @@ clog-document object. (Private)")) (defmethod load-css ((obj clog-document) css-url) (jquery-execute (head-element obj) - (format nil "append('')" (escape-string css-url)))) + (format nil "append('')" + (escape-string css-url)))) + +;;;;;;;;;;;;;;;;; +;; load-script ;; +;;;;;;;;;;;;;;;;; + +(defgeneric load-script (clog-document script-url) + (:documentation "Load script from SCRIPT-URL.")) + +(defmethod load-script ((obj clog-document) script-url) + (jquery-execute (head-element obj) + (format nil "append('