0.2.13 • Published 9 years ago

zeus-html v0.2.13

Weekly downloads
11
License
MIT
Repository
github
Last release
9 years ago

Zeus Html

Simple nodejs html generator written on coffee-script

Instalation

npm install zeus-html --save

Usage

JavaScript
var html = require("zeus-html")(true)

html.div({class: "form-group"}, function(fg){
    fg.label({}, "Text field: ")
    fg.input({type: "text", class: "form-control"})
})

html.div({class: "form-group"}, function(fg){
    fg.label({}, function(label){
        label.raw("Required text field: ")
        label.span({class: "required"}, "*")
    })
    fg.input({type: "text", class: "form-control", required: true})
})

html.button({type: "submit", class: ["btn", "btn-default"]}, "Submit")

console.log(html.output)
HTML
<div class='form-group'>
        <label>Text field: </label>
        <input type='text' class='form-control'>
</div>
<div class='form-group'>
        <label>
                Required text field:
                <span class='required'>*</span>
        </label>
        <input type='text' class='form-control' required>
</div>
<button type='submit' class='btn btn-default'>Submit</button>
0.2.13

9 years ago

0.2.12

9 years ago

0.2.11

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago

0.0.99

9 years ago