Created
November 28, 2012 18:25
-
-
Save sarsena/4163055 to your computer and use it in GitHub Desktop.
HTML VS 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
!!! | |
%html | |
%head | |
%title Raphael Graph | |
%link(rel="stylesheet" href="/css/bootstrap.min.css") | |
%link(rel="stylesheet" href="/css/graph/global.css") | |
%script(src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js") | |
%script(src="../js/raphael-min.js") | |
%script(src="../js/g.raphael-min.js") | |
%script(src="../js/g.bar-min.js") | |
%script(src="../js/jquery.qtip-1.0.0-rc3.min.js") | |
:javascript | |
$(getUpdate); | |
function getUpdate(){ | |
$("body").load("/"); | |
setTimeout(getUpdate, 15000); | |
} | |
%body= yield | |
:javascript | |
var rubyArray = #{$ruby_array}; | |
%script(src="../js/graph/graph.js") | |
.graph-container | |
%p This is where the graph will go | |
.legend | |
%ul | |
%li | |
%span(class="blue") | |
November 20th | |
%li | |
%span(class="black") | |
November 21st |
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
<SOME DOCTYPE> | |
<html> | |
<head> | |
<title>Raphael Graph</title> | |
<link href="/css/bootstrap.min.css" rel="stylesheet"> | |
<link href="/css/graph/global.css" rel="stylesheet"> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> | |
<script src="../js/raphael-min.js"></script> | |
<script src="../js/g.raphael-min.js"></script> | |
<script src="../js/g.bar-min.js"></script> | |
<script src="../js/jquery.qtip-1.0.0-rc3.min.js"></script> | |
<script type="text/javascript"> | |
//<![CDATA[ | |
$(getUpdate); | |
function getUpdate(){ | |
$("body").load("/"); | |
setTimeout(getUpdate, 15000); | |
} | |
//]]> | |
</script> | |
</head> | |
<body> | |
<div class="graph-container"> | |
<p>This is where the graph will go</p> | |
</div> | |
<div class="legend"> | |
<ul> | |
<li> | |
<span class="blue"></span> | |
November 20th | |
</li> | |
<li> | |
<span class="black"></span> | |
November 21st | |
</li> | |
</ul> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment