[Tags] Apply a className to various elements based on the active tags #327

Open
tobscure opened this Issue Aug 29, 2015 · 0 comments

Comments

Projects
None yet
3 participants
@tobscure
Member

tobscure commented Aug 29, 2015

From @tobscure on August 27, 2015 13:50

We should add a className to the body and each DiscussionListItem based on what tags are in use. Could be handy for doing some special tag-based styling.

What needs to be done:

  • Extend IndexPage's config method to add a class (IndexPage--tag--{slug}) to the body based on the currently-active tag. Ensure that it is removed properly onunload.
  • Extend DiscussionPage's config method to add classes (DiscussionPage--tag--{slug}) to the body based on the current discussion's tags. Ensure that they are removed properly onunload.
  • Extract core's DiscussionListItem classes into a method that returns an object of class names, which is then applied to the root element using the classList util.
  • Extend that new classNames method and add classes (DiscussionListItem--tag--{slug}) based on the discussion's tags.

Copied from original issue: flarum/tags#15

@tobscure tobscure changed the title from Apply a className to various elements based on the active tags to [Tags] Apply a className to various elements based on the active tags Aug 29, 2015

@tobscure tobscure referenced this issue Aug 29, 2015

Closed

v0.1.0 roadmap (old) #74

19 of 53 tasks complete

@justjavac justjavac referenced this issue in justjavac/Flarum Sep 7, 2015

Open

Flarum v0.1.0 开发路线图 #3

18 of 53 tasks complete

@franzliedke franzliedke modified the milestone: 0.1.0 Apr 7, 2016

@tobscure tobscure removed this from the 0.1.0 milestone Jul 22, 2017

@luceos luceos removed the Hacktoberfest label Nov 8, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment