Template
Iconed text
From Dogcraft Wiki
Iconed text template
This template adds an icon image next to a short bit of text. Used as a parent template for several other templates, such as {{NTN}}.
Syntax
Example
Using a file hosted on the wiki
{{Iconed text|Rail.png|An image of a rail item}}
generates:An image of a rail item
{{Iconed text|Rail.png|An image of a rail item|file}}
generates:An image of a rail item
{{Iconed text|Rail.png|An image of a rail item|image}}
generates:An image of a rail item
Using a FontAwesome icon
{{Iconed text|cat|An image of a cat|icon}}
generates: An image of a cat{{Iconed text|cat|An image of a cat|fa}}
generates: An image of a cat{{Iconed text|discord|The discord logo|fa|faStyle=brands}}
generates: The discord logo{{Iconed text|sun|An orange sun|fa|faStyle=regular|faColor=orangered}}
generates: An orange sun
Using an external link
External links must end in .png, .jpg or another file extension. (It must directly link to an image resource)
{{Iconed text|https://minotar.net/helm/MHF_Steve/20.png|''Steve''|external}}
generates:Steve
Template Data
This template adds an icon image next to a short bit of text. Used as a parent template for several other templates, such as {{NTN}}, directly using it is uncommon.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Icon source | 1 | This is the text to display next to the icon
| File | required |
Text | 2 | This is the text to display next to the icon
| String | required |
Style | 3 | The icon's style. Optional and can be left blank, defaults to a file hosted on the wiki. Also accepts "fa" or "icon" for specifying a FontAwesome icon, or "link" or "external" for using an external link.
| String | suggested |
Css style | style | Can be used to optionally set further inline styles on this template.
| String | optional |
FontAwesome icon style | faStyle | Can be used to set a FontAwesome icon's own style. This defaults to "solid", but also accepts "regular" or "brands". (See the Template:Fa page for more information.)
| String | optional |
FontAwesome icon color | faColor | Sets a FontAwesome icon's own color. This accepts any valid CSS color value (eg. html color names such as "red", hex values like "#000000", etc.)
| String | optional |
FontAwesome icon css style | faCssStyle | Can set additional inline css styles on the {{fa}} template. (Not this one, use the base style parameter for that!)
| String | optional |