scraps

A Space based HTML template language.

Scraps

Scraps is a Space based HTML template language. Scraps is alpha.

Try it now

Try it now by creating a site at http://nudgepad.com.

Examples

A normal html div written in Scraps looks like this:

scrap1
 content Hello world
 style
  left 10px
  top 10px

This would get turned into html that looks like this:

<div id="scrap1" style="left: 10px; top: 10px">Hello world</div>

Scraps can be any html element by setting the "type":

scrap2
 type textarea
 placeholder Enter some text
 style
  left 10px
  top 40px

Scraps can use all normal html attributes such as "name" or "value":

scrap3
 type text
 name age
 placeholder Age
 value 18
 style
  left 10px
  top 40px
scrap2
 type ul
 scraps
  item1
   type li
   content One
  item2
   type li
   content Two
scrap1
 content Hello world
 onclick alert('Hello world'!)
scrap1
 content {{document.location}}
scrap1
 type ul
 loop red green blue
 scraps
  li
   type li
   content {{value}}
   value {{key}}