Template:AbilityIcon: Difference between revisions

From The Deadlock Wiki
Jump to navigation Jump to search
QuinnBinn (talk | contribs)
Created for display on Hero pages plus potentially any more specific cases. Hopefully it works!
 
mNo edit summary
 
(13 intermediate revisions by 5 users not shown)
Line 1: Line 1:
A little template for creating Ability Icons with links.
<includeonly><span class="ability-link-wrapper" data-ability-name="{{#invoke:Icon|getCanonicalName|{{{1}}}}}">{{#invoke:Icon|render|{{{1}}}|l1={{{l1|}}}|link={{{link|}}}|size={{{size|}}}|no-link={{{no-link|}}}|no-file={{{no-file|}}}|icon-only={{{icon-only|}}}|image={{{image|}}}}}</span></includeonly><noinclude>{{Documentation}}</noinclude>
 
{| class="wikitable"
|+ Variables
|-
! Variable !! Description
|-
| {{{Ability}}} || The exact name of the Ability. (Smoke Bomb)
|-
| {{{Hero}}} || Adds a link to the ability's owner if not null. (Haze)
|-
| {{{Size}}} || Size in pixels for the icon.
|}
 
 
<onlyinclude><span style="position: relative; bottom: 2px; filter: brightness(0);">[[File:{{{Ability}}}.png|link=|{{#if:{{{Hero}}}|link={{{Hero}}}}}|{{{Size}}}px|]]</span></onlyinclude>
 
{{AbilityIcon|Ability=Smoke Bomb|Hero = Haze|Size=40}}

Latest revision as of 21:04, 18 May 2026

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

This template creates a small ability icon. The label and link will be automatically translated on a language subpage.

For more details, see Module:Icon.

Examples

[edit source]
{{AbilityIcon|Time Wall}}
{{AbilityIcon|Death Slam|l1=Slam}}
{{AbilityIcon|Willpower|size=40px}}

Time Wall Slam Willpower

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
11

Ability name.

Stringrequired
l1l1

Custom text.

Stringoptional
linklink

Custom link.

Stringoptional
imageimage

Custom image.

Example
Image.png, Image.svg
Stringoptional
sizesize

Icon size.

Default
20px
Example
30px, 40px, 50px
Stringoptional
no-linkno-link

Removes the target link.

Suggested values
true
Booleanoptional
no-fileno-file

Removes the file image.

Suggested values
true
Booleanoptional
icon-onlyicon-only

Removes any text.

Suggested values
true
Booleanoptional