Template:HeroIcon/doc: Difference between revisions

From Deadlock Wiki
Jump to navigation Jump to search
Mgpt (talk | contribs)
mNo edit summary
Sylphoid (talk | contribs)
cleanup, add templatedata
 
Line 1: Line 1:
== Usage ==
== Usage ==
This icon link template is used to add a small headshot of the hero with a link.
== Examples ==
<pre style="width:50%">
<pre style="width:50%">
{{HeroIcon|Lash}}
{{HeroIcon|Lash}}
</pre>
</pre>
{{HeroIcon|Lash}}
{{HeroIcon|Lash}}


Line 9: Line 11:
{{HeroIcon|Lash|Jacob}}
{{HeroIcon|Lash|Jacob}}
</pre>
</pre>
{{HeroIcon|Lash|Jacob}}
{{HeroIcon|Lash|Jacob}}


=== Parameters ===
<templatedata>
; p1 : Hero name (required).
{
; p2 : Custom name (optional).
"params": {
; size : Size (optional). Default is 25px.
"2": {
<noinclude>[[Category:Template documentation]]</noinclude>
"description": "Set the alternative text to display.",
"type": "string"
},
"icon": {
"aliases": [
"1"
],
"type": "string",
"description": "Set the image file name.",
"required": true
},
"size": {
"type": "number",
"description": "Set the size of the icon in px.",
"example": "20, 24, 32",
"default": "25"
}
},
"format": "inline",
"paramOrder": [
"icon",
"2",
"size"
]
}
</templatedata><noinclude>[[Category:Template documentation]]</noinclude>

Latest revision as of 21:57, 7 October 2024

Usage[edit source]

This icon link template is used to add a small headshot of the hero with a link.

Examples[edit source]

{{HeroIcon|Lash}}

Lash

{{HeroIcon|Lash|Jacob}}

Jacob

No description.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
iconicon 1

Set the image file name.

Stringrequired
22

Set the alternative text to display.

Stringoptional
sizesize

Set the size of the icon in px.

Default
25
Example
20, 24, 32
Numberoptional