Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## environment.rb
- # for the css part of the layout to work, you have to let sinatra know that /css/main.css is equal to the main.sass file
- get '/css/main.css' do
- headers 'Content-Type' => 'text/css; charset=utf-8'
- sass :main
- end
- ## layout.haml
- !!! Strict
- %html
- %head
- %link{:rel => 'stylesheet', :href => '/css/main.css', :type => 'text/css'}
- %title= SiteConfig.title
- %body
- = yield
- ## index.haml
- #container
- #left
- %p Text on the left!
- #right
- %p Text on the right!
- .clear
- ## main.css
- .clear
- :clear both
- #container
- :width: 500px
- #left
- :background blue
- :width 225px
- :margin-right: 25px
- :float left
- #right
- :background right
- :width 225px
- :margin-left 25px
- :float left
Add Comment
Please, Sign In to add comment