Using Font Awesome icons in a XOOPS theme

Themes 7951
Author
Alain
Publication
07/12/2021
07/12/2021
Update
11/03/2021
Rating
5.0 (2 votes)
Level
Normal
Using Font Awesome icons in a XOOPS theme

Using Font Awesome icons in a XOOPS theme Want to use the beautiful icons Font Awesome available for free (in part) in your XOOPS thème?

Then this tutorial is written for you! Note that it will be based on a XOOPS thème but you can follow it using any non-XOOPS theme.


Use in a web page


1. Searching for icons
We have now integrated the Font Awesome library on our website.
Now it's time to look for the icons we are going to insert.

2. Basic display
We will now enter the code needed to make these icons appear.

The basic syntax is as follows:
Icones "Solid" ("fas") :
<span class="fas fa-nom-icône"></span>

Icones "Brand" ("fab") :
<span class="fab fa-nom-icône"></span>


3. Basic examples
Icône Code
<span class="fas fa-anchor"></span>
<span class="fas fa-bell"></span>
<span class="fab fa-ubuntu"></span>
<span class="fab fa-java"></span>


4. Use of options
In addition to the basic syntax, useful parameters can be added for a situation-specific display.
The syntax with options is as follows:
<span class="fas fa-nom-icône [option 1] [option 2] [option 3]"></span>

There are several types of options:
  • Size
    fa-xs, fa-sm, fa-lg, fa-2x, fa-3x, fa-5x, fa-7x, fa-10x

  • Vertical alignment
    (Alignement vertical parfait quelque soit la largeur des icônes, "Fixed Width")
    fa-fw

  • Rotation and reversal
    fa-rotate-90, fa-rotate-180, fa-rotate-270, fa-flip-horizontal, fa-flip-vertical, fa-flip-both

  • Animated icons
    fa-spin, fa-pulse
There are other options.
Coloured icons
Simply add the following code inside the < span > tag:
style = "color:#code-couleur-hexa"
You will find full documentation of the options on the dedicated page of the host site.



5. Examples with options
Icône Code
<span class="fas fa-anchor fa-2x" style="color:slategray"></span>
<span class="fas fa-lightbulb fa-3x fa-flip-vertical" style="color:#FFFACD"></span>
<span class="fab fa-ubuntu fa-5x fa-spin" style="color:#DB4E2A"></span>
<span class="fas fa-fan fa-2x fa-pulse" style="color:LightSalmon"></span>
<span class="fas fa-palette fa-3x xoopsweb-color"></span>

You now have everything you need to enjoy the Font Awesome library in your web pages!
Enjoy using it!