Template:Hero Card Nav: Difference between revisions

From Deadlock Wiki
Jump to navigation Jump to search
QuinnBinn (talk | contribs)
m Made the template use the same class as HeroCard2, so it now has animations!
Sur (talk | contribs)
m allow alt parameter for localizing hero name
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<onlyinclude><div class="HeroCard2"; style="display:inline-block; position:relative">
<onlyinclude><div class="HeroCard2"; style="display:inline-block; overflow:hidden; border-radius:8px; background-image:linear-gradient(#A69885, #72695A); position:relative; transition:0.1s transform ease-in-out; height:auto; max-width:{{{size|{{{2|88}}}}}}px; width:100%; box-shadow:1px 1px 4px;">
[[File:{{{Hero|Abrams}}} card.png|{{{size|50}}}px|link={{{Hero|Abrams}}}]]
<span>[[File:{{{Hero|{{{1|Abrams}}}}}} card.png|{{{size|{{{2|88}}}}}}px|link={{{Hero|{{{1|Abrams}}}}}}]]</span><p style="position: absolute; bottom: 0px; text-align: center; background-color:rgba(0, 0, 0, 0.35); border-radius: 0px 0px 8px 8px; width: 100%; font-weight: bold; text-shadow: 0px 0px 4px black, 0px 0px 4px black, 0px 0px 4px black;font-family:'Liberation Serif', serif;font-size: {{{font size|11}}}px; letter-spacing: 0.5px; margin: 0; text-transform: uppercase; pointer-events: none;">[[{{{Hero|{{{1|Abrams}}}}}}|<span style="color:#FFEFD7">{{{Alt|{{{Hero|{{{1|Abrams}}}}}}}}}</span>]]</p>
<p style="position: absolute; bottom: 7px; text-align: center; background-color:rgba(0, 0, 0, 0.35); border-radius: 2px; width: 100%; font-weight: bold; text-shadow: 0px 0px 4px black, 0px 0px 4px black, 0px 0px 4px black; font-size: {{{font size|9}}}px; letter-spacing: 0.5px; margin: 0; text-transform: uppercase; pointer-events: none;">[[{{{Hero|Abrams}}}|<span style="color:#FFEFD7">{{{Hero|Abrams}}}</span>]]</p>
</div></onlyinclude><noinclude>{{Documentation}}</noinclude>
</div></onlyinclude>
<noinclude>
 
<templatedata>
{
"params": {
"Hero": {
"description": "Which Hero this is for",
"example": "Abrams"
},
"size": {
"description": "Image size, adjust if using elsewhere",
"example": "50",
"type": "number",
"default": "50"
},
"font size": {
"description": "Font size, defaults to 10",
"type": "number",
"default": "10"
}
},
"description": "A smaller type of hero card for use primarily in navboxes",
"paramOrder": [
"Hero",
"size",
"font size"
]
}
</templatedata>
</noinclude>

Latest revision as of 23:36, 5 November 2024

Template documentation [view] [edit] [history] [purge]

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[Edit template data]

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