Template:Infobox: Difference between revisions

m
no edit summary
mNo edit summary
mNo edit summary
 
(6 intermediate revisions by 2 users not shown)
Line 2: Line 2:
| {{#vardefine:colset|{{{colset|}}}}}
| {{#vardefine:colset|{{{colset|}}}}}
| {{#vardefine:colset|1}}
| {{#vardefine:colset|1}}
}}{{#if:{{{color|}}}
}}{{#switch:{{{color|}}}
| {{#vardefine:color| background-color: {{{color}}};}}
| ={{#vardefine:color| background-color: lightblue;}}
| {{#vardefine:color| background-color: lightblue;}}
| Rainbow={{#vardefine:rainbow|rainbow}}
}}<table class="infobox {{{class|}}}" style="{{{style|}}}">
| #default ={{#vardefine:color| background-color: {{{color}}};}}  
<tr style="{{#var:color|}}" class="textfloat">
}}<table style="{{{style|}}}" class="infobox {{{class|}}}">
<tr style="{{#var:color|}}" class="textfloat {{#var:rainbow|}}">
<th class="title" colspan="{{#expr:{{#var:colset|1}}+1}}">{{{title|}}}</th>
<th class="title" colspan="{{#expr:{{#var:colset|1}}+1}}">{{{title|}}}</th>
   </tr>
   </tr>
   {{#if:{{{image|}}}
   {{#if:{{{image|}}}
   |<tr>
   |<tr>
     <td class="image" colspan="{{#expr:{{#var:colset|1}}+1}}"><center>{{{image}}}</center></td>
     <td class="image" colspan="{{#expr:{{#var:colset|1}}+1}}">{{{image}}}</td>
   </tr>
   </tr>
   }}
   }}
Line 51: Line 52:
:* <code>data???</code>: Data of entry. '''Required''' for entry.
:* <code>data???</code>: Data of entry. '''Required''' for entry.
:* <code>set???</code>: (Optional) Number of entry columns (label does not count).
:* <code>set???</code>: (Optional) Number of entry columns (label does not count).
:* <code>colset</code>: (Optional) '''Requierd''' only if having <code>set???</code>, the [[Template:PRODUCT|product]] of <code>set</code> numbers in the whole infobox.
:* <code>colset</code>: (Optional) '''Required''' only if having <code>set???</code>, the [[Template:PRODUCT|product]] of <code>set</code> numbers in the whole infobox.
:* <code>style</code>: (Optional) Style of in infobox, following CSS syntax.
:* <code>style</code>: (Optional) Style of in infobox, following CSS syntax.
:* <code>class</code>: (Optional) Class of infobox, following HTML <code>class</code> attribute syntax.
:* <code>class</code>: (Optional) Class of infobox, following HTML <code>class</code> attribute syntax.