general example

This commit is contained in:
Erin 2022-07-26 21:25:08 +02:00 committed by ondra05
parent ec4c8d168a
commit 00d9483dc8
5 changed files with 16 additions and 4 deletions

12
web_lisp_src/general.wisp Normal file
View file

@ -0,0 +1,12 @@
(metadata (title "General example"))
(on-update '())
(on-load '((fun () (log "Loaded!"))))
(document
(let (good "Goooood...")
(text "↓ Click this button ↓")
(button :text "yes, this one"
:callback (fun (btn)
(set-label btn good)))
(button :text "not this one"
:callback (fun (btn)
(set-label btn (+ "not " good))))))

View file

@ -0,0 +1,2 @@
(document
(text "Hello, world!"))

View file

@ -1,2 +0,0 @@
(document
(text "Hello, world!"))

View file

@ -5,4 +5,4 @@
(text "Hello, world!")
(image (link "ablecorp.us/img.png"))
(button :text "Click Me!!"
:callback (fn [])))
:callback (fun ())))

View file

@ -1,6 +1,6 @@
(style
:id 1
{ :size 12})
:size 12)
(document
(text :style 1 "Hello, world!"))