Template:Hero Card Nav/doc: Difference between revisions

From Deadlock Wiki
Jump to navigation Jump to search
Sylphoid (talk | contribs)
update templatedata, add more examples
Sur (talk | contribs)
m Alt example with localization
 
(One intermediate revision by the same user not shown)
Line 8: Line 8:
{{Hero Card Nav|Hero=McGinnis}}
{{Hero Card Nav|Hero=McGinnis}}
{{Hero Card Nav|Mo & Krill|72}}
{{Hero Card Nav|Mo & Krill|72}}
{{Hero Card Nav|Hero=McGinnis|Alt={{#invoke:Lang|get_string|hero_forge|lang_code_override=zh-hant|fallback_str=en}}}}
</pre>
</pre>
{{Hero Card Nav|Mirage}}
{{Hero Card Nav|Mirage}}
Line 13: Line 14:
{{Hero Card Nav|Hero=McGinnis}}
{{Hero Card Nav|Hero=McGinnis}}
{{Hero Card Nav|Mo & Krill|72}}
{{Hero Card Nav|Mo & Krill|72}}
{{Hero Card Nav|Hero=McGinnis|Alt={{#invoke:Lang|get_string|hero_forge|lang_code_override=zh-hant|fallback_str=en}}}}
<templatedata>
<templatedata>
{
{
Line 23: Line 25:
"1"
"1"
],
],
"type": "string"
},
        "Alt": {
"description": "Alternate name for the hero to display, typically the localized name",
"example": "Abrams",
"default": "Abrams",
"type": "string"
"type": "string"
},
},
Line 43: Line 51:
"paramOrder": [
"paramOrder": [
"Hero",
"Hero",
        "Alt",
"size",
"size",
"font size"
"font size"

Latest revision as of 23:39, 5 November 2024

Usage[edit source]

This template is used in the navbox.

Examples[edit source]

{{Hero Card Nav|Mirage}}
{{Hero Card Nav}}
{{Hero Card Nav|Hero=McGinnis}}
{{Hero Card Nav|Mo & Krill|72}}
{{Hero Card Nav|Hero=McGinnis|Alt={{#invoke:Lang|get_string|hero_forge|lang_code_override=zh-hant|fallback_str=en}}}}

A smaller type of hero card for use primarily in navboxes

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
HeroHero 1

Which Hero this is for

Default
Abrams
Example
Abrams
Stringoptional
AltAlt

Alternate name for the hero to display, typically the localized name

Default
Abrams
Example
Abrams
Stringoptional
sizesize 2

Image size, adjust if using elsewhere

Default
55
Example
50
Numberoptional
font sizefont size

Font size, defaults to 9

Default
9
Numberoptional