Skip to content

Instantly share code, notes, and snippets.

@dmoser
Created January 20, 2012 12:20
Show Gist options
  • Save dmoser/1647145 to your computer and use it in GitHub Desktop.
Save dmoser/1647145 to your computer and use it in GitHub Desktop.
%w[rubygems sinatra haml].each{ |gem| require gem }
get('/'){ haml :index }
get('/bio'){ haml :bio }
get('/shows'){ haml :shows }
get('/music'){ haml :music }
get('/video'){ haml :video }
get('/comic'){ haml :comic }
get('/newsletter'){ haml :newsletter}
__END__
"#music".onClick(function(event) {
event.stop();
$('main').load("/music");
});
"#comic".onClick(function(event) {
event.stop();
$('main').load("/comic");
});
"#video".onClick(function(event) {
event.stop();
$('main').load("/video");
});
"#bio".onClick(function(event) {
event.stop();
$('main').load("/bio");
});
"#shows".onClick(function(event) {
event.stop();
$('main').load("/shows");
});
Xhr.Options.spinner = 'spinner';
%body.home
%header.hd1
%hgroup
%h1
%a{:href => "/", :id => "home"} Exploding Cigars
%h2
/ These guys are ugly as hell
Retro Lounge Rock with a Sex Filter
%nav
%ul
%li
%a{:href => "/music", :id => "music"} Music
%li
/ Only go to a show if you want to dance with yourself alone
%a{:href => "/shows", :id => "shows"} Shows
%li
/ I can't wait until we can change the bio to read, "All band members died today"
%a{:href => "/bio", :id => "bio"} Biography
%li
%a{:href => "/video", :id => "video"} Video
%li
%a{:href => "/comic", :id => "comic"} Comic
%audio{:autobuffer => "", :controls => "", :src => "http://explodingcigars.s3.amazonaws.com/28%20So%20Many%20Changes.mp3"}
#main
%img#spinner(src="spinner.gif")
%footer
#social
%ul
%li
%a{:href => "http://twitter.com/explodingcigars", :target => "_blank"} Twitter
%li
%a{:href => "http://facebook.com/explodingcigars", :target => "_blank"} Facebook
%li
%a{:href => "http://tumblr.com/blog/explodingcigars", :target => "_blank"} Tumblr
!!! 5
%html
%head
%meta(charset="utf-8")
%title Exploding Cigars Website
%meta{:content => "Retro Lounge Rock with a Sex Filter. Band from St. Louis, Missouri", :name => "description"}
%meta{:content => "Exploding Cigars, LLC", :name => "author"}
%link{:href => "/favicon.ico", :rel => "shortcut icon"}
%link{:href => "/apple-touch-icon.png", :rel => "apple-touch-icon"}
%link{:href => "css/styles.css?v=1.0", :rel => "stylesheet"}
%script(src="http://rightjs.org/hotlink/right.js")
/ ... System Boot: Ready
/ Start *****
/ I am an artificial program written by the Mad Scientist
%script(src="/custom.js")
%script(src="/anal.js")
= yield
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment