Template:BG Tool: Difference between revisions

From Blockgame Wiki
m (weird behaviour with image size - removed till fix)
(Updated template to be more readable. Headings are now lighter and attributes have better spacing)
Line 1: Line 1:
{| class="infobox" style="float: right; background-color: #f3f3f3; margin-left: 10px; border: 2px solid #ccc; padding: 10px; width: 18em;"
<includeonly>{| class="infobox" style="float: right; background-color: #f3f3f3; margin-left: 10px; border: 1px solid #ccc; padding: 4px; width: 18rem;" cellpadding="2" cellspacing="1"
|-
|-
! colspan="2" style="background: linear-gradient(#857050, #cdbe98); text-align: center; font-size: 125%; padding: 5px" | {{#if: {{{title}}} | {{{title}}} | {{PAGENAME}}}}
! colspan="2" style="background: linear-gradient(#857050, #cdbe98); text-align: center; font-size: 120%; padding: 5px; color: white; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);" | {{#if: {{{title}}} | {{{title}}} | {{PAGENAME}}}}
|-
|-
| colspan="2" style="text-align: center;" | {{#if: {{{image|}}} | [[File:{{{image}}}]] | [[File:Site-community-image.png|150px]]}}
| colspan="2" style="text-align: center;" | {{#if: {{{image|}}} | [[File:{{{image}}}]] | [[File:Site-community-image.png|150px]]}}
|-
|-
| colspan="2" style="background: linear-gradient(#857050, #cdbe98); text-align: center;" | '''Tool Details'''
| colspan="2" style="height: 0.5rem" |
|-
|-
|{{#if: {{{type|}}}| Type: [[:Category:{{{type}}}|{{{type}}}]]|}}
| colspan="2" style="background: linear-gradient(#857050, #cdbe98); text-align: center; color: white; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);" | '''Tool Details'''
|-
{{#if:
|{{#if: {{{rarity|}}}| Rarity: {{Rarity|rarity={{{rarity}}}}}|}}
  {{{type|}}}
|-
  |<tr><td><b>Type</b></td><td>[[:Category:{{{type}}}|{{{type}}}]]</td></tr>|
|{{#if: {{{slot_item|}}}| Slot: {{{slot_item}}}|}}
}}{{#if:
|-
  {{{rarity|}}}
|{{#if: {{{uses|}}}| Uses: {{{uses}}}|}}
  |<tr><td><b>Rarity</b></td><td>{{Rarity|rarity={{{rarity}}}}}</td></tr>|
|-
}}{{#if:
|{{#if: {{{tradable|}}}| {{BG_Item/Div|bgcolor1=#857050|bgcolor2=#cdbe98|align=center|text=Trade Attributes}} | }}
  {{{slot_item|}}}
|-
  |<tr><td><b>Slot</b></td><td>{{{slot_item}}}</td></tr>|
|{{#if: {{{tradable|}}}| Tradable: {{{tradable}}}|}}
}}{{#if:
|-
  {{{uses|}}}
|{{#if: {{{obtain|}}}| Obtainable: {{{obtain}}}|}}
  |<tr><td><b>Uses</b></td><td>{{{uses}}}</td></tr>|
|-
}}{{#if:
|{{#if: {{{source|}}}| Source: {{{source}}}|}}
  {{{merchant|}}}
|-
  |<tr style="background: linear-gradient(#857050, #cdbe98); text-align: center; color: white; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);"><td colspan="2"><b>Shop</b></td></tr>|
|{{#if: {{{drop_chance|}}}| Drop Chance: {{{drop_chance}}}|}}
}}{{#if:
|-
  {{{merchant|}}}
|{{#if: {{{merchant|}}}| {{BG_Item/Div|bgcolor1=#857050|bgcolor2=#cdbe98|align=center|text=Shop}} | }}
  |<tr><td><b>Merchant</b></td><td>[[{{{merchant}}}]]</td></tr>|
|-
}}{{#if:
|{{#if: {{{merchant|}}}| Merchant: [[{{{merchant}}}]]|}}
  {{{upgrades_from_list|}}}
|-
  |<tr><td><b>Upgrades from</b></td><td>{{{upgrades_from_list}}}</td></tr>|
|{{#if: {{{upgrades_from_list|}}}| Upgrades from: {{{upgrades_from_list}}}|}}
}}{{#if:
|-
  {{{upgrades_from|}}}
|{{#if: {{{upgrades_from|}}}| Upgrades from: [[{{{upgrades_from}}}]]|}}
  |<tr><td><b>Upgrades from</b></td><td>[[{{{upgrades_from}}}]]</td></tr>|
|-
}}{{#if:
|{{#if: {{{upgrades_to|}}}| Upgrade to: [[{{{upgrades_to}}}]]|}}
  {{{upgrades_to|}}}
|-
  |<tr><td><b>Upgrade to</b></td><td>[[{{{upgrades_to}}}]]</td></tr>|
|{{#if: {{{material_cost|}}}| {{BG_Item/Div|bgcolor1=#857050|bgcolor2=#cdbe98|align=center|text=Materials}} | }}
}}{{#if:
|-
  {{{tradable|}}}
{{#if: {{{recipe_req|}}}|{{!}} Recipe required: [[{{{recipe_req}}} - Recipe]]|}}
  |<tr style="background: linear-gradient(#857050, #cdbe98); text-align: center; color: white; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);"><td colspan="2"><b>Trade Attributes</b></td></tr>|
{{#if: {{{recipe_req|}}}| {{!-}} | }}
}}{{#if:
|{{#if: {{{material_cost|}}}| Material cost: {{{material_cost}}}|}}
  {{{tradable|}}}
|-
  |<tr><td><b>Tradable</b></td><td>{{{tradable}}}</td></tr>|
|{{#if: {{{lore|}}}| {{BG_Item/Div|bgcolor1=#857050|bgcolor2=#cdbe98|align=center|text=Lore}} | }}
}}{{#if:
|-
  {{{obtain|}}}
|{{#if: {{{lore|}}}|<code>'''{{{lore}}}'''</code> |}}
  |<tr><td><b>Obtainable</b></td><td>{{{obtain}}}</td></tr>|
|-
}}{{#if:
|{{#if: {{{tooltip|}}}| {{BG_Item/Div|bgcolor1=#857050|bgcolor2=#cdbe98|align=center|text=Tooltip}} | }}
  {{{source|}}}
|-
  |<tr><td><b>Source</b></td><td>{{{source}}}</td></tr>|
|{{#if: {{{tooltip|}}}| Tooltip: </br><code>'''{{ItemColor|type=Tooltip|text={{{tooltip}}}}}'''</code> |}}
}}{{#if:
|-
  {{{drop_chance|}}}
|}<includeonly>{{#if: {{{type|}}}|[[Category:{{{type}}}]]|}}[[Category:Tools]]</includeonly><noinclude>[[Category:Template]]</noinclude>
  |<tr><td>Drop Chance</td><td>{{{drop_chance}}}</td></tr>|
}}{{#if:
  {{{material_cost|}}}
  |<tr style="background: linear-gradient(#857050, #cdbe98); text-align: center; color: white; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);"><td colspan="2"><b>Materials</b></td></tr>|
}}{{#if:
  {{{recipe_req|}}}
  |<tr><td><b>Recipe required</b></td><td>[[{{{recipe_req}}} - Recipe]]</td></tr>|
}}{{#if:
  {{{material_cost|}}}
  |<tr><td><b>Material cost</b></td><td style="white-space: nowrap">{{{material_cost}}}</td></tr>|
}}{{#if:
  {{{lore|}}}
  |<tr style="background: linear-gradient(#857050, #cdbe98); text-align: center; color: white; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);"><td colspan="2"><b>Lore</b></td></tr>|
}}{{#if:
  {{{lore|}}}
  |<tr><td colspan="2"><code>'''{{{lore}}}'''</code></td></tr>|
}}{{#if:
  {{{tooltip|}}}
  |<tr style="background: linear-gradient(#857050, #cdbe98); text-align: center; color: white; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);"><td colspan="2"><b>Tooltip</b></td></tr>|
}}{{#if:
  {{{tooltip|}}}
  |<tr><td colspan="2"><code>'''{{ItemColor|type=Tooltip|text={{{tooltip}}}}}'''</code></td></tr>|
}}
|}{{#if: {{{type|}}}|[[Category:{{{type}}}]]|}}[[Category:Tools]]</includeonly><noinclude>[[Category:Template]]{{doc}}</noinclude>

Revision as of 00:01, 9 March 2024