• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

Don't hard-code category icons, phrases

Scheduled Pinned Locked Moved Feature Requests
5 Posts 4 Posters 2.4k Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    art
    wrote on last edited by
    #1

    On this page for example:

    NodeBB Community

    A community to talk about development and ask questions about NodeBB modern forum software

    favicon

    NodeBB Community (community.nodebb.org)

    The categories show an icon in front of them. These are in the html apparently. Can this be put into the CSS via pseudo-elements to make theming easier? A lot of people may not want to use those icons or may not want icons at all.

    Ditto for the phrase "posted in" which personally I find redundant and don't really want to see many times on a page. I think that should be optional for people and is more of a display thing and can be inserted via pseudo element for whoever wants it. Same goes for "replied" and so on. These phrases are repetitive and may not be necessary for many themes.

    Again this will just make theming a lot easier if stuff like this is in the CSS.

    A class on the category could also make it possible to do color-coding and so on...

    1 Reply Last reply
    0
  • julianJ Offline
    julianJ Offline
    julian GNU/Linux
    wrote on last edited by
    #2

    @art Themes can override templates (in fact, you're encouraged to do so, really), so you are free to remove the icons or the repeated text or anything that you don't like 😄

    I don't think the icons (in /recent) can be done in CSS, because they are not hard-coded. They are pulled from the db, which can change, and in CSS, I have to know the specific FontAwesome character code to put it in.

    1 Reply Last reply
    0
  • A Offline
    A Offline
    art
    wrote on last edited by
    #3

    Ok, thanks @julian. Makes sense! And I should be able to use the category slug for a CSS class if I want to style the categories.

    I was just worried about the templates breaking if I upgrade the nodebb version, but I guess it won't touch the theme. And I would just have to copy over any new features into my own template files.

    1 Reply Last reply
    0
  • psychobunnyP Offline
    psychobunnyP Offline
    psychobunny
    wrote on last edited by
    #4

    Yeah, I've seen themes that don't even utilize the category icons. Long time from now - but I am definitely thinking of abstracting out fontawesome category icons to a bundled plugin within lavender and vanilla. Not everybody needs that and I think that we could definitely just get away with having them being set on a separate page in the ACP.

    1 Reply Last reply
    0
  • TannerT Offline
    TannerT Offline
    Tanner Plugin & Theme Dev
    wrote on last edited by
    #5

    That would make a lot of sense. Some people don't like FontAwesome or use another icon set entirely - making it more modular would allow for more freedom to choose how you wish.

    1 Reply Last reply
    0

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development