Skip to content

Instantly share code, notes, and snippets.

@tonyfast
Last active August 29, 2015 14:14
Show Gist options
  • Select an option

  • Save tonyfast/e4decd02825f5699a81f to your computer and use it in GitHub Desktop.

Select an option

Save tonyfast/e4decd02825f5699a81f to your computer and use it in GitHub Desktop.
Jade in the Browser
<head>
</head>
<body>
<script src="//cdn.jsdelivr.net/g/jade"></script>
<script id="template" type="jade/template">
h1 Jade - node template engine
#container.col
if youAreUsingJade
p You are amazing
else
p Get on it!
</script>
<script>
;( function(){
// compile template
t = jade.compile(
document.getElementById('template')
.innerHTML
);
document.body.innerHTML += t();
})();//main
</script>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment