Template:Icon

From bg3.wiki
Jump to navigation Jump to search
Template documentation

Displays an icon.

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

The default size is x40px meaning the icon is scaled until the height is 40 px. It's usually important to limit the height since the icons are used inline, and a very high inline image makes for an unpleasant text layout.

An alternative value for the height 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 h. Note that these are max values so the more limiting one applies. In the following example, the height value is essentially ignored because the original image is a square so the width becomes the limiting factor. (Were the original image 200 by 500, the result would be 20 by 50.)

Example Markup Renders as
Width and height
{{icon | Flourish Icon.png | w = 20 | h = 50 }}
Flourish 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 }}
File:Missing Filename 123.png
Drop shadow
{{icon | Flourish Icon.png | class = bg3wiki-lightmode-drop-shadow }}
Flourish Icon.png