Template:MaterialInfobox: Difference between revisions
Appearance
Content deleted Content added
No edit summary |
Restoring old version, the portable infobox format broke the Known Uses list |
||
| Line 1: | Line 1: | ||
<onlyinclude>{{#infoboxbuilder: |
|||
<infobox theme="portInfobox"> |
|||
| 0:Theme = eInfobox | 0:CustomModule = Module:Infobox Material |
|||
<title source="grade"><format>{{#switch: {{{grade|}}} |
|||
| 1:Type = Title |
|||
| ⚫ | |||
| 1:Label = NULL |
|||
| ⚫ | |||
| 1:ValueMethod = PreTitleIcon |
|||
| ⚫ | |||
| 1:Grade = {{{grade|}}} |
|||
| ⚫ | |||
| 1:Value = {{PAGENAME}} |
|||
| ⚫ | |||
| 2:Type = MainImage |
|||
}} {{PAGENAME}}</format></title> |
|||
| 2:Label = NULL |
|||
<image source="image"/> |
|||
| 2:Value = {{#if:{{{image|}}}|[[File:{{{image|}}}|306px]]}} |
|||
<data source="grade"> |
|||
| 3:Type = Line |
|||
<label>Grade</label> |
|||
| 3:Label = Grade |
|||
</data> |
|||
| 3:Value = {{{grade|}}} |
|||
<group layout="horizontal"> |
|||
| 4:Type = Custom |
|||
<header>Known Uses</header> |
|||
| 4:Label = tr |
|||
<data source="knownuses"> |
|||
| 4:Value = <td colspan="2">Known uses</td> |
|||
<!-- <format></format> |
|||
| 4:CssClass = custom-listheader |
|||
TODO: Write a Lua function with Dev:List |
|||
| 5:Type = Custom |
|||
L.makeList('unbulleted', mw.text.split(args.knownuses, ';')) |
|||
| 5:Label = |
|||
--> |
|||
| 5:Value = {{{knownuses|}}} |
|||
</data> |
|||
| 5:ValueMethod = TableSplitRows |
|||
</group> |
|||
| 5:CssClass = custom-list |
|||
</infobox> |
|||
}} |
|||
<includeonly>[[Category:Materials]] |
<includeonly>[[Category:Materials]] |
||
{{#switch:{{lc:{{{grade|}}}}} |
|||
| common |
|||
| ⚫ | |||
| rare |
|||
| ⚫ | |||
| standard |
|||
| ⚫ | |||
| very common |
|||
| Very Common |
|||
| ⚫ | |||
| very rare |
|||
| Very Rare |
|||
| ⚫ | |||
}} |
|||
</includeonly> |
|||
</onlyinclude> |
|||
<noinclude> |
<noinclude> |
||
<pre style="width: 300px"> |
<pre style="width: 300px"> |
||
{{MaterialInfobox |
{{MaterialInfobox |
||
| image |
| image = |
||
| grade |
| grade = |
||
| knownuses |
| knownuses = |
||
}} |
}} |
||
</pre> |
</pre> |
||
Revision as of 00:34, 27 October 2019
{{#infoboxbuilder: | 0:Theme = eInfobox | 0:CustomModule = Module:Infobox Material | 1:Type = Title
| 1:Label = NULL | 1:ValueMethod = PreTitleIcon | 1:Grade = | 1:Value = MaterialInfobox
| 2:Type = MainImage
| 2:Label = NULL | 2:Value =
| 3:Type = Line
| 3:Label = Grade | 3:Value =
| 4:Type = Custom
| 4:Label = tr
| 4:Value = Known uses
| 4:CssClass = custom-listheader
| 5:Type = Custom
| 5:Label = | 5:Value = | 5:ValueMethod = TableSplitRows | 5:CssClass = custom-list
}}
{{MaterialInfobox
| image =
| grade =
| knownuses =
}}
Usage
- grade
- The grade or rating on how difficult it is to find. Can either be "Very common", "Common", "Standard", "Rare", or "Very rare".
- image
- The image to display in the material infobox.
- knownuses
- The known uses listed in the information of the material. New material are separated by semi-colon (";"). Names have to be exact in terms of both name and capitalisation. Please use icon templates such as {{Material ship}}.