Template

Fa

From Dogcraft Wiki

(proper documentation + templatedata)
m (Added category: Annotation templates)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><i class="fa-{{{2|solid}}} fa-{{{1|square}}}" style="color:{{{color|black}}}; {{{style|}}}"></i></includeonly>
<includeonly><i class="fa-{{{2|solid}}} fa-{{{1|square}}}" style="color:{{{color|inherit}}}; {{{style|}}}"></i></includeonly><noinclude>[[Category:Annotation templates]]
<noinclude>
==FontAwesome template==
==FontAwesome template==
This template adds a [https://fontawesome.com/ FontAwesome] icon. Add wherever you need such an icon.  
This template adds a [https://fontawesome.com/ FontAwesome] icon. Add wherever you need such an icon.  

Latest revision as of 12:03, 4 December 2023

FontAwesome template

This template adds a FontAwesome icon. Add wherever you need such an icon.


The https://fontawesome.com/search site can be used to search for icons. After finding a suitable one, click on it, and copy its name. (Clicking on the name copies it.) The default style used is "Solid", but it can be set using the template's second (unnamed) parameter. The icon's color can also be changed using the |color= property.

Example

  • {{fa|alarm-clock}} generates:
  • {{fa|alarm-clock|regular}} generates:
  • {{fa|alarm-clock|regular|color=blue}} generates:

Template Data

Adds a FontAwesome icon

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Icon name1

The name of the FA icon, without the "fa-" prefix.

Example
folder-open
Stringrequired
Icon style2

Optional parameter for setting the icon's style. Options are: solid, regular, light, thin, duotone. Solid is the default, and using it is recommended for consistency.

Default
solid
Example
regular
Stringsuggested
Icon colorcolor

Optional parameter for the icon's color

Default
black
Example
red, #8b0024
Stringsuggested
Further stylingstyle

Optional parameter for setting further CSS styles.

Stringsuggested