Template:Icon/doc

From bg3.wiki
Jump to navigation Jump to search

Displays an icon.

Markup Renders as
{{icon | Flourish Icon.png }}
Flourish Icon.png

The default size is x25px meaning the icon is scaled until the height is 25 px. This is important as this template is often used inline -- especially indirectly through {{icon link}} -- thus controlling the height matters the most. An alternative value for the size can be provided like so:

Markup Renders as
{{icon | Flourish Icon.png | 30 }}
Flourish Icon.png
{{icon | Flourish Icon.png | 50 }}
Flourish Icon.png

Alternatively you can use the named parameters w and/or h. Note that these are max values, so the more limiting one applies, based on the icon's original resolution. For example, in the following, the height value is effectively ignored, because the original image is a square, so the width becomes the limiting factor.

Markup Renders as
{{icon | Flourish Icon.png | w = 20 | h = 50 }}
Flourish Icon.png

An alt text can be applied to the image through the optional caption parameter.

Examples

Example Markup Renders as
Width only
{{icon | Advantage Icon.png | w = 25 }}
Advantage Icon.png
Height only
{{icon | Advantage Icon.png | h = 25 }}
Advantage Icon.png
With a link
{{icon | Flourish Icon.png | link = Flourish }}
Flourish
With alt text
{{icon | Flourish Icon.png | link = Flourish | caption = Blah }}
Blah
Missing icon
{{icon | Missing Filename 123.png | link = Flourish }}
Flourish
Drop shadow
{{icon | Flourish Icon.png | class = bg3wiki-lightmode-drop-shadow }}
Flourish Icon.png