Skip to content

Commit

Permalink
New updates for Compass, layouts, and some organization
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Stacoviak committed Nov 19, 2010
1 parent fbd773b commit 39e00b5
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 8 deletions.
6 changes: 3 additions & 3 deletions app.rb
Expand Up @@ -17,14 +17,14 @@

# Configure Compass
configure do
Compass.configuration.parse(File.join(Sinatra::Application.root, 'config.rb'))
Compass.add_project_configuration(File.join(Sinatra::Application.root, 'config.rb'))
end

# At a minimum the main sass file must reside within the views directory
# We create /views/stylesheets where all our sass files can safely reside
get '/stylesheets/:name.css' do
get '/stylesheets/:file.css' do
content_type 'text/css', :charset => 'utf-8'
sass(:"stylesheets/#{params[:name]}", Compass.sass_engine_options)
sass(:"stylesheets/#{params[:file]}", Compass.sass_engine_options)
end

get '/about' do
Expand Down
5 changes: 5 additions & 0 deletions views/_nav_main.haml
@@ -0,0 +1,5 @@
%ul
%li
%a{:href => "/"} Home
%li
%a{:href => "/about"} About
3 changes: 2 additions & 1 deletion views/layouts/application.haml
@@ -1,4 +1,4 @@
!!! Strict
!!! 5
%html{html_attrs('en-en')}
%head
%meta{:'http-equiv' => "Content-Type", :content => "text/html; charset=utf-8"}
Expand All @@ -9,5 +9,6 @@
%script{:type => "text/javascript", :src => "javascripts/plugins/jquery.qtip-1.0.0-rc3.min.js"}
%script{:type => "text/javascript", :src => "javascripts/site.js"}
%body
= partial :_nav_main
= yield
= partial :_analytics
17 changes: 14 additions & 3 deletions views/layouts/page.haml
@@ -1,3 +1,14 @@
%p This is the 'alternate.haml'

= yield
!!! 5
%html{html_attrs('en-en')}
%head
%meta{:'http-equiv' => "Content-Type", :content => "text/html; charset=utf-8"}
%meta{:name => "lang", :content => "en"}
%title Sinatra Bootstrap
%link{:href=>'stylesheets/application.css', :rel => 'stylesheet', :media => "screen", :type => "text/css"}
%script{:type => "text/javascript", :src => "http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"}
%script{:type => "text/javascript", :src => "javascripts/plugins/jquery.qtip-1.0.0-rc3.min.js"}
%script{:type => "text/javascript", :src => "javascripts/site.js"}
%body
= partial :_nav_main
= yield
= partial :_analytics
4 changes: 3 additions & 1 deletion views/stylesheets/application.sass
@@ -1,5 +1,7 @@
@import blueprint/reset
@import compass/reset
@include reset-html5
@import compass/utilities
@import compass/css3

// Base font
=base-font
Expand Down

0 comments on commit 39e00b5

Please sign in to comment.