Template:Hero card2/doc: Difference between revisions

From The Deadlock Wiki
Jump to navigation Jump to search
Created page with "<templatedata> { "params": { "Image": { "label": "Hero Portrait", "description": "If not set. The hero portrait will default to \"Name card.png\"", "type": "string" }, "name": { "label": "Hero Name", "description": "Name of the hero. Also determines the wiki page", "type": "string", "suggestedvalues": [ "Abrams" ], "default": "Abrams" }, "text-size": { "label": "Text Size", "description": "Default is 24px. Change if the her..."
 
Jannepg (talk | contribs)
mNo edit summary
 
(13 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{TS}}
== Usage ==
This template is used in [[Template:Hero Navbox]]. It is called by [[Module:HeroData/nav]].
== Examples ==
<pre>
{{Hero card2|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}}
{{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",
"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"]
},
},
"text-size": {
"cardSize": {
"label": "Card Size",
"description": "Size of the hero card. Dont put 'px' at the end",
"type": "number",
"default": "130",
"suggestedvalues": ["80, 88"]
},
"textSize": {
"label": "Text Size",
"label": "Text Size",
"description": "Default is 24px. 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",
"default": "24",
"suggestedvalues": ["13, 14"]
},
"isHeroLabs": {
"label": "Is Hero Labs",
"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",
"example": "Abrams"
},
"overrideLinkTooltip": {
"label": "Override Link Tooltip",
"description": "Overrides the link from where the tooltip gets its info. Don't include localization subpage, the tooltip adds it automatically when appropriate.",
"type": "string",
"type": "string",
"suggestedvalues": [
"example": "Abrams"
"24"
]
},
},
"recommended": {
"overrideLinkImage": {
"label": "Recommended for new players",
"label": "Override Link Image",
"description": "Is this hero recommended for new players?",
"description": "Overrides the link from where the hero card gets the image. '_vertical.png' is suffixed to the override string.",
"type": "boolean",
"type": "string",
"default": "false"
"example": "Abrams"
},
"overrideLinkClick": {
"label": "Override Link Click",
"description": "Overrides where the hero card links to when clicked on. Localization subpage is NOT added automatically to the override string.",
"type": "string",
"example": "Abrams"
}
}
}
},
"description": " "
}
}
</templatedata><includeonly>[[Category:Templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude>
</templatedata><includeonly>[[Category:Templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude>

Latest revision as of 17:00, 22 May 2026

CSS3 logo.svg
This template uses CSS found at Hero card2/styles.css.

This template is used in Template:Hero Navbox. It is called by Module:HeroData/nav.

Examples

[edit source]
{{Hero card2|Lash}}
{{Hero card2|Lash|overrideDisplayName=Jacob}}
{{Hero card2|Lash|overrideLinkTooltip=Abrams}}
{{Hero card2|Lash|overrideLinkImage=Abrams}}
{{Hero card2|Lash|overrideLinkClick=Abrams}}

Hero Labs

Lash

Hero Labs

Jacob

Hero Labs

Lash

Hero Labs

Lash

Hero Labs

Lash

{{Hero card2|Lash|cardSize=88}}
{{Hero card2|Lash|textSize=13}}
{{Hero card2|Lash|isHeroLabs=true}}

Hero Labs

Lash

Hero Labs

Lash

Hero Labs

Lash

Template parameters

ParameterDescriptionTypeStatus
Hero NameheroName 1

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)

Suggested values
Abrams
Default
Abrams
Stringrequired
Card SizecardSize

Size of the hero card. Dont put 'px' at the end

Suggested values
80, 88
Default
130
Numberoptional
Text SizetextSize

Size of the text on the card. Dont put 'px' at the end.

Suggested values
13, 14
Default
24
Numberoptional
Is Hero LabsisHeroLabs

Shows a hero labs sticker on the card and hero labs text, if enabled.

Suggested values
true false
Default
false
Booleanoptional
Override Display NameoverrideDisplayName

Overrides the name that is displayed on the card.

Example
Abrams
Stringoptional
Override Link TooltipoverrideLinkTooltip

Overrides the link from where the tooltip gets its info. Don't include localization subpage, the tooltip adds it automatically when appropriate.

Example
Abrams
Stringoptional
Override Link ImageoverrideLinkImage

Overrides the link from where the hero card gets the image. '_vertical.png' is suffixed to the override string.

Example
Abrams
Stringoptional
Override Link ClickoverrideLinkClick

Overrides where the hero card links to when clicked on. Localization subpage is NOT added automatically to the override string.

Example
Abrams
Stringoptional