Template:Infobox: Difference between revisions
Jump to navigation
Jump to search
m (Add margin left and right of infobox) |
(Define optional parameter + Explain the use of the template) |
||
Line 9: | Line 9: | ||
| {{{categories|{{category|Uncategorized}}}}} | | {{{categories|{{category|Uncategorized}}}}} | ||
|- | |- | ||
| style="vertical-align:top" | {{#ifeq:{{{categories|undefined}}}|undefined|| | ||
| {{{ | <tr><td style="vertical-align:top">Features</td><td>{{{features}}}</td></tr> | ||
}} | |||
{{#ifeq:{{{floor|undefined}}}|undefined|| | |||
<tr><td style="vertical-align:top">Build on</td><td>{{{floor}}}</td></tr> | |||
}} | |||
|}</includeonly> | |||
<noinclude> | |||
Generic infobox for game elements (building, resources, ...) | |||
== Parameters == | |||
{| class="wikitable" style="margin:auto;width:800px" | |||
! Name | |||
! Description | |||
|- | |- | ||
| | | name | ||
| {{{ | | Name of the game element. | ||
|}< | |- | ||
| categories | |||
| Categories of the game element (type, category, color, ...). Feel free to use one or multiple element with the [[Template:Category|categories template]]. | |||
|- | |||
| picture_file | |||
| (optional) File use to illustrate the infobox. Format: File:filename.ext. | |||
|- | |||
| picture_alt | |||
| (optional) Alternative text use if the picture can't load. | |||
|- | |||
| picture_caption | |||
| (optional) Text display while hovering the picture. | |||
|- | |||
| features | |||
| (optional) Features of the game element (like: producing heat, need energy, ...). Feel free to use one or multiple element with the [[Template:Feature|features template]]. | |||
|- | |||
| floor | |||
| (optional) Define on which type of floor a structure can be build. Feel free to use one or multiple element with the [[Template:Floor|floors template]]. | |||
|} | |||
== Exemple of use == | |||
<nowiki>{{Infobox</nowiki> <br/> | |||
| name=Ribosome <br/> | |||
| categories=<nowiki>{{category|Structure}}{{category|Production}}</nowiki><br/> | |||
| picture_file=File:Ribosome.png<br/> | |||
| picture_alt=Ribosome<br/> | |||
| picture_caption=Ribosome<br/> | |||
| features=<nowiki>{{feature|heating}}</nowiki><br/> | |||
| floor=<nowiki>{{floor|intracellular}}</nowiki><br/> | |||
}} | |||
</noinclude> |
Revision as of 13:14, 25 May 2024
Generic infobox for game elements (building, resources, ...)
Parameters
Name | Description |
---|---|
name | Name of the game element. |
categories | Categories of the game element (type, category, color, ...). Feel free to use one or multiple element with the categories template. |
picture_file | (optional) File use to illustrate the infobox. Format: File:filename.ext. |
picture_alt | (optional) Alternative text use if the picture can't load. |
picture_caption | (optional) Text display while hovering the picture. |
features | (optional) Features of the game element (like: producing heat, need energy, ...). Feel free to use one or multiple element with the features template. |
floor | (optional) Define on which type of floor a structure can be build. Feel free to use one or multiple element with the floors template. |
Exemple of use
{{Infobox
| name=Ribosome
| categories={{category|Structure}}{{category|Production}}
| picture_file=File:Ribosome.png
| picture_alt=Ribosome
| picture_caption=Ribosome
| features={{feature|heating}}
| floor={{floor|intracellular}}
}}