Skip to content

Instantly share code, notes, and snippets.

@medikoo
Created August 9, 2012 13:12
Show Gist options
  • Save medikoo/3304090 to your computer and use it in GitHub Desktop.
Save medikoo/3304090 to your computer and use it in GitHub Desktop.
dom.js v0.3
var domjs = require('domjs');
var tpl = domjs.require('./template'); // DocumentFragment [<header>, <nav>, <article>, <footer>]
header(
h1('Heading'),
h2('Subheading'));
nav(
ul({ 'class': 'breadcrumbs' },
li(a({ href: '/' }, 'Home')),
li(a({ href: '/section/'}, 'Section')),
li(a('Subject'))));
article(
p('Lorem ipsum...'));
footer('Footer stuff');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment