Skip to content

Instantly share code, notes, and snippets.

@krawaller
Created May 18, 2010 12:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krawaller/404953 to your computer and use it in GitHub Desktop.
Save krawaller/404953 to your computer and use it in GitHub Desktop.
// CSS-like styling
// test.css
tableView {
background-color: #f00;
color: #fff;
}
row { background-color: #0f0; }
.info { right: 0; }
// HTML-like templates combined with micro-templates or mustasche
// test.html
<tableView>
<row>hi</row>
<row class="red">{{test}}</row>
<row style="background-color: blue;">
<label class="info">info</label>
<img src="test.png"></img>
</row>
</tableView>
// Template data as JSON object
// test.js
{ "test": "This is sweet!" }
// Render the above files:
ui.render('test.html', 'test.js', 'test.css').appendTo(currentWin);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment