Created
December 11, 2009 05:40
-
-
Save ibolmo/254010 to your computer and use it in GitHub Desktop.
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
| // horrible(?) attempt at minimizing global pollution and other tricks made by Jaml. | |
| HAML('simple'). | |
| div().adopt(). | |
| h1('Some title'). | |
| p('Some exciting paragraph text'). | |
| br(). | |
| ul().adopt(). | |
| li('First item'). | |
| li('Second item'). | |
| li('Third item'); | |
| HAML.render('simple'); | |
| HAML('product'). | |
| div({'class': 'product'}).adopt(). | |
| h1(product.title). | |
| p(product.description). | |
| img({src: product.thumbUrl}). | |
| a({href: product.imageUrl, text: 'View larger image'}). | |
| form().adopt(). | |
| label({for: 'quantity', text: "Quantity"}). | |
| input({type: 'text', name: 'quantity', id: 'quantity', value: 1}). | |
| input({type: 'submit', value: 'Add to Cart'}); | |
| var advancedTemplate = HAML('advanced'). | |
| div(). | |
| adopt(). | |
| p('paragraph'). | |
| end(). | |
| div(). | |
| adopt(). | |
| p('another'). | |
| render(); | |
| HAML('complex'). | |
| div(). | |
| adopt(). | |
| use('simple'). | |
| use('product'). | |
| end(). | |
| div(). | |
| adopt(). | |
| use(advancedTemplate); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment