Template:LeoSandbox: Difference between revisions
no edit summary
Shironsaki (talk | contribs) No edit summary |
Shironsaki (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
<includeonly>< | <includeonly>{{#if:{{{colset|}}} | ||
| {{#vardefine:colset|{{{colset|}}}}} | |||
| {{#vardefine:colset|1}} | |||
}}{{#switch:{{{color|}}} | |||
| ={{#vardefine:color| background-color: lightblue;}} | |||
| Rainbow={{#vardefine:rainbow|rainbow}} | |||
| #default ={{#vardefine:color| background-color: {{{color}}};}} | |||
}}<table style="{{{style|}}}" class="infobox {{{desc|}}}<br>{{{class|}}}"> | |||
<tr style="{{#var:color|}}" class="textfloat {{#var:rainbow|}}"> | |||
<th class="title" colspan="{{#expr:{{#var:colset|1}}+1}}">{{{title|}}}</th> | |||
</tr> | |||
{{#if:{{{image|}}} | |||
|<tr> | |||
<td class="image" colspan="{{#expr:{{#var:colset|1}}+1}}">{{{image}}}</td> | |||
</tr> | |||
}} | |||
{{#forargs:label | |||
| key | |||
| val | |||
| | |||
{{#if:{{{set{{#var:key|}}|}}} | |||
| {{#vardefine:div|{{#expr:{{#var:colset|1}}/{{{set{{#var:key|1}}|}}}}}}} | |||
<tr class="entry"> | |||
<th>{{#var:val|}}</th> | |||
{{#forargs:data{{#var:key|}}/ | |||
| subkey | |||
| subval | |||
| <td colspan="{{#var:div|}}">{{#var:subval|}}</td> | |||
}} | |||
</tr> | |||
| | |||
{{#if:{{{data{{#var:key|}}|}}} | |||
|<tr class="entry"> | |||
<th>{{#var:val|}}</th> | |||
<td colspan="{{#var:colset|1}}">{{{data{{#var:key|}}|}}}</td> | |||
</tr> | |||
}} | |||
}} | |||
}} | |||
</table></includeonly> |