From 00d9483dc830a3c28adce7dc2aef96b88304a991 Mon Sep 17 00:00:00 2001 From: Erin Date: Tue, 26 Jul 2022 21:25:08 +0200 Subject: [PATCH] general example --- web_lisp_src/general.wisp | 12 ++++++++++++ web_lisp_src/hello-world.wisp | 2 ++ web_lisp_src/hello_world.wisp | 2 -- .../{not_hello_world.wisp => not-hello-world.wisp} | 2 +- web_lisp_src/style.wisp | 2 +- 5 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 web_lisp_src/general.wisp create mode 100644 web_lisp_src/hello-world.wisp delete mode 100644 web_lisp_src/hello_world.wisp rename web_lisp_src/{not_hello_world.wisp => not-hello-world.wisp} (84%) diff --git a/web_lisp_src/general.wisp b/web_lisp_src/general.wisp new file mode 100644 index 0000000..922c2b9 --- /dev/null +++ b/web_lisp_src/general.wisp @@ -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)))))) diff --git a/web_lisp_src/hello-world.wisp b/web_lisp_src/hello-world.wisp new file mode 100644 index 0000000..e83cbd5 --- /dev/null +++ b/web_lisp_src/hello-world.wisp @@ -0,0 +1,2 @@ +(document + (text "Hello, world!")) diff --git a/web_lisp_src/hello_world.wisp b/web_lisp_src/hello_world.wisp deleted file mode 100644 index e58cdb5..0000000 --- a/web_lisp_src/hello_world.wisp +++ /dev/null @@ -1,2 +0,0 @@ -(document - (text "Hello, world!")) \ No newline at end of file diff --git a/web_lisp_src/not_hello_world.wisp b/web_lisp_src/not-hello-world.wisp similarity index 84% rename from web_lisp_src/not_hello_world.wisp rename to web_lisp_src/not-hello-world.wisp index dba98c9..1660888 100644 --- a/web_lisp_src/not_hello_world.wisp +++ b/web_lisp_src/not-hello-world.wisp @@ -5,4 +5,4 @@ (text "Hello, world!") (image (link "ablecorp.us/img.png")) (button :text "Click Me!!" - :callback (fn []))) \ No newline at end of file + :callback (fun ()))) diff --git a/web_lisp_src/style.wisp b/web_lisp_src/style.wisp index b13fda8..a8bbd4a 100644 --- a/web_lisp_src/style.wisp +++ b/web_lisp_src/style.wisp @@ -1,6 +1,6 @@ (style :id 1 - { :size 12}) + :size 12) (document (text :style 1 "Hello, world!"))