Category Icons

Try this:

.select-kit .category-badge-icon {
    display: none;
}
1 Like

That did it. Thank you for the help! I think Discourse navigation is fine as-is but for now I have to implement this small feature for these users and hopefully I can remove it at some point in the future. Itā€™s more of a stop gap fix for the moment.

2 Likes

Hi,

Is it just me, or does this component not recognize name changes in slugs?

I doesnā€™t seem to recognize category slugs with changed names in my case, not right away anyway.

1 Like

I use the dark mode component as well.

So that makes it a bit difficult to use this for the main categories. Because the icon shows up next to the main category. I now use ā€œcategoryColorā€, which is red. That works for both the dark and light mode on my forum. But then the icon is not visible in the category selection menu. Because it has the same color as it. So there is just a blank space. Is there a way to fix this? Use an alternative color for the category dropdown menu? Because when ā€œcategoryColorā€ is used, the icon is not visible anymore. Would be great to have a white color for the icon there.

1 Like

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