home.css not necessarily required? #1457

parndt opened this Issue Mar 14, 2012 · 10 comments


None yet

5 participants

parndt commented Mar 14, 2012

@ryanb suggested that we can use the page's slug, presumably in refinery/content_page, like so:

<section id="<%= @page.slug %>-page">

"Then one could scope by "#home-page" in their CSS."


👍 We've down similar things on other projects, works well.

simi commented Mar 15, 2012

❤️ I was doing exactly same everytime. ❤️

keram commented Mar 15, 2012


parndt commented Mar 26, 2012

I've moved the content_for :stylesheets call to views/refinery/pages/home.html.erb and out of the _head.html.erb partial in which is a start.

In 6017ce4


Problem: this will be rather problematic with i18n.

parndt commented Mar 27, 2012

That's so true. Maybe we could just add 'home' if it responds to @page.home?

But that's still kinda lame yo ;-) But it might be better than loading a separate file?

parndt commented Mar 27, 2012

We could add a method canonical_slug to figure out the default locale slug?


Opinion: let's get rid of home.css. If users need to do different styling from their standard pages, they have a whole host of options, not limited to using a different template or simply doing a check based on params[:controller]/params[:action]. Your option of adding a class on @page.home? seems to be like a good stopgap measure, Phil, in the absence of a better option. That said, I do think we need to spit out some CSS classes on the body tag so users can filter based on page, but I'm not sure that's critical or easily doable at the moment. Not sure the best way forward here.

parndt commented May 12, 2012

Check out my branch canonical for the start of this. Please continue with it if you can

parndt commented May 25, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment