Difference between revisions of "Template:BodyBox"

From Kerbal Space Program Wiki
Jump to: navigation, search
(+cat; +example;)
m (+automatic size determination;)
Line 1: Line 1:
<includeonly>| class="planetbox" style="padding:10px" | [[File:{{{image|Tiny{{{name}}}.png}}}|link={{{name}}}{{if lang}}|{{#switch: {{{size|P}}}|Star|S=125px|Planet|P=100px|Moon|M=75px|#default={{{size}}}}}]]<span class="planetlabel">[[{{{name}}}{{if lang}}|{{{caption|{{BodyData/Name|{{{name}}}}}}}}]]</span></includeonly>
+
<includeonly>| class="planetbox" style="padding:10px" | [[File:{{{image|Tiny{{{name}}}.png}}}|link={{{name}}}{{if lang}}|{{#switch: {{{size|{{#switch: {{{name}}}
 +
|Kerbol=Star
 +
|Gilly
 +
|Mun
 +
|Mün
 +
|Minmus
 +
|Ike
 +
|Laythe
 +
|Tylo
 +
|Vall
 +
|Pol
 +
|Bop=Moon
 +
|#default=Planet}}}}}|Star|S=125px|Planet|P=100px|Moon|M=75px|#default={{{size}}}}}]]<span class="planetlabel">[[{{{name}}}{{if lang}}|{{{caption|{{BodyData/Name|{{{name}}}}}}}}]]</span></includeonly>
 
<noinclude>Creates a table entry for a “solar sytem table” like [[Kerbol System/Map]].
 
<noinclude>Creates a table entry for a “solar sytem table” like [[Kerbol System/Map]].
  
 
{{Parameter Table|name=text|parameters=
 
{{Parameter Table|name=text|parameters=
{{ParameterRow|name|Name of the celestial body.}}
+
{{Parameter Row|name|Name of the celestial body.}}
{{ParameterRow|image|Name of an image of the celestial body.|<tt>'''Tiny{{{name}}}.png'''</tt> if not set.}}
+
{{Parameter Row|image|Name of an image of the celestial body.|<tt>'''Tiny{{{name}}}.png'''</tt> if not set.}}
{{ParameterRow|size|Size of the image. Available values:
+
{{Parameter Row|size|Size of the image. Available values:
 
* '''S'''tar (125 px)
 
* '''S'''tar (125 px)
* '''P'''lanet (100 px)
+
* [[Planet|'''P'''lanet]] (100 px)
* '''M'''oon (75 px)
+
* [[Moon|'''M'''oon]] (75 px)
* Any other value are used directly. (e.g. 42px or 74em)|<tt>P</tt>}}
+
* Any other value are used directly without any unit (e.g. <tt>42px</tt> or <tt>74em</tt>).|<tt>Star</tt> when {{{name}}} is Kerbol or Sun, Moon when it's a name of a Moon, Planet instead}}
{{ParameterRow|caption|Displayed name, may be transcribed.|{{Tlx|BodyData/Name|{{{name}}}}}}}
+
{{Parameter Row|caption|Displayed name, may be transcribed.|{{Tlx|BodyData/Name|{{{name}}}}}}}
 
}}
 
}}
  
[[Category:Templates|BodyBox]]</noinclude>
+
[[Category:Templates]]</noinclude>

Revision as of 18:11, 16 July 2013

Creates a table entry for a “solar sytem table” like Kerbol System/Map.

Template:Parameter Table