Template:HeroIcon/doc: Difference between revisions

cleanup, add templatedata
mNo edit summary
 
(7 intermediate revisions by 5 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}}
</pre>
{{HeroIcon|Dynamo|l1=Professor Dynamo}}
{{HeroIcon|Lash}}
{{HeroIcon|Warden|size=40px}}
 
<pre style="width:50%">
{{HeroIcon|Lash|Jacob}}
</pre>
</pre>
{{HeroIcon|Lash|Jacob}}
{{HeroIcon|Trapper}}
{{HeroIcon|Dynamo|l1=Professor Dynamo}}
{{HeroIcon|Warden|size=40px}}


<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"
},
},
"icon": {
"image": {
"aliases": [
"description": "Custom image.",
"1"
],
"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."
}
}
},
},
"format": "inline",
"format": "inline",
"paramOrder": [
"paramOrder": [
"icon",
"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>