ParitoshBh / grav-coder

https://paritoshbh.me
MIT License
28 stars 8 forks source link

Making Font Awesome Icons more flexible #30

Closed EpicLPer closed 2 years ago

EpicLPer commented 2 years ago

This change makes Font Awesome icons a bit more flexible, but moves the "fa" and "fab" etc. code to the customization yml. I had to make this change to my own theme customization as example cause I wasn't able to use the E-Mail symbol initially since "fab" is only ever used for brand icons, think this is simply a more flexible solution for this problem also for other icons.

ParitoshBh commented 2 years ago

Hey!

Thanks for contributing :smile:

While this is a welcome change and I agree this is much more flexible that what we have right now. I am thinking about backward compatibility in the sense that would pushing this break any of existing installations.

I do plan to test it over this weekend. Will report my findings.

EpicLPer commented 2 years ago

I'm not sure how easily this could be done, but you could do an "if" condition in he footer and base twig to check if it does have a "fab" or "fa" in front, and if it doesn't then just default back to "fab".
I'm by no means a Grav expert tho and only really gotten into it a week ago or so, and this was my very first experience tinkering with themes :)

ParitoshBh commented 2 years ago

Tested it against Grav version 1.7.11 and 1.7.35 (latest on at the time). Works just fine. I am not adding any logic around the removed fab, we'll mention the same in changelog and tag it as breaking change.

ParitoshBh commented 2 years ago

Pushed as part of version 0.1.10.