Difference between revisions of "Template:Block"

From ComputerCraft Wiki
Jump to: navigation, search
(Created template prototype.)
 
m (Added automatic categorization to Category:Peripheral if {{is-peripheral}} is set in template-data.)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<div class="floaties" style="float:right; width:320px;">
 
<div class="floaties" style="float:right; width:320px;">
 
<table style="width: 100%; border: solid 1px black; margin: 2px; border-spacing: 0px;">
 
<table style="width: 100%; border: solid 1px black; margin: 2px; border-spacing: 0px;">
<tr><td colspan="2" style="font-weight: bold; font-size: large; padding-bottom: .3em; border-bottom: solid #C9C9C9 1px; background: #DBE5FF; line-height:28px;">[[File:Grid_workbench.png|24px]]&nbsp;&nbsp;{{{name}}}</td></tr>
+
<tr><td colspan="2" style="font-weight: bold; font-size: large; padding-bottom: .3em; border-bottom: solid #C9C9C9 1px; background: #DBE5FF; line-height:28px;">[[File:Grid_workbench.png|24px]]&nbsp;&nbsp;
 +
{{#if:{{{name|}}}|{{{name}}}|{{FULLPAGENAME}}}}</td></tr>
  
{{#if:{{{image|}}}
+
{{#if:{{{image|}}}|<td colspan="2" style="padding: .4em; padding-bottom: .8em;"><center>[[File:{{{image|}}}|128x128px]]</center></td>|<td colspan="2" style="padding: .4em; padding-bottom: .8em;"><center>[[File:Iso_Unknown.png|128x128px]]</center></td>}}
|<td colspan="2" style="padding: .4em; padding-bottom: .8em;"><center>[[File:{{{image|}}}|128x128px]]</center></td>
+
|<td colspan="2" style="padding: .4em; padding-bottom: .8em;"><center>[[File:Iso_Unknown.png|128x128px]]</center></td>}}
+
  
 
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; border-right: solid #C9C9C9 1px; padding: .4em; width: 110px; font-weight: bold;">Item ID</td>
 
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; border-right: solid #C9C9C9 1px; padding: .4em; width: 110px; font-weight: bold;">Item ID</td>
Line 11: Line 10:
 
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; border-right: solid #C9C9C9 1px; padding: .4em; font-weight: bold;">Damage Value</td>
 
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; border-right: solid #C9C9C9 1px; padding: .4em; font-weight: bold;">Damage Value</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em; padding-left: .4em;">{{{damage-value}}}</td></tr>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em; padding-left: .4em;">{{{damage-value}}}</td></tr>
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; border-right: solid #C9C9C9 1px; padding: .4em; font-weight: bold;">Peripheral?</td>
+
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; border-right: solid #C9C9C9 1px; padding: .4em; font-weight: bold;">Peripheral?</td>
<td style="border-top: solid #C9C9C9 1px; padding: .4em; padding-left: .4em;">{{{is-peripheral}}}</td></tr>
+
<td style="border-top: solid #C9C9C9 1px; padding: .4em; padding-left: .4em;">{{#if:{{{is-peripheral|}}}|{{{is-peripheral}}}<includeonly>[[Category:Peripherals]]</includeonly>{{#if:{{{peripheral-api|}}}| - [[{{{peripheral-api}}}]]}}|No}}</td></tr>
 
</table>
 
</table>
 
</div>
 
</div>

Latest revision as of 11:47, 11 April 2013

Grid workbench.png   Template:Block
Iso Unknown.png
Item ID {{{id}}}
Damage Value {{{damage-value}}}
Peripheral? No