Font-awesome updates

I saw someone commenting (taking a shot at almost) someone else on Mastodon for basically making it their entire personality, but yet failing to include a link to their Mastodon on their own website, and I realized that this basically applied to me!

I checked, and Font Awesome, which I’m using for icons for my site, indeed has an icon for “The ‘Don”… but unfortunately it was introduced in the next major version and not the one that I have. I’m currently two major versions behind, so let’s rectify that!

(I was, at the time of writing, previously on 4.x)

It took a bit to figure out what was going on when I upgraded, it turns out that in 5.x, FA switched from everything being in the fa namespace (I think namespace is the right word? I don’t really speak CSS anymore), to the “brands” being swapped out into fab. This complicated things, because my theme assumes everything will be fa, then I use the Post field of the menuitem to include the font-awesome icon class.

So after thinking of how to do this, I decided to just abuse this some more and store the full FA class in the Post field, and got it working. While I was at it, added some quick template logic to include rel="me" on the Mastodon link and I get a green tick out of it to boot.

I’m not 100% happy with this setup, but it’s arguably the best I can manage at the moment, and the care factor’s pretty low on doing it properly.

Horsham, VIC, Australia fwaggle

Published:


Modified:


Filed under:


Location:

Horsham, VIC, Australia

Navigation: Older Entry Newer Entry