mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 10:40:45 -08:00
style changes
This commit is contained in:
parent
79a31fba88
commit
a46f5dbf6f
8 changed files with 39 additions and 83 deletions
|
|
@ -6,23 +6,18 @@
|
|||
|
||||
(defun my-on-click (obj) ; obj in any event is the target of the event
|
||||
(setf (color obj) (rgb 0 255 0))) ; this makes it possible to reuse events
|
||||
; RGB is a helper function for colors
|
||||
|
||||
; RGB is a helper function for color
|
||||
(defun on-new-window (body)
|
||||
"On-new-window handler."
|
||||
|
||||
(setf (title (html-document body)) "Tutorial 4")
|
||||
|
||||
;; The same handler my-on-click is set no both targets
|
||||
(set-on-click (create-section body :h1 :content "Hello World! (click me!)")
|
||||
#'my-on-click)
|
||||
|
||||
(set-on-click (create-section body :h3 :content "Click me too!")
|
||||
#'my-on-click)
|
||||
|
||||
(run body))
|
||||
|
||||
(defun start-tutorial ()
|
||||
"Start turtorial."
|
||||
|
||||
(initialize #'on-new-window)
|
||||
(open-browser))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue