Can you please add the support of FontAwesome icons set to the 7.x version

CommentFileSizeAuthor
#2 sociel_media_links.patch2.54 KBTobias März
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alqahtani created an issue. See original summary.

Tobias März’s picture

FileSize
2.54 KB

Provided patch for fontawesome support.
Hopefully it is correct (my first patch).

JoachimA’s picture

Hi !

Seems great but could you give some directions on how to use it ?

Tobias März’s picture

Hi!

I've added a checkbox in Appearance fieldset called "Use fontawesome".
If checked it uses <i> instead of <img>.

fontawesome font should be added to theme manually.

cbeier’s picture

The implementation of a plugin system (like in D8) and the possibility to integrate Font Awesome are on my todo list.

But this is a large rewrite of many components in the module. So I can not say, if and when I have the rewrite finished. With the rewrite (independently of Font Awesome) the module should support not only "img"-icons, but also css and any other markup structure for the icon output.

JoachimA’s picture

This patch works great !
Thanks !

sinasalek’s picture

SKAUGHT’s picture

reviewed. patch does seem works nicely. +1

SKAUGHT’s picture

Status: Active » Reviewed & tested by the community
cbeier’s picture

Status: Reviewed & tested by the community » Needs review

Iconset can only be implemented as Iconset and via the hook system. Otherwise we have in future many checkboxes in the settings form. And for user it will not be clear what exactly happens.

cbeier’s picture

Status: Needs review » Active
cbeier’s picture

After implemented the patch from #2728393: New iconset callback for more flexibility (icon callback) we can write a new patch and can try to implement FontAwesome as a additional Iconset.

heyyo’s picture

youtube_channel id should be just youtube, there is not such icon name in fontawesome.

Full Trucker’s picture

For anyone perusing this thread that wants to add the Font Awesome 5 iconset to this module, here's what I did and it works a treat:

  1. Install the Social Media Links Block and Field module
  2. (obviously)

  3. Patch the above module with the New iconset callback for more flexibility (icon callback) patch
  4. I also added the Adds New Platforms patch, but it's probably unnecessary
  5. Install and enable the Social Media Links Extra from the Ginkgo Street Labs Github repo
  6. (hat tip to sinasalek on getting the integration started)

  7. Install and enable the Font Awesome module
  8. Configure the Font Awesome module module to use "Web Fonts with CSS"
  9. Configure the Social Media Links Block and Field module with social platforms of your choice, and select one of the sizes of FontAwesome iconsets.