-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.rb
33 lines (26 loc) · 776 Bytes
/
main.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
require 'sinatra/base'
class Main < Sinatra::Base
helpers Sinatra::Partials
configure do
# configure compass
Compass.configuration do |config|
config.project_path = File.dirname(__FILE__)
config.sass_dir = File.join(Sinatra::Application.views, 'css')
config.output_style = :compact
end
# Configure public directory
set :public, File.join(File.dirname(__FILE__), 'public')
# Configure default views
set :views, File.dirname(__FILE__) + '/views'
# Configure HAML and SASS
set :haml, { :format => :html5 }
set :scss, Compass.sass_engine_options
end
get "/css/style.css" do
content_type 'text/css', :charset => 'utf-8'
scss :"css/style"
end
get '/' do
haml :index
end
end