Template:HeroRosterCard: Difference between revisions

From The Deadlock Wiki
Jump to navigation Jump to search
No edit summary
localization fix
 
(26 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<onlyinclude>
<onlyinclude>
<div style="display:inline-block; margin: 15px 10px 15px 10px; width:min(768px, 90vw);">
{{#vardefine:quotemark|"}}
{|- style="text-align:left; background-image: linear-gradient(30deg, #e8be86, #fdf5e8); border-collapse:collapse; border-radius: 55px; font-size: 12px; color:#000000; font-family:'Retail Demo Regular','Open Sans', 'PT Serif','Palatino','Georgia',serif;"
{{#vardefine:hero|{{#invoke:Lang|get_string|{{{key}}}|lang_code_override=en}}}}<!--
| rowspan="4" | <div class="HeroCard2 hide-parent-td-mobile" style="width: min(256px, 15vw); padding: 10px 25px 10px 5px; transition: 0.08s transform ease-in-out;">[[File:{{{hero|Abrams}}} Render.png|256px|link={{{hero|Abrams}}}{{If_lang}}]]</div>
--><div class="nav-bg" style="display:inline-block; margin: 3px 5px; max-width:300px; border-radius: 20px;">
| style="text-align:center; font-family: 'Forevs Demo','Open Sans'; background-color: #FCEED4; height:45px; font-size:25px; color:#000000; line-height:8px; vertical-align: middle;" colspan="2" | {{If lang
{|- style="table-layout: fixed; text-align:center; font-size: 12px; margin:10px; font-family:'Valve Occult','Retail Demo Regular','Open Sans', 'PT Serif','Palatino','Georgia',serif;"
|{{Template:Icon/White|{{If lang
   | <!-- 1st Parameter: English/Default -->
   | <!-- 1st Parameter: English/Default -->
     <div>{{#ifeq: {{{no_name|}}}|true|'''[[{{{hero_link|{{{hero|Abrams}}}}}}|<span style=color:#000000>{{{hero_loc|{{{hero|Abrams}}}}}}</span>]]'''|{{Template:Icon/Black|[[File:{{{hero|Abrams}}}_name.png|x40px|link={{{hero|Abrams}}}]]}}}}</div>
     <div>{{#ifexist:File:{{#var:hero}}_name.svg|[[File:{{#var:hero}}_name.svg|x35px|link={{{name|{{#var:hero}}}}}]]|[[{{{hero_link|{{#var:hero}}}}}|<span style=font-size:40px>{{{hero_loc|{{#var:hero}}}}}</span>]]}}</div>
   | <!-- 2nd Parameter: Other Languages -->
   | <!-- 2nd Parameter: Other Languages -->
     '''[[{{{hero_link|{{{hero|Abrams}}}}}}{{If_lang}}|<span style=color:#000000>{{{hero_loc|{{{hero|Abrams}}}}}}</span>]]'''
     <div>{{#ifexist:File:{{#var:hero}}_name_{{#invoke:Lang|get_lang_code}}.svg|[[File:{{#var:hero}}_name_{{#invoke:Lang|get_lang_code}}.svg|x35px|link={{#var:hero}}{{If lang}}]]|[[{{{hero_link|{{#var:hero}}{{If lang}}}}}|<span style=font-size:40px>{{{hero_loc|{{#invoke:Lang|get_string|{{{key}}}}}}}}</span>]]}}</div>
}}
}}}} <div class="HeroRosterCard" style="height:250px; display: flex; align-items: center; justify-content: center;">[[File:{{#var:hero}} Render.png|270x250px|link={{#var:hero}}{{If_lang}}]]</div>
|- style="background-color: #FCEED4; font-size:25px; color:#000000; height:5px; text-align:center; font-weight:bold; font-family: 'Forevs Demo';"
|-
| {{#ifeq: {{{no_tags|}}}|true||{{#invoke:HeroData|get_hero_tag|{{{hero|Abrams}}}|1}} - {{#invoke:HeroData|get_hero_tag|{{{hero|Abrams}}}|2}} - {{#invoke:HeroData|get_hero_tag|{{{hero|Abrams}}}|3}}}}
|<span style="height:75px; display: flex; align-items: center; justify-content: center;">{{#ifeq: {{{no_tags|}}}|true
|- style="background-color:#FCEED4; font-size:14px; color:#000000; height:50px; text-align:center;"
||{{Infobox hero tags|key={{{key}}}|size=0.85|align=center}}|}}</span>
| {{AbilityCircle|name={{{Ability1|Siphon Life}}}|iconsize=48|bgsize=69}}   {{AbilityCircle|name={{{Ability2|Shoulder Charge}}}|iconsize=48|bgsize=69}}  {{AbilityCircle|name={{{Ability3|Infernal Resilience}}}|iconsize=48|bgsize=69}}   {{AbilityCircle|name={{{Ability4|Seismic Impact}}}|iconsize=48|bgsize=69}}
|-
|<span style="height:70px; display: flex; align-items: center; justify-content: center;"><!--
--><span style>{{AbilityCircle|name={{{Ability1|{{#invoke:Abilities|get_ability_name|{{{key|hero_atlas}}}|1|lang=en}}}}}|iconsize=40|bgsize=55|link={{If lang|{{{hero_link|{{#var:hero}}}}}#Abilities|{{{hero_link|{{#var:hero}}}}}{{If_lang}}}}}}</span><!--
-->{{AbilityCircle|name={{{Ability2|{{#invoke:Abilities|get_ability_name|{{{key|hero_atlas}}}|2|lang=en}}}}}|iconsize=40|bgsize=55|link={{If lang|{{{hero_link|{{#var:hero}}}}}#Abilities|{{{hero_link|{{#var:hero}}}}}{{If_lang}}}}}}<!--
-->{{AbilityCircle|name={{{Ability3|{{#invoke:Abilities|get_ability_name|{{{key|hero_atlas}}}|3|lang=en}}}}}|iconsize=40|bgsize=55|link={{If lang|{{{hero_link|{{#var:hero}}}}}#Abilities|{{{hero_link|{{#var:hero}}}}}{{If_lang}}}}}}<!--
-->{{AbilityCircle|name={{{Ability4|{{#invoke:Abilities|get_ability_name|{{{key|hero_atlas}}}|4|lang=en}}}}}|iconsize=40|bgsize=55|link={{If lang|{{{hero_link|{{#var:hero}}}}}#Abilities|{{{hero_link|{{#var:hero}}}}}{{If_lang}}}}}}</span>
|-
|<span style="color:#ffefd7; font-family:Retail Demo, Open Sans; font-weight:bold; font-size:1.1em"><span style="font-size:1.3em">{{#invoke:HeroData|get_hero_var|{{{key|hero_atlas}}}|DPS|2}}</span> {{#invoke:Lang|get_string|DPS_label}}</span>
|}
|}
</div></onlyinclude>
</div></onlyinclude>
 
<noinclude>
 
{{HeroRosterCard
{{HeroRosterCard
|key=hero_bebop
|key=hero_bebop
|hero=Bebop
}}{{HeroRosterCard
|Ability1=Exploding Uppercut
|Ability2=Sticky Bomb
|Ability3=Hook
|Ability4=Hyper Beam
}}
{{HeroRosterCard
|key=hero_dynamo
|key=hero_dynamo
|hero=Dynamo
}}{{HeroRosterCard
|Ability1=Kinetic Pulse
|Ability2=Quantum Entanglement
|Ability3=Rejuvenating Aurora
|Ability4=Singularity
}}
{{HeroRosterCard
|key=hero_orion
|key=hero_orion
|hero=Grey Talon
}}{{HeroRosterCard
|Ability1=Charged Shot
|Ability2=Rain of Arrows
|Ability3=Immobilizing Trap
|Ability4=Guided Owl
}}
{{HeroRosterCard
|key=hero_haze
|key=hero_haze
|hero=Haze
|Ability1=Sleep Dagger
|Ability2=Smoke Bomb
|Ability3=Fixation
|Ability4=Bullet Dance
}}
}}
<noinclude>
{{Documentation}}</noinclude>
<templatedata>
{
"params": {
"hero": {
"description": "The name of the Hero. Used to write the title, summary and get the render image.",
"example": "Abrams",
"default": "Abrams",
"required": true
},
"lang": {
"description": "Language of descriptions. Optional.",
"example": "English",
"default": "English"
},
"hero_link": {
"description": "Link for hero page. Optional",
"example": "Abrams"
},
"hero_loc": {
"description": "Override hero name. Optional.",
"example": "Abrams"
},
"Ability1": {
"description": "The name of the character's first ability.",
"example": "Siphon Life",
"required": true
},
"Ability2": {
"description": "The name of the character's second ability.",
"example": "Shoulder Charge",
"default": "Shoulder Charge",
"required": true
},
"Ability3": {
"description": "The name of the character's third ability.",
"example": "Infernal Resilience",
"default": "Infernal Resilience",
"required": true
},
"Ability4": {
"description": "The name of the character's ultimate.",
"example": "Seismic Impact",
"default": "Seismic Impact",
"required": true
},
"key": {
"description": "Internal name of the Hero, used to grab summary and role.",
"example": "hero_atlas, hero_bebop"
},
"no_name": {
"description": "Use plain text for hero name instead of image (localized names don't use image by default)",
"type": "boolean",
"default": "true"
},
"no_tags": {
"description": "Don't use hero tags",
"type": "boolean",
"default": "true"
}
},
"paramOrder": [
"key",
"hero",
"lang",
"hero_link",
"hero_loc",
"Ability1",
"Ability2",
"Ability3",
"Ability4",
"no_name",
"no_tags"
]
}
</templatedata>
</noinclude>

Latest revision as of 04:17, 23 June 2026



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

Template for roster cards in the Hero page. This template should be used with Template:Roster.

No description.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
keykey

Internal name of the Hero, used to fill all parameters.

Example
hero_atlas, hero_bebop
Unknownrequired
no_nameno_name

Use plain text for hero name instead of image (localized names don't use image by default)

Default
true
Booleanoptional
no_tagsno_tags

Don't use hero tags

Default
true
Booleanoptional
langlang

Language of descriptions. Optional.

Default
English
Example
English
Unknownoptional
hero_linkhero_link

Link for hero page. Optional

Example
Abrams
Unknownoptional
hero_lochero_loc

Override hero name. Optional.

Example
Abrams
Unknownoptional
Ability1Ability1

The name of the character's first ability.

Example
Siphon Life
Unknownoptional
Ability2Ability2

The name of the character's second ability.

Default
Shoulder Charge
Example
Shoulder Charge
Unknownoptional
Ability3Ability3

The name of the character's third ability.

Default
Infernal Resilience
Example
Infernal Resilience
Unknownoptional
Ability4Ability4

The name of the character's ultimate.

Default
Seismic Impact
Example
Seismic Impact
Unknownoptional