Created
October 7, 2014 03:51
-
-
Save rinoldsimon/f37872beac0b10646236 to your computer and use it in GitHub Desktop.
Example code for my Introduction to Haml article on http://learnrubyblog.wordpress.com/2014/10/07/26-an-introduction-to-haml/
This file contains 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
!!! 5 | |
%html | |
%head | |
%title Example HAML | |
/[if IE] | |
%link{ :rel => "stylesheet", :href => "/css/ie.css" } | |
%body | |
#container | |
%header | |
%h1 Our Awesome HTML5 Template | |
#main | |
Did we mention this was awesome? | |
/ Only this line will be wrapped in a comment | |
%blockquote | |
%p Roads? Where we're going we don't need roads | |
/ | |
Now the whole block will be commented out | |
%blockquote | |
%p Roads? Where we're going we don't need roads | |
%p The line below won't appear in the HTML | |
-# The rest of this line is a comment | |
%p The line above won't appear in the HTML, nor will the lines underneath | |
-# | |
None of this text will appear in our | |
rendered output | |
%p= Time.now | |
%footer | |
%address | |
.hcard | |
.fn Rinold Simon | |
.adr | |
.locality Chennai | |
.country-name India |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment