Template:Hero card2/doc: Difference between revisions

No edit summary
Jannepg (talk | contribs)
mNo edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{TS}}
== Usage ==
== Usage ==
This template is used in [[Template:Hero Navbox]]. It is called by [[Module:HeroData/nav]].
This template is used in [[Template:Hero Navbox]]. It is called by [[Module:HeroData/nav]].
Line 4: Line 5:
== Examples ==
== Examples ==
<pre>
<pre>
{{Hero card2|name=Lash|link=Lash}}
{{Hero card2|Lash}}
{{Hero card2|name=Jacob|link=Lash}}
{{Hero card2|Lash|overrideDisplayName=Jacob}}
{{Hero card2|Lash|overrideLinkTooltip=Abrams}}
{{Hero card2|Lash|overrideLinkImage=Abrams}}
{{Hero card2|Lash|overrideLinkClick=Abrams}}
</pre>
</pre>
{{Hero card2|name=Lash|link=Lash}}
{{Hero card2|Lash}}
{{Hero card2|name=Jacob|link=Lash}}
{{Hero card2|Lash|overrideDisplayName=Jacob}}
{{Hero card2|Lash|overrideLinkTooltip=Abrams}}
{{Hero card2|Lash|overrideLinkImage=Abrams}}
{{Hero card2|Lash|overrideLinkClick=Abrams}}
 
<pre>
{{Hero card2|Lash|cardSize=88}}
{{Hero card2|Lash|textSize=13}}
{{Hero card2|Lash|isHeroLabs=true}}
</pre>
{{Hero card2|Lash|cardSize=88}}
{{Hero card2|Lash|textSize=13}}
{{Hero card2|Lash|isHeroLabs=true}}
 
<templatedata>
<templatedata>
{
{
"params": {
"params": {
"Image": {
"heroName": {
"label": "Hero Portrait",
"description": "If not set. The hero portrait will default to \"Name card.png\"",
"type": "string"
},
"name": {
"label": "Hero Name",
"label": "Hero Name",
"description": "Name of the hero. Also determines the wiki page, if no argument \"link\" has been used",
"description": "English name of the hero. If no overrides are used then the input value is used to: Set the name on the card (localization gets applied when appropriate), Set the image (heroName._vertical.png), Set the tooltip (localization gets applied when appropriate) and Set where the card links to when clicked (localized subpage get applied when appropriate)",
"type": "string",
"type": "string",
"suggestedvalues": [
"required": true,
"Abrams"
"suggestedvalues": ["Abrams"],
],
"default": "Abrams",
"default": "Abrams"
"aliases": ["1"]
},
},
"link": {
"cardSize": {
"label": "Hero Link",
"label": "Card Size",
"description": "Determines the wiki page. If not used, wiki page link will be determined by \"name\" argument",
"description": "Size of the hero card. Dont put 'px' at the end",
"type": "string"
"type": "number",
},
"default": "130",
"text_size": {
"suggestedvalues": ["80, 88"]
},
"textSize": {
"label": "Text Size",
"label": "Text Size",
"description": "Change if the hero name doesnt fit. Dont put px at the end.",
"description": "Size of the text on the card. Dont put 'px' at the end.",
"type": "number",
"type": "number",
"default": "11",
"default": "24",
"suggestedvalues": [
"suggestedvalues": ["13, 14"]
"20, 11"
]
},
},
"card_size": {
"isHeroLabs": {
"label": "Card Size",
"label": "Is Hero Labs",
"description": "Size of the hero card. Dont put px at the end",
"description": "Shows a hero labs sticker on the card and hero labs text, if enabled.",
"type": "boolean",
"default": "false",
"suggestedvalues": ["true","false"]
},
"overrideDisplayName": {
"label": "Override Display Name",
"description": "Overrides the name that is displayed on the card.",
"type": "string",
"type": "string",
"default": "88",
"example": "Abrams"
"suggestedvalues": [
"132, 88"
]
},
},
"sticker_size": {
"overrideLinkTooltip": {
"label": "Sticker Size",
"label": "Override Link Tooltip",
"description": "Size of the Recommended/Hero Lab sticker that appears in the top right of hero cards.",
"description": "Overrides the link from where the tooltip gets its info. Don't include localization subpage, the tooltip adds it automatically when appropriate.",
"example": "30",
"type": "string",
"type": "string",
"suggestedvalues": [
"example": "Abrams"
"30",
"56"
],
"default": "30"
},
},
"herolabs_text_size": {
"overrideLinkImage": {
"label": "Hero Labs Text Size",
"label": "Override Link Image",
"description": "Size of the Hero Labs text that appears for Hero Lab heroes.",
"description": "Overrides the link from where the hero card gets the image. '_vertical.png' is suffixed to the override string.",
"example": "6",
"type": "string",
"type": "number",
"example": "Abrams"
"suggestedvalues": [
"6",
"8"
],
"default": "6"
},
},
"recommended": {
"overrideLinkClick": {
"label": "Recommended for new players",
"label": "Override Link Click",
"description": "Is this hero recommended for new players?",
"description": "Overrides where the hero card links to when clicked on. Localization subpage is NOT added automatically to the override string.",
"type": "boolean",
"type": "string",
"default": "false"
"example": "Abrams"
},
"herolabs": {
"label": "is hero experimental?",
"description": "Is the hero in hero labs",
"example": "false",
"type": "boolean",
"suggestedvalues": [
"true",
"false"
],
"default": "false"
}
}
},
},