Font Awesome icon
Module Id
font-awesome
Group Id
org.jahia.modules
Updated
Requires Jahia
8.0.0.0
Author
JSG
Category
Templating and extensions
Status
COMMUNITY info

Font Awesome group_work

Get vector icons and social logos on your website with Font Awesome, the web’s most popular icon set and toolkit.

Dependencies & Dependants

Changelog 6.1.5

  • Change color + size of the png files used in the choicelist
  • Put the icon property on first position for the Display icon component

 

FAQ

What is the embedded version?

This module for Jahia 8 embeds the version 5.15.2 of Font Awesome

How To Install

How to call Font awesome assets

<template:addResources type="css" resources="all.min.css"/>

How to get the prefix

This version allows getting the prefix (fab|far|fas) from an icon using a function.

First, you will need to add a Maven dependency to your module

<dependency>
  <groupId>org.jahia.modules</groupId>
  <artifactId>font-awesome</artifactId>
  <version>[6.0,6.2)</version>
  <scope>provided</scope>
</dependency>

Also, in your pom.xml, you will need to add the package com.jahia.module.fontawesome in the list of the Import-Package of your maven-bundle-plugin

<plugins>
    <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
            <instructions>
            <Import-Package>com.jahia.module.fontawesome,${jahia.plugin.projectPackageImport},*</Import-Package>
            </instructions>
        </configuration>
    </plugin>
</plugins>

Then declare the taglib and use the fa:getPrefix function

<%@ taglib prefix="fa" uri="http://font-awesome.com/taglibs" %>
${fa:getPrefix('fa-ban')}

This will return fas because the icon ban is located in the solid font (fas).

Please check the ChangeLog at https://github.com/FortAwesome/Font-Awesome/blob/master/CHANGELOG.md

Are you a Font awesome 4 user

If yes, you should seriously read the related doc on the font awesome website https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4, but you can still try to use the deprecated font-awesome.css file or simply add ad a v4-shims.min.css to keep compatibility.

<template:addResources type="css" resources="all.min.css"/>
<template:addResources type="css" resources="v4-shims.min.css"/>

Images