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
 
(One intermediate revision by one other user not shown)
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|Abrams}}
{{HeroIcon|Lash}}
</pre>
</pre>
{{HeroIcon|Lash}}


{{HeroIcon|Abrams}}
<pre style="width:50%">
{{HeroIcon|Lash|Jacob}}
</pre>
{{HeroIcon|Lash|Jacob}}


=== Parameters ===
<templatedata>
; p1 : Hero name (required).
{
; p2 or size : Size (optional). Default is 25px.
"params": {
<noinclude>[[Category:Template documentation]]</noinclude>
"2": {
"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