Template:HeroIcon/doc: Difference between revisions

From The Deadlock Wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(4 intermediate revisions by 2 users 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.  
This template creates a small hero icon. The label and link will be automatically translated on a language subpage.
 
For more details, see [[Module:Icon]].


== 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": {
"1": {
"description": "Set the alternative text to display.",
"description": "Hero name.",
"type": "string",
"required": true
},
"l1": {
"description": "Custom text.",
"type": "string"
},
"link": {
"description": "Custom link.",
"type": "string"
"type": "string"
},
},
"1": {
"image": {
"aliases": [
"description": "Custom image.",
"icon"
],
"type": "string",
"type": "string",
"description": "Set the image file name.",
"example": "Image.png, Image.svg"
"required": true
},
},
"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"
"example": "30px, 40px, 50px"
},
"no-link": {
"description": "Removes the target link.",
"type": "boolean",
"suggestedvalues": [
"true"
]
},
"no-file": {
"description": "Removes the file image.",
"type": "boolean",
"suggestedvalues": [
"true"
]
},
"icon-only": {
"type": "boolean",
"suggestedvalues": [
"true"
],
"description": "Removes any text."
}
}
},
},
Line 38: Line 66:
"paramOrder": [
"paramOrder": [
"1",
"1",
"2",
"l1",
"size"
"link",
]
"image",
"size",
"no-link",
"no-file",
"icon-only"
],
"description": " "
}
}
</templatedata><noinclude>[[Category:Template documentation]]</noinclude>
</templatedata><includeonly>[[Category:Icon templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude>

Latest revision as of 21:23, 18 May 2026

This template creates a small hero icon. The label and link will be automatically translated on a language subpage.

For more details, see Module:Icon.

Examples

[edit source]
{{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
linklink

Custom link.

Stringoptional
imageimage

Custom image.

Example
Image.png, Image.svg
Stringoptional
sizesize

Icon size.

Default
20px
Example
30px, 40px, 50px
Stringoptional
no-linkno-link

Removes the target link.

Suggested values
true
Booleanoptional
no-fileno-file

Removes the file image.

Suggested values
true
Booleanoptional
icon-onlyicon-only

Removes any text.

Suggested values
true
Booleanoptional