@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.
❤️ I was doing exactly same everytime. ❤️
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.
Problem: this will be rather problematic with i18n.
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?
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.
Check out my branch canonical for the start of this. Please continue with it if you can