Skip to content

stisa/zircon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zircon

DSL in nim that uses nim macros to create an html document.
Example

import zircon 

let x = 2 
let author = "stisa"

html page: 
  head:
    title(if x==2:"two" else:"nottwo")
    meta "author", author
  body:
    p("hello") 
    p("world")
    dv:
      p "from a"
      dv:
        p "dsl"
        a:
          "/"
          "home"
          class="link"
          
echo transpile(page())

Results in:

<html>
 <head>
   <meta name="author" content="stisa">
   <title>two</title>
 </head>
 <body>
  <p>hello</p>
  <p>world</p>
  <div>
   <p>from a</p>
   <div>
    <p>dsl</p>
    <a id="" class"link" href="/">home</a>
   </div>
  </div>
 </body>
</html>

About

Basic DSL for Html, in nim

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages