Template:Infobox character/ru: Difference between revisions

From Elwiki
mNo edit summary
No edit summary
Line 1: Line 1:
{{Infobox
<includeonly>{{#Widget:Infobox}}{{#if:{{{colset|}}}
| colset={{{colset|}}}
| {{#vardefine:colset|{{{colset|}}}}}
| color={{{color|}}}
| {{#vardefine:colset|1}}
| title={{{class|}}}
}}{{#switch:{{{color|}}}
| image={{{image|}}}
| ={{#vardefine:color| background-color: lightblue;}}
| label1=Имя
| Rainbow={{#vardefine:rainbow|rainbow}}
| data1={{{name|}}}
| #default ={{#vardefine:color| background-color: {{{color}}};}}  
| set1={{{nameset|}}}
}}<table style="{{{style|}}}" class="infobox {{{class|}}}">
| data1/1={{{name1|}}}
<tr style="{{#var:color|}}" class="textfloat {{#var:rainbow|}}">
| data1/2={{{name2|}}}
<th class="title" colspan="{{#expr:{{#var:colset|1}}+1}}">{{{title|}}}</th>
| label2=Класс
  </tr>
| data2={{{class|}}}
  {{#if:{{{image|}}}
| label3=Оружие
  |<tr>
| data3={{{weapon|}}}
    <td class="image" colspan="{{#expr:{{#var:colset|1}}+1}}">{{{image}}}</td>
| set3={{{weaponset|}}}
  </tr>
| data3/1={{{weapon1|}}}
  }}
| data3/2={{{weapon2|}}}
  {{#forargs:label
| label4=Возраст
| key
| data4={{{age|}}}
| val
| set4={{{ageset|}}}
|
| data4/1={{{age1|}}}
{{#if:{{{set{{#var:key|}}|}}}
| data4/2={{{age2|}}}
| {{#vardefine:div|{{#expr:{{#var:colset|1}}/{{{set{{#var:key|1}}|}}}}}}}
| label5=Развитие
<tr class="entry">
| data5={{{tree|}}}
<th>{{#var:val|}}</th>
| label6=Альтернативные Имена
{{#forargs:data{{#var:key|}}/
| data6={{{AN|}}}
| subkey
| label7=Озвучивание
| subval
| data7={{{VA|}}}
| <td colspan="{{#var:div|}}">{{#var:subval|}}</td>
| set7={{{VAset|}}}
}}
| data7/1={{{VA1|}}}
</tr>
| data7/2={{{VA2|}}}
    |
| label8=Авторы
    {{#if:{{{data{{#var:key|}}|}}}
| data8={{{Art|}}}
    |<tr class="entry">
| label9=Релиз
    <th>{{#var:val|}}</th>
| data9={{{RD|}}}
<td colspan="{{#var:colset|1}}">{{{data{{#var:key|}}|}}}</td>
| label10=Персональные Данные
</tr>
| data10={{{PS|}}}
}}
| label11=Статистика
}}
| data11={{{stat|}}}
}}
}}
</table></includeonly><noinclude>{{DISPLAYTITLE:Infobox Prototype}}
== Description ==
This is infobox proto. All infoboxes should use this proto.
== How to Use ==
<u>'''Valid Parameters'''</u>:
:* '''Content Parameters''': <code>title</code>, <code>image</code>, <code>label???</code>, <code>data???</code>
:* '''Layout Parameters''': <code>colset</code>, <code>set???</code>
:* '''Styling Parameters''': <code>style</code>, <code>class</code>, <code>color</code>
<u>'''Parameter Instructions'''</u>
:* <code>title</code>: (Optional) The heading. Omitting will result in a thin line.
:* <code>image</code>: (Optional) The image on the top.
:* <code>label???</code>: Heading 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>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>class</code>: (Optional) Class of infobox, following HTML <code>class</code> attribute syntax.
:* <code>color</code>: (Optional) Color of the heading. Default uses wikiskin default.
<u>'''Other Notes'''</u>
:* Both <code>label???</code> and <code>data???</code> is required to add an entry.
:** <code>set???</code> is required to add an multiple-column entry.
:** 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.
:* <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 12:34, 9 February 2017

Description

This is infobox proto. All infoboxes should use this proto.

How to Use

Valid Parameters:

  • Content Parameters: title, image, label???, data???
  • Layout Parameters: colset, set???
  • Styling Parameters: style, class, color

Parameter Instructions

  • title: (Optional) The heading. Omitting will result in a thin line.
  • image: (Optional) The image on the top.
  • label???: Heading of entry. Required for entry.
  • data???: Data of entry. Required for entry.
  • set???: (Optional) Number of entry columns (label does not count).
  • colset: (Optional) Required only if having set???, the product of set numbers in the whole infobox.
  • style: (Optional) Style of in infobox, following CSS syntax.
  • class: (Optional) Class of infobox, following HTML class attribute syntax.
  • color: (Optional) Color of the heading. Default uses wikiskin default.

Other Notes

  • Both label??? and data??? is required to add an entry.
    • set??? is required to add an multiple-column entry.
    • If you are adding a multiple-column entry, the data should be written as data???/....
    • In this case, if data is omitted, a entry will still be added.
  • colset can also be least common multiple (LCM), just make sure the set??? is fractional to colset