Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rkh/sinatra-compass
Better Compass integration for Sinatra (extracted from BigBand).
https://github.com/rkh/sinatra-compass
Last synced: 18 days ago
JSON representation
Better Compass integration for Sinatra (extracted from BigBand).
- Host: GitHub
- URL: https://github.com/rkh/sinatra-compass
- Owner: rkh
- License: ncsa
- Created: 2010-02-15T09:38:31.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2013-03-29T16:33:21.000Z (over 11 years ago)
- Last Synced: 2024-05-14T12:03:04.193Z (6 months ago)
- Language: Ruby
- Homepage:
- Size: 527 KB
- Stars: 17
- Watchers: 4
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Sinatra::Compass
================Integrates the Compass stylesheet framework with [Sinatra](http://sinatrarb.com).
BigBand
-------Sinatra::Compass is part of the [BigBand](http://github.com/rkh/big_band) stack.
Check it out if you are looking for other fancy Sinatra extensions.Installation
------------gem install sinatra-compass
Usage
-----Usage without doing something:
require "sinatra"
require "sinatra/compass"If you create a directory called views/stylesheets and place your
sass files in there, there you go. Just call stylesheet(name) form
your view to get the correct stylesheet tag. The URL for your
stylesheets will be /stylesheets/:name.css.Of course you can use any other setup. Say, you want to store your
stylesheets in views/css and want the URL to be /css/:name.css:get_compass("css")
But what about more complex setups?
require "sinatra/base"
require "sinatra/compass"class Foo < Sinatra::Base
register Sinatra::Compass
set :compass, :sass_dir => "/foo/bar/blah"
get_compass("/foo/:name.css") do
compass :one_stylesheet
end
endNote that already generated routes will be deactivated by calling
get_compass again.