How can I make home page specific style changes

(Bill Snider) #1

Maybe I didn’t go far enough down to find this answer, so forgive me if this has been already asked.

How can I make specific style changes to the home page without affecting everything globally? I know about using category number classes for the other pages, but I don’t see a unique class or id for the home page. I’m finding that I want to leave some things for the rest of the category pages, that I want to change on the home page.

(Khoa Nguyen) #2

My first thought is using a simple javascript to check if homepage.
But many think will happen with a Ember like Discourse.

  • You have to remove the css link if user navigate to another page
  • Add it again if user navigate back to homepage

(Kane York) #3

You can probably use an @document selector for the regex$.

(Bill Snider) #4

I was noticing that each category page, except for the home page, had a class=“category-#” in the tag. On my home page, there is a class="" in the tag, but it has nothing in it.

I was able to do specific things with each category page because of that category-# class. I’m finding that I want to leave a lot of changes alone in the various category pages, while changing the home page. Right now I can’t because they’ll be global changes if I change the styles in the home page.

(Bill Snider) #5

I am referring to the “/categories page”. We defaulted to make that our home/landing page. I’m looking to just make style changes to that page only. How can I get a unique identifier for that page.

I see in all the other pages I created that they have unique number identifiers in the tag. I haven’t seen anything that works on the top categories page. Keep in mind that I’m looking to do this only through CSS.