Font Field Icon

Categories

Component ID

2898959

Component name

Font Field Icon

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Downloads

468

Component created

Component changed

Component body

This module will add "Font field icon" new field type to the site.
It consists of two elements – “Select” dropdown with Fontawesome icon selection and a Text field for link display.


Features

This field has two formatters for output:

1 - Fontawesome icon and text (link)
2 - Only Fontawesome icon (clickable).

I hope this module will help developers avoid the routine work with
 fields for social links in the footer or in user's profile.

Also, when you use this field with selected "Envelope" Fontawesome icon
- fill only email address in additional Text field (e.g. info@example.com) and field
will be rendered as <a href='mailto:info@example.com'>info@example.com</a> link.

Installation

This module depends on Field and Libraries.
So make sure you have activated both of them.

This module needs to be installed via Composer, and you should download the
required library (Fontawesome to libraries/fontawesome). See instructions below.

1. Add the Drupal Packagist repository
composer config repositories.drupal composer https://packages.drupal.org/8
This allows Composer to find Font field icon and the other Drupal modules.

2. Download Font field icon module
composer require "drupal/font_field_icon ~1.0"

It will download the latest release of Font field icon module.
Use 1.x-dev instead of ~1.0 to get the -dev release instead.

Do not forget to add Fontawesome library
from https://github.com/FortAwesome/Font-Awesome/archive/v4.7.0.zip to libraries/fontawesome.

Download and extract files from this archive to libraries/fontawesome.

Folder structure should be libraries/fontawesome/css, libraries/fontawesome/fonts, etc.

See https://www.drupal.org/node/2404989 for more information.