Template:HeroIcon/doc: Difference between revisions

From The Deadlock Wiki
Jump to navigation Jump to search
No edit summary
m upd
Line 1: Line 1:
== Usage ==
== Usage ==
This icon link template is used to add a small headshot of the hero with a link.  
This template creates a small hero icon. The label and link will be automatically translated on a language subpage. See: [[Module:Icon/data]].


== Examples ==
== Examples ==
<pre style="width:50%">
<pre style="width:50%">
{{HeroIcon|Lash}}
{{HeroIcon|Trapper}}
{{HeroIcon|Dynamo|l1=Professor Dynamo}}
{{HeroIcon|Warden|size=40px}}
</pre>
</pre>
{{HeroIcon|Lash}}
{{HeroIcon|Trapper}}
 
{{HeroIcon|Dynamo|l1=Professor Dynamo}}
<pre style="width:50%">
{{HeroIcon|Warden|size=40px}}
{{HeroIcon|Lash|Jacob}}
</pre>
{{HeroIcon|Lash|Jacob}}


<templatedata>
<templatedata>
{
{
"params": {
"params": {
"2": {
"description": "Set the alternative text to display.",
"type": "string"
},
"1": {
"1": {
"aliases": [
"description": "Hero name.",
"icon"
],
"type": "string",
"type": "string",
"description": "Set the image file name.",
"required": true
"required": true
},
"l1": {
"description": "Custom text.",
"type": "string"
},
},
"size": {
"size": {
"type": "number",
"default": "20px",
"description": "Set the size of the icon in px.",
"type": "string",
"example": "20, 24, 32",
"description": "Icon size.",
"default": "25"
"suggestedvalues": [
"30px",
"40px",
"50px"
]
},
"no-link": {
"description": "Removes the link.",
"type": "boolean",
"suggestedvalues": [
"true"
]
},
"icon-only": {
"type": "boolean",
"suggestedvalues": [
"true"
],
"description": "Hides any text."
}
}
},
},
"format": "inline",
"format": "inline",
"paramOrder": [
"description": ""
"1",
"2",
"size"
]
}
}
</templatedata><noinclude>[[Category:Template documentation]]</noinclude>
</templatedata><includeonly>[[Category:Icon templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude>

Revision as of 21:22, 21 May 2025

Usage

This template creates a small hero icon. The label and link will be automatically translated on a language subpage. See: Module:Icon/data.

Examples

{{HeroIcon|Trapper}}
{{HeroIcon|Dynamo|l1=Professor Dynamo}}
{{HeroIcon|Warden|size=40px}}

Trapper Professor Dynamo Warden

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
11

Hero name.

Stringrequired
l1l1

Custom text.

Stringoptional
sizesize

Icon size.

Suggested values
30px 40px 50px
Default
20px
Stringoptional
no-linkno-link

Removes the link.

Suggested values
true
Booleanoptional
icon-onlyicon-only

Hides any text.

Suggested values
true
Booleanoptional