Template:Infobox item: Difference between revisions

dammit
Wow, this template has been neglected.
Line 1: Line 1:
{| class="infobox" cellpadding="4" style="width: 22em; font-size: 90%; float:right;"
<table class="infobox" cellpadding="4" style="width: 22em; font-size: 90%; float:right; border: 1px solid #AAAAAA; margin-left:0.5em">
| align="center" colspan=2 bgcolor="#CCCCCC" style="font-size:120%; " | '''{{{name|{{BASEPAGENAME}}}}}'''
<tr>
|-
  <td align="center" colspan=2 bgcolor="#CCCCCC" style="font-size:120%; font-weight: bold;">{{{name|{{BASEPAGENAME}}}}}</td>
| align="center" colspan="2" |[[file:{{{image|No image.png}}}|center]]
</tr>
|- valign="top"
<tr valign="top">
| style="white-space: nowrap;" | '''Type'''
  <td align="center" colspan="2">[[File:{{{image|No image.png}}}|150px|center]]</td>
| {{{type|?}}}
</tr>
|- valign="top"
{{#if:{{{invimage|}}}|<tr  valign="top"><td align="center" colspan="2">[[File:{{{invimage}}}|36px|center]]</td></tr>}}
| style="white-space: nowrap;" | '''Restores'''
{{Block/row2|label=Type|field={{{type|?}}}}}
| {{{hearts|None}}}
{{Block/row|label=Restores|field={{{hearts|None}}}}}
|- valign="top"
{{Block/row2|label=Durability|field={{{durability|None}}}}}
| style="white-space: nowrap;" | '''Durability'''
 
| {{{durability|None}}}
{{Block/row|label=[[Data_Values|Data value]]{{#if:{{{data2|}}}|s|}}|field={{{data|{{#if:{{{datadec|}}}|<!--
|- valign="top"
 
| style="white-space: nowrap;" | '''Data Values'''
---->|{{#if:{{{data1name|}}}|'''{{{data1name|}}}'''<br />| }}<!--
| {{{datadec|?}}}<sub>10</sub> ({{{datahex|?}}}<sub>16</sub>)
----><sub>dec:</sub> {{{data1|00}}} <sub>hex:</sub> {{dec-hex|{{{data1|00}}} }}<br /><!--
|-
 
|colspan="2+ |
The optional second data value.
|}


<noinclude><font color="#997070">
---->{{#if:{{{data2|}}}|<!--
------>{{#if:{{{data2name|}}}|'''{{{data2name|}}}'''<br />| }}<!--
------><sub>dec:</sub> {{{data2}}} <sub>hex:</sub> {{dec-hex|{{{data2}}} }}<!--
---->|}}<!--
-->}} }}} }}
</table><noinclude>
==Usage==
==Usage==
'''These usage notes will not be included in articles bearing this template.'''<p></p>
'''These usage notes will not be included in articles bearing this template.'''<p></p>
This template provides a uniform design for useable item pages.<pre>
This template provides a uniform design for useable item pages.<pre>
{{Useable Items
{{Useable Items
|name={{{name}}}
|image=
|image={{{image}}}
|invimage=
|type={{{type}}}
|hearts=
|durability={{{durability}}}
|type=
|datadec={{{datadec}}}
|durability=
|datahex={{{datahex}}}
|data1name=
}}</pre></font><br/><br/>[[Category:Templates]]</noinclude>
|data1=
|data2name=
|data2=
}}</pre>
 
{| class=grid
! Parameter
! Function
! Default value
|-
| <code>name</code> || Only needed to change the name from the page name || <code><nowiki>{{BASEPAGENAME}}</nowiki></code>
|-
| <code>image</code> || Image of the item (Should be 150x150px) || [[:File:No image.png|No image.png]]
|-
| <code>invimage</code> || Image for object in inventory (Should be 36x36px) || ''None''
|-
| <code>hearts</code> || How many hearts it restores || None
|-
| <code>type</code> || Type (Weapon, Ranged Weapon, Craftable Item, Tool, etc. ) || ?
|-
| <code>durability</code> || How durable the item is || None
|-
| <code>data1name</code> || If using multiple data values, specify a name || ''None''
|-
| <code>data1</code> || Decimal Data Value 1 || 00
|-
| <code>data2name</code> || Data 2's name || ''None''
|-
| <code>data2</code> || Decimal Data Value 2 || ''None''
|}
 
[[Category:Templates]]</noinclude>