Template:Hero card2: Difference between revisionsGive feedback
m parameterize card size |
m text-size nicknamed to text_size for now |
||
| Line 1: | Line 1: | ||
<div class="HeroCard2" style="display:inline-block; border-radius: 8px; overflow:hidden; position: relative; background-image: {{#ifeq: {{{herolabs|false}}} | true | linear-gradient(#ce9b54, #674915)| linear-gradient(#A69885, #72695A) }}; max-width: {{{card_size|132}}}px; width: 30%; height: auto; box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5); transition: 0.1s transform ease-in-out;"><span>[[File:{{{Image|{{{name|Abrams}}}}}} card.png|{{{card_size|132}}}px|link={{{link|{{{name|Abrams}}}}}}]]</span><p style="display: {{#ifeq: {{{herolabs|false}}} | true | block| none }}; position: absolute; bottom: 35px; left: 50%; transform: translateX(-50%); text-align: center; width: fit-content; font-size: 8px; margin: 0; pointer-events: none; border-radius: 2px; background-color: #d36c16ee; padding: 1px 4px 0px 4px; font-family: Tahoma, sans-serif; color: white; font-weight: bold; max-height: 15px;">HERO LABS</p><p style="position: absolute; bottom: 0px; text-align: center; width: 100%; font-weight: bold; font-family: 'Forevs Demo', 'PT Serif','Palatino','Georgia',serif; color: #FFEFD7; text-shadow: 0px 0px 8px rgba(0, 0, 0, 0.5), 0px 0px 8px rgba(0, 0, 0, 0.5), 0px 0px 8px rgba(0, 0, 0, 0.5); font-size: min(5vw, {{{text-size|24}}}px); letter-spacing: 0.5px; margin: 0; text-transform: uppercase; text-overflow: ellipsis; pointer-events: none;">{{{name|Abrams}}}</p><div style="display: {{#ifeq: {{{recommended|false}}} | true | inline| none }}; top:0; right:0; position: absolute;"><div position: relative;>[[File:Recommended icon backer.png| 56px |link={{{name|Abrams}}}]]</div></div><div style="display: {{#ifeq: {{{herolabs|false}}} | true | inline| none }}; top:0; right:0; position: absolute;"><div position: relative;>[[File:Herolabs_icon_backer.png | 56px |link={{{name|Abrams}}}]]</div></div></div><noinclude>{{Documentation}}</noinclude> | <div class="HeroCard2" style="display:inline-block; border-radius: 8px; overflow:hidden; position: relative; background-image: {{#ifeq: {{{herolabs|false}}} | true | linear-gradient(#ce9b54, #674915)| linear-gradient(#A69885, #72695A) }}; max-width: {{{card_size|132}}}px; width: 30%; height: auto; box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5); transition: 0.1s transform ease-in-out;"><span>[[File:{{{Image|{{{name|Abrams}}}}}} card.png|{{{card_size|132}}}px|link={{{link|{{{name|Abrams}}}}}}]]</span><p style="display: {{#ifeq: {{{herolabs|false}}} | true | block| none }}; position: absolute; bottom: 35px; left: 50%; transform: translateX(-50%); text-align: center; width: fit-content; font-size: 8px; margin: 0; pointer-events: none; border-radius: 2px; background-color: #d36c16ee; padding: 1px 4px 0px 4px; font-family: Tahoma, sans-serif; color: white; font-weight: bold; max-height: 15px;">HERO LABS</p><p style="position: absolute; bottom: 0px; text-align: center; width: 100%; font-weight: bold; font-family: 'Forevs Demo', 'PT Serif','Palatino','Georgia',serif; color: #FFEFD7; text-shadow: 0px 0px 8px rgba(0, 0, 0, 0.5), 0px 0px 8px rgba(0, 0, 0, 0.5), 0px 0px 8px rgba(0, 0, 0, 0.5); font-size: min(5vw, {{{text_size|{{{text-size|24}}}}}}px); letter-spacing: 0.5px; margin: 0; text-transform: uppercase; text-overflow: ellipsis; pointer-events: none;">{{{name|Abrams}}}</p><div style="display: {{#ifeq: {{{recommended|false}}} | true | inline| none }}; top:0; right:0; position: absolute;"><div position: relative;>[[File:Recommended icon backer.png| 56px |link={{{name|Abrams}}}]]</div></div><div style="display: {{#ifeq: {{{herolabs|false}}} | true | inline| none }}; top:0; right:0; position: absolute;"><div position: relative;>[[File:Herolabs_icon_backer.png | 56px |link={{{name|Abrams}}}]]</div></div></div><noinclude>{{Documentation}}</noinclude> | ||
Revision as of 15:23, 28 October 2024
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 |