Template:HeroIcon/doc: Difference between revisionsGive feedback
Jump to navigation
Jump to search
No edit summary |
m upd |
||
| Line 1: | Line 1: | ||
== Usage == | == Usage == | ||
This | 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| | {{HeroIcon|Trapper}} | ||
{{HeroIcon|Dynamo|l1=Professor Dynamo}} | |||
{{HeroIcon|Warden|size=40px}} | |||
</pre> | </pre> | ||
{{HeroIcon| | {{HeroIcon|Trapper}} | ||
{{HeroIcon|Dynamo|l1=Professor Dynamo}} | |||
{{HeroIcon|Warden|size=40px}} | |||
{{HeroIcon| | |||
{{HeroIcon| | |||
<templatedata> | <templatedata> | ||
{ | { | ||
"params": { | "params": { | ||
"1": { | "1": { | ||
" | "description": "Hero name.", | ||
"type": "string", | "type": "string", | ||
"required": true | "required": true | ||
}, | |||
"l1": { | |||
"description": "Custom text.", | |||
"type": "string" | |||
}, | }, | ||
"size": { | "size": { | ||
"type": " | "default": "20px", | ||
"description": " | "type": "string", | ||
" | "description": "Icon size.", | ||
" | "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", | ||
" | "description": "" | ||
} | } | ||
</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
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| 1 | 1 | Hero name. | String | required |
| l1 | l1 | Custom text. | String | optional |
| size | size | Icon size.
| String | optional |
| no-link | no-link | Removes the link.
| Boolean | optional |
| icon-only | icon-only | Hides any text.
| Boolean | optional |