Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

home.css not necessarily required? #1457

Closed
parndt opened this issue Mar 14, 2012 · 10 comments
Closed

home.css not necessarily required? #1457

parndt opened this issue Mar 14, 2012 · 10 comments
Labels
Milestone

Comments

@parndt
Copy link
Member

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">
...
</section>

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

@phiggins
Copy link
Contributor

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

@simi
Copy link
Member

simi commented Mar 15, 2012

❤️ I was doing exactly same everytime. ❤️

@keram
Copy link
Contributor

keram commented Mar 15, 2012

❤️

@parndt
Copy link
Member Author

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

@robyurkowski
Copy link
Contributor

Problem: this will be rather problematic with i18n.

@parndt
Copy link
Member Author

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
Copy link
Member Author

parndt commented Mar 27, 2012

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

@robyurkowski
Copy link
Contributor

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
Copy link
Member Author

parndt commented May 12, 2012

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

@parndt
Copy link
Member Author

parndt commented May 25, 2012

#1699

robyurkowski added a commit that referenced this issue May 25, 2012
Added canonical support which helps for #1457
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants