Template:Icon: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
No edit summary
m (using the newer image missing image)
Line 1: Line 1:
<includeonly>{{#ifexist: File:{{trim | {{{1}}} }} | [[File:{{trim | {{{1}}} }}|link={{{link|}}}|x{{trim | {{{2|40}}} }}px|{{{link|}}}]] | [[File:{{trim | {{{1}}} }}|link={{{link|}}}|{{{link|}}} ''(Icon Missing)'']] }}</includeonly><noinclude>
<includeonly>{{#ifexist: File:{{trim | {{{1}}} }} | [[File:{{trim | {{{1}}} }}|link={{{link|}}}|x{{trim | {{{2|40}}} }}px|{{{link|}}}]] | [[File:NoImage Icon.webp|x{{trim | {{{2|40}}} }}px|link={{{link|}}}|{{{link|}}} ''(Icon Missing)'']] }}</includeonly><noinclude>
Usage: {{code|<nowiki>{{icon|Flourish Icon.png}}</nowiki>}}
Usage: {{code|<nowiki>{{icon|Flourish Icon.png}}</nowiki>}}



Revision as of 03:19, 21 August 2023

Usage: {{icon|Flourish Icon.png}}

Result: 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:

Usage: {{icon|Flourish Icon.png|30}}

Result: Flourish Icon.png

Usage: {{icon|Flourish Icon.png|50}}

Result: Flourish Icon.png

You can also provide a link:

Usage: {{icon|Flourish Icon.png|link=Flourish}}

Result: Flourish

Behavior when icon is missing:

Usage: {{icon|Missing Filename 123.png|link=Flourish}}

Result: Flourish (Icon Missing)