Created
October 13, 2012 07:43
-
-
Save NonLogicalDev/3883719 to your computer and use it in GitHub Desktop.
Haml vs HTML
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
%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 >_> | |
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
<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’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