How can I add a Font Awesome to menubuilder component?

Michael Atencio Posted in Component Development 4 years ago

I want to add a ghost, magic wand, and wizard hat from Font Awesome to the Menubuilder Component. Does anyone know how to do this?

Replies
us Michael Atencio Replied 4 years ago

That makes a lot of sense. Thanks for that.

gb Rishi B Replied 4 years ago

content delivery network. typically used to include things like popular css or js files that are hosted remotely (so you don't have to download them to your webhost, and so if they make an important update, your page will still load the latest version). In the snippet I posted below, maxcdn.bootstrapcdn.com is the CDN that is delivering the fontawesome.min.css file.

us Michael Atencio Replied 4 years ago

Okay, not too hard. Here's a dumb question but I can't find an answer. What's a CDN? lol Thank you.

us Michael Atencio Replied 4 years ago

Okay, not too hard. Here's a dumb question but I can't find an answer. What's a CDN? lol Thank you.

gb Rishi B Replied 4 years ago

I'm not positive but I think it's because the most recent version of fontawesome is not included and the specific icons you want aren't in the version that your theme loads via cdn.

From themes/goblue/ossn_theme.php->ossn_goblue_head():

$head[]  = ossn_html_css(array(
                    'href' => '//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css'
              ));   

according to https://www.bootstrapcdn.com/fontawesome/, the most recent free version is 4.7... but I'd suggest first verifying the specific icons you want to use are in that version (actually it looks like even 4.7 may be outdated, I'd browse the fontawesome site and check exactly what version is needed for the icons you wanna use).

I just did a quick search at https://fontawesome.com/icons and it looks like the wizard hat icon is only available in fontawesome 5. I also checked https://fontawesome.com/v4.7.0/icons/ and it appears none of the icons you want are even in 4.7... so I think you're going to have to upgrade the version of fontawesome that your ossn site is using to 5.

there is a free version of fontawesome5 and it can also be loaded via cdn but you have to register your email on the fontawesome.com site to get the cdn link.