move karax source code from 'src' to 'karax'; make karaxdsl work with native Nim; added jjson and jwebsockets modules
This commit is contained in:
parent
bb1732c834
commit
8e8ada7cd2
34 changed files with 407 additions and 203 deletions
20
tests/nativehtmlgen.nim
Normal file
20
tests/nativehtmlgen.nim
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
## Simple test that shows Karax can also do client-side HTML rendering.
|
||||
|
||||
import "../karax" / [karaxdsl, vdom]
|
||||
|
||||
when defined(js):
|
||||
{.error: "Use 'nim c' to compile this example".}
|
||||
|
||||
let tab = buildHtml(table):
|
||||
tr:
|
||||
td:
|
||||
text "Cell A"
|
||||
td:
|
||||
text "Cell B"
|
||||
tr:
|
||||
td:
|
||||
text "Cell C"
|
||||
td:
|
||||
text "Cell D"
|
||||
|
||||
echo tab
|
||||
Loading…
Add table
Add a link
Reference in a new issue