librelist archives

« back to archive

Re: [nesta] Having trouble getting sass to work with custom templates

Re: [nesta] Having trouble getting sass to work with custom templates

From:
Hersh Bhasin
Date:
2011-03-20 @ 14:11
I have it working.  My scss  is called book.scss. In the app.rb of my 
custom template, I had to put this:
 
    get '/css/:book.css' do
           content_type 'text/css', :charset => 'utf-8'
           cache scss(params[:book].to_sym)
    end  

Also, in the layout.haml I had to put this in the head section
%link(href="/css/book.css" media="screen" rel="stylesheet")

-- then Nesta will automatically pick it up.

Thanks
Hersh
--- On Sun, 3/20/11, Derek P. Collins <derekpcollins@gmail.com> wrote:

From: Derek P. Collins <derekpcollins@gmail.com>
Subject: [nesta] Having trouble getting sass to work with custom templates
To: nesta@librelist.com
Date: Sunday, March 20, 2011, 3:08 AM


            
                I've created custom templates by following the instructions here:
http://nestacms.com/docs/design/custom-designs
However, I can't seem to get a custom stylesheet to work with my 
templates. I created a filed named "screen.scss" in /views, but the only 
way I've been able to get this to work is to create a new set of 
directories ("/public/css") and then running:
--watch views/screen.scss:public/css/screen.css
in order to generate the .css file from the .scss file. However, I thought
this was supposed to be done automatically according to the page that I 
linked to above:
"Link to your stylesheet from within the layout (CSS files are 
automatically created from Sass files when a page is loaded), a
 nd are served up from /css/your-stylesheet.css."
Did I misunderstand this or am I doing something wrong?
Thanks,Derek