Template:PlanetInfoBox: Difference between revisions
From Space Pioneers Community Wiki
m test |
No edit summary |
||
| Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
== | == Example == | ||
{{PlanetInfoBox | {{PlanetInfoBox | ||
| planetId = 2128-3 | | planetId = 2128-3 | ||
| image = 2128-3_example.png | | image = 2128-3_example.png | ||
| date = 06/20/25 | | date = 06/20/25 | ||
| atmosphere = Martian | |||
| tectonics = Continental | |||
| oceans = Water | |||
| radius = 1 | |||
| gravity = 1 | |||
| moons = 0 | |||
| hasLife = false | |||
| description = Small planet, has some interesing buildings near the north pole. Numerous important events in Space Pioneers happened there. | |||
}} | }} | ||
<templatedata> | |||
{ | |||
: The | "description": "Shows information about a planet", | ||
"params": { | |||
: The | "planetId": { | ||
"label": "Planet ID", | |||
: The | "required": true, | ||
"description": "The id of the planet (ssss-i)", | |||
"type": "string" | |||
}, | |||
"image": { | |||
"label": "Image", | |||
"required": true, | |||
"description": "The name of the image in the wiki.", | |||
"type": "string" | |||
}, | |||
"date": { | |||
"label": "Date", | |||
"required": false, | |||
"description": "The date in the MM/DD/YYYY format when the screenshot was taken", | |||
"type": "string" | |||
}, | |||
"atmosphere": { | |||
"label": "Atmosphere", | |||
"required": true, | |||
"description": "The type of atmosphere of the planet.", | |||
"type": "string" | |||
}, | |||
"tectonics": { | |||
"label": "Tectonics", | |||
"required": true, | |||
"description": "The type of tectonic of the planet.", | |||
"type": "string" | |||
}, | |||
"oceans": { | |||
"label": "Oceans", | |||
"required": true, | |||
"description": "The type of oceans of the planet.", | |||
"type": "string" | |||
}, | |||
"moons": { | |||
"label": "Moons", | |||
"required": true, | |||
"description": "The number of moons that the planet has.", | |||
"type": "number" | |||
}, | |||
"gravity": { | |||
"label": "Gravity", | |||
"required": true, | |||
"description": "The gravity that the planet has.", | |||
"type": "number" | |||
}, | |||
"radius": { | |||
"label": "Radius", | |||
"required": true, | |||
"description": "The radius of the planet.", | |||
"type": "number" | |||
}, | |||
"hasLife": { | |||
"label": "Has life?", | |||
"required": true, | |||
"description": "Whether the planets has life or not", | |||
"type": "boolean" | |||
}, | |||
"description": { | |||
"label": "Description", | |||
"required": true, | |||
"description": "A brief description of the planet", | |||
"type": "string" | |||
} | |||
} | |||
} | |||
</templatedata> | |||
</noinclude> | </noinclude> | ||
<includeonly> | |||
<table class="infobox" style="width:22em; background:#f9f9f9; border:1px solid #aaa; padding:4px; float:right; margin:0 0 1em 1em; font-size:90%; text-align:left;"> | <table class="infobox" style="width:22em; background:#f9f9f9; border:1px solid #aaa; padding:4px; float:right; margin:0 0 1em 1em; font-size:90%; text-align:left;"> | ||
<tr> | <tr> | ||
| Line 26: | Line 98: | ||
<td colspan="2" style="text-align:center;">{{#if:{{{image|}}}|[[File:{{{image}}}|200px]]|''No image provided''}}</td> | <td colspan="2" style="text-align:center;">{{#if:{{{image|}}}|[[File:{{{image}}}|200px]]|''No image provided''}}</td> | ||
</tr> | </tr> | ||
<td colspan="2" style="text-align:center; font-size:85%; font-style:italic;">Taken at {{{date| | <td colspan="2" style="text-align:center; font-size:85%; font-style:italic;">{{#if:{{{date|}}}|Taken at {{{date|}}}|}}</td> | ||
| Line 66: | Line 138: | ||
<tr> | <tr> | ||
<td><b>Has life:</b></td> | <td><b>Has life:</b></td> | ||
<td>{{{hasLife| | <td>{{#ifeq:{{{hasLife|}}}|true|Yes|No}}</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
| Line 76: | Line 148: | ||
</tr> | </tr> | ||
</table> | </table> | ||
</includeonly> | |||
Latest revision as of 21:06, 20 June 2025
Example
Shows information about a planet
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Planet ID | planetId | The id of the planet (ssss-i) | String | required |
| Image | image | The name of the image in the wiki. | String | required |
| Date | date | The date in the MM/DD/YYYY format when the screenshot was taken | String | optional |
| Atmosphere | atmosphere | The type of atmosphere of the planet. | String | required |
| Tectonics | tectonics | The type of tectonic of the planet. | String | required |
| Oceans | oceans | The type of oceans of the planet. | String | required |
| Moons | moons | The number of moons that the planet has. | Number | required |
| Gravity | gravity | The gravity that the planet has. | Number | required |
| Radius | radius | The radius of the planet. | Number | required |
| Has life? | hasLife | Whether the planets has life or not | Boolean | required |
| Description | description | A brief description of the planet | String | required |
