Skip to content

Commit

Permalink
stipple_new
Browse files Browse the repository at this point in the history
  • Loading branch information
montyvesselinov committed Jan 12, 2024
1 parent 098dbe6 commit 6ab6924
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions scripts/stipple_new.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import Stipple

@Stipple.vars Name begin
name::R{String} = "World!"
end

function ui()
[
Stipple.h1([
"Hello "
Stipple.span("", @Stipple.text(:name))
])

Stipple.p([
"What is your name? "
Stipple.input("", placeholder="Type your name", @Stipple.bind(:name))
])
]
end

Stipple.route("/") do
global model
model = Name
Stipple.init(model)
Stipple.html(Stipple.page(model, ui()))
end

up()

0 comments on commit 6ab6924

Please sign in to comment.