Navigation Menu

Skip to content
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.

Commit

Permalink
preloading images
Browse files Browse the repository at this point in the history
  • Loading branch information
kbingman committed Aug 13, 2010
1 parent 75f18c9 commit 87ddcf2
Show file tree
Hide file tree
Showing 8 changed files with 1,337 additions and 399 deletions.
1 change: 0 additions & 1 deletion Jimfile
Expand Up @@ -5,7 +5,6 @@
/ start adding your requirements below:

jquery
underscore
sammy
sammy.haml
lib/main
Expand Down
24 changes: 1 addition & 23 deletions app/routes/site.rb
Expand Up @@ -8,29 +8,7 @@ class Main
response['Cache-Control'] = 'max-age=600, public'
@months = Month.all
haml :'pages/home'
end

get '/index.js' do
response['Cache-Control'] = 'max-age=600, public'
@months = Month.all
haml :'pages/home', :layout => false
end

get '/months/:name.js' do
response['Cache-Control'] = 'max-age=600, public'
@months = Month.all
@month = Month.find_by_name(params[:name])
@next_month = @months[@month.id + 1]
@previous_month = @months[@month.id - 1]

unless @month.nil?
@page_title = @month.title
haml :'pages/month', :layout => false
else
@path = params[:name]
haml :'pages/404', :layout => false
end
end
end

get '/months/:name' do
response['Cache-Control'] = 'max-age=600, public'
Expand Down
13 changes: 6 additions & 7 deletions app/views/layouts/application.haml
Expand Up @@ -9,15 +9,14 @@
%meta{:"http-equiv" => "Content-Type", :content => "text/html; charset=utf-8"}
%link{:rel => "stylesheet", :href => "/css/brewgirls.css", :type => "text/css"}
%script{ :type => 'text/javascript', :src => '/javascripts/vendor/jquery-1.4.2.js' }
%script{ :type => 'text/javascript', :src => '/javascripts/vendor/underscore.js' }
%script{ :type => 'text/javascript', :src => '/javascripts/vendor/sammy.js' }
%script{ :type => 'text/javascript', :src => '/javascripts/vendor/sammy.haml.js' }
%script{ :type => 'text/javascript', :src => '/javascripts/lib/site.js' }
%script{ :type => 'text/javascript', :src => '/javascripts/lib/main.js' }
// %script{ :type => 'text/javascript', :src => '/javascripts/vendor/jquery-1.4.2.js' }
// %script{ :type => 'text/javascript', :src => '/javascripts/vendor/sammy.js' }
// %script{ :type => 'text/javascript', :src => '/javascripts/vendor/sammy.haml.js' }
// %script{ :type => 'text/javascript', :src => '/javascripts/lib/site.js' }
// %script{ :type => 'text/javascript', :src => '/javascripts/lib/main.js' }
// %script{ :type => 'text/javascript', :src => '/javascripts/compressed.js' }
// %script{ :type => 'text/javascript', :src => '/javascripts/bundled.js' }
%script{ :type => 'text/javascript', :src => '/javascripts/bundled.js' }
%body
#container
Expand Down

0 comments on commit 87ddcf2

Please sign in to comment.