1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00

Added Sass information to documentation.

This commit is contained in:
Nickolas Means 2008-04-08 15:51:28 -05:00
parent 2baa78d95e
commit 4144ac1a8b

View file

@ -90,7 +90,7 @@ All views are looked up in:
== Templates
=== Haml/Sass
=== Haml
get '/' do
haml :index
@ -98,6 +98,14 @@ All views are looked up in:
This will render <tt>./views/index.haml</tt>
=== Sass
get '/stylesheet.css' do
header 'Content-Type' => 'text/css; charset=utf-8'
sass :stylesheet
end
This will render <tt>./views/stylesheet.sass</tt>
=== Inline
get '/' do
@ -164,6 +172,10 @@ Try it!
This works like Haml except you use <tt>erb</tt> instead of <tt>haml</tt>
=== Sass
This works like Haml except you use <tt>sass</tt> instead of <tt>haml</tt>. It's also a good idea to add <tt>header 'Content-Type' => 'text/css; charset=utf-8'</tt> before your call to <tt>sass</tt> so Sinatra returns the proper content type header with the file.
=== Builder
See Sinatra::Builder