Skip to content

Instantly share code, notes, and snippets.

@sarsena
Created November 28, 2012 20:07
Show Gist options
  • Save sarsena/4163851 to your computer and use it in GitHub Desktop.
Save sarsena/4163851 to your computer and use it in GitHub Desktop.
Implement HAML
!!!
:javascript
var rubyArray = #{$num_array};
var titleArray = #{$title_array};
%script(src="../js/graph/graph.js")
.graph-container
%p This is where the graph will go
require 'rubygems'
require 'sinatra'
require 'haml'
require 'oci8'
load 'configs/stg-config.rb'
get '/' do
load 'functions/function-graph.rb'
haml :index, :layout => :layout
end
!!!
%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")
%body= yield
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment