public
Last active

Example code for my Introduction to Haml article on RubySource.com

  • Download Gist
example.html.haml
Haml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
!!! 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 Ian Oxley
.adr
.locality Newcastle-upon-Tyne
.country-name England

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.