Difference between revisions of "Template:Infobox"
From Kerbal Space Program Wiki
(*use infobox css class;) |
(-hopefully remove new line at the beginning; *made the table a bit smaller;) |
||
Line 18: | Line 18: | ||
{{Parameter Table|name=text|style=hover|parameters= | {{Parameter Table|name=text|style=hover|parameters= | ||
− | {{Parameter Row|width|Box width in pixels.|200}} | + | {{Parameter Row|width|Box width in pixels.|<tt>200</tt>}} |
− | {{Parameter Row|padding|Padding in <tt>em</tt>.|0. | + | {{Parameter Row|padding|Padding in <tt>em</tt>.|<tt>0.2</tt>}} |
− | {{Parameter Row|tpadding|Padding of the table in <tt>em</tt>|0}} | + | {{Parameter Row|tpadding|Padding of the table in <tt>em</tt>|<tt>0</tt>}} |
{{Parameter Row|name|Box title.|Base page name}} | {{Parameter Row|name|Box title.|Base page name}} | ||
{{Parameter Row|file|Box image. When set to <tt>none</tt> doesn't display any image.|[[:File:Image-needed.png]]}} | {{Parameter Row|file|Box image. When set to <tt>none</tt> doesn't display any image.|[[:File:Image-needed.png]]}} | ||
− | {{Parameter Row|file style|CSS style for the infobox image | + | {{Parameter Row|file style|CSS style for the infobox image.|Not set}} |
{{Parameter Row|hovertext|Image hover text.|<tt>name</tt> or base page name}} | {{Parameter Row|hovertext|Image hover text.|<tt>name</tt> or base page name}} | ||
{{Parameter Row|lines|Lines, use {{tl|Infobox/Line}}.}} | {{Parameter Row|lines|Lines, use {{tl|Infobox/Line}}.}} | ||
Line 29: | Line 29: | ||
}} | }} | ||
− | [[Category:Templates]]</noinclude> | + | [[Category:Templates]]</noinclude><includeonly><div class="infobox" style="float: {{if rtl|left|right}}; width: {{{width|200}}}px; margin-{{if rtl|right|left}}: 1em; padding: {{{padding|0.2}}}em; direction: {{if rtl|rtl|ltr}};"> |
− | <includeonly><div class="infobox" style="float: {{if rtl|left|right}}; width: {{{width|200}}}px; margin-{{if rtl|right|left}}: 1em; padding: {{{padding|0. | ||
− | |||
{| style="font-size: 90%; padding: {{{tpadding|0}}}em; width: 100%" valign="top" | {| style="font-size: 90%; padding: {{{tpadding|0}}}em; width: 100%" valign="top" | ||
|- | |- | ||
− | {{#ifeq: {{{file|}}}|none||{{!}} {{#if: {{{file style|}}}|style=" | + | | colspan="3" style="background: #ccc; font-size: large; padding: .3em; text-align: center; font-weight: bold;"| {{#if: {{{name|}}}|{{{name}}}|{{BASEPAGENAME}}}} |
+ | |- | ||
+ | {{#ifeq: {{{file|}}}|none||{{!}} {{#if: {{{file style|}}}|style="{{{file style}}}"}} colspan="3" {{!}} [[File:{{#if: {{{file|}}}|{{{file}}}|Image-needed.png}}|{{#expr: {{{width|200}}} - 10}}px|center|{{{hovertext|{{#if: {{{name|}}}|{{{name}}}|{{BASEPAGENAME}}}}}}}]]}} | ||
{{{lines}}} | {{{lines}}} | ||
{{#if: {{{notes|}}}|{{!}}- | {{#if: {{{notes|}}}|{{!}}- |
Revision as of 16:41, 24 August 2013
Infobox (name) | ||
Homemade Image Subtitle | ||
One Column | ||
Two | Columns | |
And | Three | |
Columns | ||
Multiple Types | (Type 1) | Value 1 |
(Type 2) | Value 2 | |
Homemade Footer | ||
Annotations & Footnotes (notes) |
This is a general infobox template, based on the old versions of {{Infobox/Part}} (Partbox) and {{Infobox/Body}} (Planetbox). See Template talk:Infobox/Part for more information about the new infoboxes.