Font awesome icons 2.3 - categories, nodes, prefixes, phrases, templates etc...

Font awesome icons 2.3 - categories, nodes, prefixes, phrases, templates etc...

Depending on what exactly you want to do the easiest approach might be to change the field title to
Thoughts on adding a FA icon to the custom user field value display HTML output?

Prior to 2.3 I could add (for example) <i class="fab fa-mastodon"></i> to the display HTML to display the Mastodon icon after the value but with 2.3 none of my experiments seem to be working to get it displayed.
 
Thoughts on adding a FA icon to the custom user field value display HTML output?

Prior to 2.3 I could add (for example) <i class="fab fa-mastodon"></i> to the display HTML to display the Mastodon icon after the value but with 2.3 none of my experiments seem to be working to get it displayed.
i believe its the thing like <xf:fa icon="fa fa-bars" aria-hidden="true" />
 
i believe its the thing like <xf:fa icon="fa fa-bars" aria-hidden="true" />
Thanks, unfortunately though that was one of my experiments and it would appear that for the custom user fields the display HTML is not parsed so you end up with the literal value of <xf:fa icon="fa fa-bars" aria-hidden="true"> in the output.

With 2.3, having to use a one-off class as Kirby suggested for the Title might be the only way.
 
You can use the JS renderer to accomodate places which aren't phrased or don't support template syntax:

HTML:
<i class="fa fa-bars" data-xf-init="icon"></i>
Oh that fixes my issue too! It works in the group banner text box. Thanks!
 
Thanks Russ.

How do I specify which FA icon I want for a particular widget?

Code:
.p-body-sidebar .block[data-widget-definition="new_threads"] .block-minorHeader:before { .m-faContent(@fa-var-comments); }

This code works outside of our framerwork any anyone else needs it as well. You just inspect the HTML and find the data-widget-defition, then replace comments with your icon name.
 
Hy,
would someone get me started to have this running on xf2.3?

on my xf2.2 i use this code to change the font awesome icons at the navbar:
Code:
<xf:if is="property('xenfocus_navIcons')">.focus-wrap-nav .p-navEl-link,.offCanvasMenu-linkHolder .offCanvasMenu-link[data-nav-id]{

    &[data-nav-id="xa_showcase"]:before{ content: '\f05a'; }

}</xf:if>
but his won't work on 2.3.
When I use this code
Code:
<xf:if is="property('xenfocus_navIcons')">.focus-wrap-nav .p-navEl-link,.offCanvasMenu-linkHolder .offCanvasMenu-link[data-nav-id]{

    &[data-nav-id="xa_showcase"]:before{
     .m-faIcon(@fa-var-info);
    }

}</xf:if>
the fontawesome icon will be shown.
But using an icon with "two words", e.g. "circle-info", no icon will be shown!?!
Using this icon:
Code:
[...]
     .m-faIcon(@fa-var-circle-info);
[...]
will show no icon.

WHY?


Can someone please help me out?

kr Chris
 
Last edited:
And it worked, thank you very much! I tried to change the comments to game or games and it doesn't show the game icon.

{icon:far::gamepad}

 
Back
Top Bottom