The category icons on our site have looked great, until I logged in today. it appears that the padding in between the icon and the category title has no padding, when displayed. Anyone else having this issue?
Is it possible to use other icons that Font Awesome? My forum is about travelling and i need very specific icons that donāt exist there. Can we use a regular png icon file for example? as we do with categories? thanks!
You can use custom icons if you convert them to SVGs and add them to your theme via an SVG sprite. See the āCreate an SVG spritesheetā section of this guide on how to add custom icons to your site which you can then use in this component (and throughout your Discourse site).
Works great!
Is it possible for me to tweak it so that the icon appears after the category title?
Bonus question: is it possible to add a tooltip/alt-text?
(Background: Iām hiding the pad lock icon and instead use this component to add an icon to the few public categories I have. And I would like for users to have way to find out what the symbol stands for.)
In your theme component, upload your spritesheet and set the variable name to icons-sprite:
In the component settings, use the id of the desired icon from your spreadsheet. For example if I have an icon id named my-icon in my spreadsheet, I write this:
@Canapin Thank you! it worked like a charm. I have one more question though, is this sprite file exclusive to a particular component or I can access the icons with their ids anywhere?
Hereās an example with it set to light. Image Critiques has the icon comment-alt-edit and does not display (which is a pro icon), Image Showcase has the icon images which is not pro, but is displaying the regular version, not light. Discussions is showing the solid version of comments, and Community is showing the light version of users as expected.
I tried changing one of them to cog, and it works as expected with the proper light version, lots of oddness going on here!
Okay I got it now, the key is having far- in the category icon list, not svg icons. So for light icons I have to change them all to fal- and it does not follow the site setting for fa icon style correct?