Last active
August 29, 2015 14:14
-
-
Save tonyfast/e4decd02825f5699a81f to your computer and use it in GitHub Desktop.
Jade in the Browser
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <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