Jump to content

Template:Infobox item: Difference between revisions

From Megabonk Wiki
No edit summary
No edit summary
Line 2: Line 2:
{| class="infobox" style="width:240px; float:right; margin:0 0 12px 12px; background:rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.08); border-radius:12px; overflow:hidden; box-shadow:0 4px 14px rgba(0,0,0,.14); font-size:90%; text-align:left; line-height:1.45;"
{| class="infobox" style="width:240px; float:right; margin:0 0 12px 12px; background:rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.08); border-radius:12px; overflow:hidden; box-shadow:0 4px 14px rgba(0,0,0,.14); font-size:90%; text-align:left; line-height:1.45;"
|-
|-
! colspan="2" style="text-align:center; font-size:1.15em; padding:.45em; color:#FFD47F; background:rgba(255,255,255,.03);" | {{{name|{{PAGENAME}}}}}
! colspan="2" style="text-align:center; font-size:1.15em; padding:.45em; color:{{#switch: {{{rarity|}}} | Default = white | Common = green | Uncommon = blue | Rare = magenta | Epic = purple | Legendary = #FFD700 | #default = #FFD47F }}; background:rgba(255,255,255,.03);" | {{{name|{{PAGENAME}}}}}
|-
|-
| colspan="2" style="text-align:center; padding:.3em;" | [[File:{{{image|{{PAGENAME}}.png}}}|96px|center|{{{name|}}}]]
| colspan="2" style="text-align:center; padding:.3em;" | [[File:{{{image|{{PAGENAME}}.png}}}|96px|center|{{{name|}}}]]
Line 25: Line 25:
</includeonly><noinclude>
</includeonly><noinclude>
== Usage ==
== Usage ==
This template creates a lean infobox for items in Megabonk. It automatically colors the rarity text based on its value.
This template creates a lean infobox for items in Megabonk. It automatically colors both the item's name and its rarity text based on the rarity value.


=== Parameters ===
=== Parameters ===

Revision as of 13:47, 4 October 2025

Usage

This template creates a lean infobox for items in Megabonk. It automatically colors both the item's name and its rarity text based on the rarity value.

Parameters

  • name: The name of the item.
  • rarity: The item's rarity (Default, Common, Uncommon, Rare, Epic, Legendary).
  • effect: The in-game description of the item's effect.
  • image: (Optional) The file name for the item's image.
  • type: (Optional) The type of item. Defaults to "Item".

Example Usage

{{Infobox item
| name     = Boss Buster
| image    = Boss Buster.png
| rarity   = Common
| type     = Item
| effect   = +15% more damage to Elites and Bosses.
}}