Skip to content

Commit cd094ac

Browse files
committed
copy example to readme
1 parent 52d6e03 commit cd094ac

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,22 @@ WebAssembly
88
DSL for creating html structure straight with Elixir blocks:
99

1010
```Elixir
11-
1211
use WebAssembly
1312
builder do
1413
html do
1514
head do
16-
ctype = "text/html"
17-
meta http_equiv: "Content-Type", content: ctype
18-
title "foo"
15+
meta http_equiv: "Content-Type", content: "text/html"
16+
title "example"
1917
end
2018
body do
21-
div class: "mydiv", id: :myid do
19+
div class: "container", id: :content do
2220
ul do
23-
li 1
24-
if all_goes_well, do:
25-
li "second"
21+
elements for index<-1..5, do:
22+
pick li ["item ", index]
23+
end
24+
random = :random.uniform(10)
25+
if random == 10 do
26+
text "Lucky! You got 10"
2627
end
2728
end
2829
text "that was nice"

0 commit comments

Comments
 (0)