Template:Infobox: Difference between revisions

From Kerbal Powers Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
<includeonly><table class="infobox">
+
<includeonly><templatestyles src="Infobox/style.css"/><nowiki />
  +
{{Infobox/Header|title={{{title}}}}}
<tbody>
 
  +
{{Infobox/Illustration|file={{{illustration}}}|caption={{{caption}}}}}
<tr>
 
  +
{{Infobox/SectionHeader|section=Example section}}
<td colspan="2" class="infobox-header">{{{title}}}</td>
 
  +
{{Infobox/Item|key=Sample data|value={{{example_data}}}}}
</tr>
 
 
</table><nowiki /></includeonly>
<tr>
 
<td colspan="2" class="infobox-illustration">{{{illustration}}}</td>
 
</tr>
 
<tr>
 
<td colspan="2" class="infobox-caption">{{{caption}}}</td>
 
</tr>
 
</tbody>
 
</table></includeonly>
 
   
 
<noinclude>
 
<noinclude>
  +
=== Example ===
  +
{{Infobox
  +
| title = Example
  +
| illustration = [[File:KP dark.png]]
  +
| caption = Example infobox
  +
| example_data = Soap floats on water, but its efficiency at naval battles is yet to be proven
  +
}}
  +
  +
The following markup will produce the output presented to the right of this paragraph :
  +
<pre>
  +
{{Infobox
  +
| title = Example
  +
| illustration = [[File:KP dark.png]]
  +
| caption = Example infobox
  +
| example_data = Soap floats on water, but its efficiency at naval battles is yet to be proven
  +
}}
  +
</pre>
  +
{{clr}}
  +
 
<templatedata>
 
<templatedata>
 
{
 
{
Line 33: Line 45:
 
"description": "A short descriptive text for the illustration.",
 
"description": "A short descriptive text for the illustration.",
 
"type": "string"
 
"type": "string"
  +
},
  +
"example_data": {
  +
"description": "This is only used for demonstration purposes. Any children template inheriting from this one should remove this attribute. ",
  +
"deprecated": "This is only used for demonstration purposes. Any children template inheriting from this one should remove this attribute. "
 
}
 
}
 
},
 
},

Revision as of 00:24, 7 March 2021


Example

Example

KP dark.png Example infobox Example section Sample data Soap floats on water, but its efficiency at naval battles is yet to be proven


The following markup will produce the output presented to the right of this paragraph :

{{Infobox
 | title = Example
 | illustration = [[File:KP dark.png]]
 | caption = Example infobox
 | example_data = Soap floats on water, but its efficiency at naval battles is yet to be proven
}}

Generic floating infobox.

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Titletitle

Title that appears at the top of the infobox.

Default
Infobox
Stringrequired
Illustrationillustration

A picture describing the subject.

Fileoptional
Captioncaption

A short descriptive text for the illustration.

Stringoptional
example_dataexample_data

This is only used for demonstration purposes. Any children template inheriting from this one should remove this attribute.

Unknowndeprecated