Template:Hero card2: Difference between revisionsGive feedback
m The contrast between some of the hero portraits and the hero name was poor and made it straining on the eyes to read. Added a stronger text-shadow to the hero name and moved it up slightly to fix the issue. |
Moved css to styles.css |
||
| Line 1: | Line 1: | ||
<includeonly><div class="HeroCard2 | <templatestyles src="Hero card2/styles.css" /> | ||
<includeonly><div class="HeroCard2 {{#ifeq: {{{herolabs|false}}} | true | herolabs | }}" style="--card-size: {{{card_size|132}}}px; --herolabs-text-size: {{{herolabs_text_size|6}}}px; --text-size: {{{text_size|{{{text-size|24}}}}}}px;"><span class="HeroCard2-image">[[File:{{{Image|{{{link|{{{name|Abrams}}}}}}}}} card.png|{{{card_size|132}}}px|link={{{link|{{{name|Abrams}}}}}}{{{subpage|}}}|alt={{{name|Abrams}}}]]</span><p class="HeroCard2-herolabs-text">{{#invoke:Lang|get_string|MyRosterHeroLabsHero|fallback_str=en}}</p><p class="HeroCard2-name">{{{name|Abrams}}}</p><div class="HeroCard2-sticker"><div class="HeroCard2-sticker-inner">[[File:Herolabs_icon_backer.png|{{{sticker_size|56}}}px|link={{{link|{{{name|Abrams}}}}}}{{{subpage|}}}]]</div></div></div></includeonly><noinclude>{{Documentation}}</noinclude> | |||
Revision as of 16:44, 12 May 2026
Usage
This template is used in Template:Hero Navbox. It is called by Module:HeroData/nav.
Examples
{{Hero card2|Lash}}
{{Hero card2|Lash|overrideDisplayName=Jacob}}
{{Hero card2|Lash|overrideLinkTooltip=Abrams}}
{{Hero card2|Lash|overrideLinkImage=Abrams}}
{{Hero card2|Lash|overrideLinkClick=Abrams}}
{{Hero card2|Lash|cardSize=88}}
{{Hero card2|Lash|textSize=13}}
{{Hero card2|Lash|isHeroLabs=true}}
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Hero Name | heroName 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)
| String | required |
| Card Size | cardSize | Size of the hero card. Dont put 'px' at the end
| Number | optional |
| Text Size | textSize | Size of the text on the card. Dont put 'px' at the end.
| Number | optional |
| Is Hero Labs | isHeroLabs | Shows a hero labs sticker on the card and hero labs text, if enabled.
| Boolean | optional |
| Override Display Name | overrideDisplayName | Overrides the name that is displayed on the card.
| String | optional |
| Override Link Tooltip | overrideLinkTooltip | Overrides the link from where the tooltip gets its info. Don't include localization subpage, the tooltip adds it automatically when appropriate.
| String | optional |
| Override Link Image | overrideLinkImage | Overrides the link from where the hero card gets the image. '_vertical.png' is suffixed to the override string.
| String | optional |
| Override Link Click | overrideLinkClick | Overrides where the hero card links to when clicked on. Localization subpage is NOT added automatically to the override string.
| String | optional |