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