Template:Itembox

From Brawlhalla Wiki
Jump to navigation Jump to search
[[{{{name}}}]]
[[File:{{{image}}}|270x270px|link={{{name}}}]]


Usage

Small infobox that can be placed on page. Condensed so multiple can fit on the same page.

Format

{{itembox
|width = <width>
|height = <height>
|name = <item name>
|image = <item image>
|cost = <cost> (optional)
|desc = <text> (optional)
|costheight = <costheight> (optional)
|descheight = <descheight> (optional)
|titleheight = <titleheight> (optional)
|mainpercent = <percent (in decimal)> (optional)
|epic = true (optional)
|displayname = <link name> (optional)
|nolink = true (optional)
|noimglink = true (optional)
|compact = true (optional)
|anim = <link> (optional)
}}

Parameters

width
The width of the itembox.
height
The height of the itembox.
name
The name of the item. This is also what page the itembox links to.
image
An image of the item.
cost
The cost of the item.
desc
Additional informative text. If used alongside cost, it will be in a separate box - it may be more desirable to just break-line in cost.
costheight
Specify the height of the cost section. Can be useful to keep similar sizing with multiple itemboxes.
descheight
Specify the height of the desc section. Can be useful to keep similar sizing with multiple itemboxes.
titleheight
Specify the height of the title section. Can be useful to keep similar sizing with multiple itemboxes.
mainpercent
Determine the percentage (in decimals) of the height of the itembox that the image will take.
epic
If present the item will be given the Epic Skin background.
displayname
Displays as name of item, but will not change the link specified in "name".
nolink
If present the name will not be a link and the image will only direct to the image file.
noimglink
If present clicking the image will direct to the image file instead of the linked page.
compact
Changes format to alternative compact form.
anim
Use for APNG images instead of "image".

Examples

The following samples demonstrate the different possible icons from this template.

A basic itembox:

{{itembox|width=150|height=150|name=Cheddar|image=Bot Cheddar Still.png}} =


Itembox with a cost:

{{itembox|width=200|height=200|name=Atomic Orion|image=Atomic Orion.png|cost={{coin|mammoth|80}}}} =

Atomic Orion
Atomic Orion.png
Cost: Coin Mammoth.png 80


Itembox with cost, desc, costheight, descheight:

{{itembox|width=150|height=250|name=Warchief Bödvar|image=Warchief Bödvar.png|cost={{Coin|mammoth|100}}|desc=[[Odin's Chest]] Exclusive.|costheight=10px|descheight=60px}} =

Warchief Bödvar
Warchief Bödvar.png
Cost: Coin Mammoth.png 100
Odin's Chest Exclusive.


Multiple itemboxes side-by-side using flexbox:

<div style="max-width: 1300px;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;">
<div>{{itembox|width=220|height=290|name=Darkheart Artemis|image=Darkheart Artemis.png|link=Darkheart Artemis|cost={{Coin|mammoth|200}}|costheight=49px}}</div>
<div>{{itembox|width=220|height=290|name=Lovelaced Ada|image=Lovelaced Ada.png|cost={{Coin|mammoth|140}}|costheight=49px}}</div>
<div>{{itembox|width=220|height=290|name=Warchief Bödvar|image=Warchief Bödvar.png|cost={{Coin|mammoth|140}}<br>test|costheight=49px|epic=true}}</div>
</div>
Darkheart Artemis
Darkheart Artemis.png
Cost: Coin Mammoth.png 200
Lovelaced Ada
Lovelaced Ada.png
Cost: Coin Mammoth.png 140
Warchief Bödvar
Epic Skin
Warchief Bödvar.png
Cost: Coin Mammoth.png 140
test

Other variables:

  • displayname:

{{itembox|width=200|height=200|name=Atomic Orion|image=Atomic Orion.png|displayname=A different name}} =

A different name
Atomic Orion.png
Cost: Coin Mammoth.png 80


  • nolink:

{{itembox|width=200|height=200|name=Atomic Orion|image=Atomic Orion.png|nolink=true}} =

Atomic Orion
Atomic Orion.png
Cost: Coin Mammoth.png 80


  • noimglink:

{{itembox|width=200|height=200|name=Atomic Orion|image=Atomic Orion.png|noimglink=true}} =

Atomic Orion
Atomic Orion.png
Cost: Coin Mammoth.png 80


  • compact:

{{itembox|width=200|height=200|name=Atomic Orion|image=Atomic Orion.png|compact=true}} =

Atomic Orion.png
Atomic Orion
Cost: Coin Mammoth.png 80