Skip to content

Commit

Permalink
copy example to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
wkhere committed Aug 17, 2014
1 parent 52d6e03 commit cd094ac
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,22 @@ WebAssembly
DSL for creating html structure straight with Elixir blocks:

```Elixir

use WebAssembly
builder do
html do
head do
ctype = "text/html"
meta http_equiv: "Content-Type", content: ctype
title "foo"
meta http_equiv: "Content-Type", content: "text/html"
title "example"
end
body do
div class: "mydiv", id: :myid do
div class: "container", id: :content do
ul do
li 1
if all_goes_well, do:
li "second"
elements for index<-1..5, do:
pick li ["item ", index]
end
random = :random.uniform(10)
if random == 10 do
text "Lucky! You got 10"
end
end
text "that was nice"
Expand Down

0 comments on commit cd094ac

Please sign in to comment.