Template:Infobox character/ru: Difference between revisions

From Elwiki
No edit summary
No edit summary
Line 1: Line 1:
<includeonly>{{#Widget:Infobox}}{{#if:{{{colset|}}}
<div style="padding: 0; float: right; clear: right; position: relative;">
| {{#vardefine:colset|{{{colset|}}}}}
{{Infobox
| {{#vardefine:colset|1}}
| colset={{{colset|}}}
}}{{#switch:{{{color|}}}
| color={{{color|}}}
| ={{#vardefine:color| background-color: lightblue;}}
| title={{{class|}}}
| Rainbow={{#vardefine:rainbow|rainbow}}
| image={{{image|}}}
| #default ={{#vardefine:color| background-color: {{{color}}};}}
| label1=Name
}}<table style="{{{style|}}}" class="infobox {{{class|}}}">
| data1={{{name|}}}
<tr style="{{#var:color|}}" class="textfloat {{#var:rainbow|}}">
| set1={{{nameset|}}}
<th class="title" colspan="{{#expr:{{#var:colset|1}}+1}}">{{{title|}}}</th>
| data1/1={{{name1|}}}
  </tr>
| data1/2={{{name2|}}}
  {{#if:{{{image|}}}
| label2=Class
  |<tr>
| data2={{{class|}}}
    <td class="image" colspan="{{#expr:{{#var:colset|1}}+1}}">{{{image}}}</td>
| label3=Weapon
  </tr>
| data3={{{weapon|}}}
  }}
| set3={{{weaponset|}}}
  {{#forargs:label
| data3/1={{{weapon1|}}}
| key
| data3/2={{{weapon2|}}}
| val
| label4=Age
|
| data4={{{age|}}}
{{#if:{{{set{{#var:key|}}|}}}
| set4={{{ageset|}}}
| {{#vardefine:div|{{#expr:{{#var:colset|1}}/{{{set{{#var:key|1}}|}}}}}}}
| data4/1={{{age1|}}}
<tr class="entry">
| data4/2={{{age2|}}}
<th>{{#var:val|}}</th>
| label5=Birthday
{{#forargs:data{{#var:key|}}/
| data5={{{Birth|}}}
| subkey
| set5={{{Birthset|}}}
| subval
| data5/1={{{Birth1|}}}
| <td colspan="{{#var:div|}}">{{#var:subval|}}</td>
| data5/2={{{Birth2|}}}
}}
| label6=Height
</tr>
| data6={{{Height|}}}
    |
| set6={{{Heightset|}}}
    {{#if:{{{data{{#var:key|}}|}}}
| data6/1={{{Height1|}}}
    |<tr class="entry">
| data6/2={{{Height2|}}}
    <th>{{#var:val|}}</th>
| label7=Weight
<td colspan="{{#var:colset|1}}">{{{data{{#var:key|}}|}}}</td>
| data7={{{Weight|}}}
</tr>
| set7={{{Weightset|}}}
}}
| data7/1={{{Weight1|}}}
}}
| data7/2={{{Weight2|}}}
}}
| label8=Blood Type
</table></includeonly><noinclude>{{DISPLAYTITLE:Infobox Prototype}}
| data8={{{Blood|}}}
== Description ==
| set8={{{Bloodset|}}}
This is infobox proto. All infoboxes should use this proto.
| data8/1={{{Blood1|}}}
== How to Use ==
| data8/2={{{Blood2|}}}
<u>'''Valid Parameters'''</u>:
| label9=Class Tree
:* '''Content Parameters''': <code>title</code>, <code>image</code>, <code>label???</code>, <code>data???</code>
| data9={{{tree|}}}
:* '''Layout Parameters''': <code>colset</code>, <code>set???</code>
| label10=Voice Actors
:* '''Styling Parameters''': <code>style</code>, <code>class</code>, <code>color</code>
| data10={{{VA|}}}
<u>'''Parameter Instructions'''</u>
| set10={{{VAset|}}}
:* <code>title</code>: (Optional) The heading. Omitting will result in a thin line.
| data10/1={{{VA1|}}}
:* <code>image</code>: (Optional) The image on the top.
| data10/2={{{VA2|}}}
:* <code>label???</code>: Heading of entry. '''Required''' for entry.
| label11=Artists
:* <code>data???</code>: Data of entry. '''Required''' for entry.
| data11={{{Art|}}}
:* <code>set???</code>: (Optional) Number of entry columns (label does not count).
| label12=Release Date
:* <code>colset</code>: (Optional) '''Required''' only if having <code>set???</code>, the [[Template:PRODUCT|product]] of <code>set</code> numbers in the whole infobox.
| data12={{{RD|}}}
:* <code>style</code>: (Optional) Style of in infobox, following CSS syntax.
}}{{#if:{{{stat|}}}|{{Infobox
:* <code>class</code>: (Optional) Class of infobox, following HTML <code>class</code> attribute syntax.
| color={{{color|}}}
:* <code>color</code>: (Optional) Color of the heading. Default uses wikiskin default.
| class=mw-collapsible mw-collapsed
<u>'''Other Notes'''</u>
| style=width: 100%;
:* Both <code>label???</code> and <code>data???</code> is required to add an entry.
| title=Statistics
:** <code>set???</code> is required to add an multiple-column entry.
| image={{{stat|}}}
:** If you are adding a multiple-column entry, the <code>data</code> should be written as <code>data???/...</code>.
}}
:** In this case, if <code>data</code> is omitted, a entry will still be added.
}}</div>
:* <code>colset</code> can also be least common multiple (LCM), just make sure the <code>set???</code> is fractional to <code>colset</code>
</noinclude>

Revision as of 04:40, 11 February 2017