Skip to content

Instantly share code, notes, and snippets.

@NonLogicalDev
Created October 13, 2012 07:43
Show Gist options
  • Save NonLogicalDev/3883719 to your computer and use it in GitHub Desktop.
Save NonLogicalDev/3883719 to your computer and use it in GitHub Desktop.
Haml vs HTML
%html
%head
%title First Haml Page
%meta{:charset => 'UTF-8'}
%style{:type => "text/CSS"}
:sass
/* testing :sass
@mixin red
color: red
font-weight: bold
.funky_text
@include red
.and_another_lame_style
@include red
%body
/ testing asesomenesss factor of haml
%p.casual_stuff
hello! This is
%span.funky_text
My lovely
test
%p
= "Testing string"
%h2 HAML is awesome!
%pre Why you might ask... Well for example, because:
%ul
- ["you", "can" , "do", "this"].each do |item|
%li.and_another_lame_style= item
%pre And this:
:markdown
# Testing markdown
Isn't that sweet? <br/>
And there are **NO TAGS** <br/>
to keep track of *SERIOUSLY*
%p >_>
<html>
<head>
<title>First Haml Page</title>
<meta charset='UTF-8' />
<style type='text/CSS'>
/* testing :sass */
.funky_text {
color: red;
font-weight: bold; }
.and_another_lame_style {
color: red;
font-weight: bold; }
</style>
</head>
<body>
<!-- testing asesomenesss factor of haml -->
<p class='casual_stuff'>
hello! This is
<span class='funky_text'>
My lovely
</span>
test
</p>
<p>
Testing string
</p>
<h2>HAML is awesome!</h2>
<pre>Why you might ask... Well for example, because:</pre>
<ul>
<li class='and_another_lame_style'>you</li>
<li class='and_another_lame_style'>can</li>
<li class='and_another_lame_style'>do</li>
<li class='and_another_lame_style'>this</li>
</ul>
<pre>And this:</pre>
<h1 id='testing_markdown'>Testing markdown</h1>
<p>Isn&#8217;t that sweet? <br />
And there are <strong>NO TAGS</strong> <br />
to keep track of <em>SERIOUSLY</em></p>
<p>>_></p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment