added many more examples
This commit is contained in:
parent
bcc45feea3
commit
fb604321f3
9 changed files with 141 additions and 3 deletions
13
examples/hellouniverse.nim
Normal file
13
examples/hellouniverse.nim
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
|
||||
include karax / prelude
|
||||
import random
|
||||
|
||||
proc createDom(): VNode =
|
||||
result = buildHtml(tdiv):
|
||||
if random(100) <= 50:
|
||||
text "Hello World!"
|
||||
else:
|
||||
text "Hello Universe"
|
||||
|
||||
randomize()
|
||||
setRenderer createDom
|
||||
Loading…
Add table
Add a link
Reference in a new issue