Category Icons

Ah, well, #cfcfcf works fine in both dark and light mode. Other option is also to use emojis of course :slight_smile:

1 Like

I’d like to use an icon that is only available with a Font Awesome Pro subscription (specifically this icon). How can I do so with this theme component?

1 Like

You need to first install this plugin:

FontAwesome Pro icons

And then the pro icons should be available for use for you, including for this component.

3 Likes

Thank you, Penar, I’ll take a look at this. I’m having some unrelated trouble rebuilding the forum, and haven’t been able to test this out yet.

2 Likes

I’ve noticed that this only works on Categories, not Sub-categories.

3 Likes

Further to this, it works everywhere except where sub-categories are displayed as boxes above a category list. It works fine as rows above a category list.

For some reason categoryTitleLink isn’t being applied to the boxes.

Any idea why this is the case? I suspect that it might be a (small) problem in core.


later…

This has been fixed by the wonderful Discourse team. For some reason you need to remove and re-install this Theme Component for it to work though:

3 Likes

I actually would love if this let me also put emojis instead of just FontAwesome icons. Is this currently possible?

The example is I want to have a Welcome category and I think the :wave:t2: emoji seems to be a more and more standard way to do it.

2 Likes

You can add an emoji to the category name using your native emoji picker in your OS.

4 Likes

Ah, that seems simple enough :relaxed: Thank you!

2 Likes

Where to set it? Modify the code or function toggle switch

1 Like

Would it be possible to use uploaded pics with url link?

1 Like

No, I don’t think so.

3 Likes

I’ve specified a Font Awesome icon to replace the default padlock icon. Curiously, it appears to be smaller than the other icons… Makes for wonky alignment of the text (in addition to the icon itself being extra-tiny) in category dropdowns and in the ≡ menu’s category listing…

1 Like

How can i change the color for this from orange to blue ?
Screenshot at 2022-02-13 14-22-33

1 Like

Discourse-team gave me a little work-around that can be added to Theme CSS:

// FIX - New lock icon on private categories
svg.fa.d-icon.d-icon-user-plus.svg-icon.svg-string {
    font-size: 1.3em;
    align-self: center;
}
2 Likes

I’m experiencing a problem where the category slug doesn’t seem to respect hyphens in exact names.
For example if I have category slugs:

beta-testing
beta-testing-bugs
beta-testing-features

Then I add the following theme component entires:

beta-testing,trash-alt,categoryColour
beta-testing-bugs,trash-alt,categoryColour
beta-testing-features,trash-alt,categoryColour

Only the first category takes the “trash-alt” icon and the others don’t display any icon
If I remove the hyphens it seems to work

categories:
beta-testing
betatestingbugs
betatestingfeatures

theme component entries

beta-testing,trash-alt,categoryColour
betatestingbugs,trash-alt,categoryColour
betatestingfeatures,trash-alt,categoryColour

This is a work around but it kinda breaks the naming convention for slugs. Am I doing something wrong or is this a bug?

2 Likes

Actually, I checked this again and that assessment of the problem doesn’t seem to be accurate. It seems like any slugs that have some of the same words as another will not work despite not using partial.

If I’m already using these slugs:

midi
deprecated

Then I can’t use:

midi-deprecated
midideprecated
mideprecated
deprecated-midi

somehow it won’t distinguish it as a different slug I guess

in the end, I had to use: abcd

2 Likes

Hello. Can I make category icons on colored round background like nodebb? This makes the icons look prettier

2 Likes

Yes that should be doable using some CSS.

3 Likes

Hi. Can you add a category style setting to make it look like this?