Difference between revisions of "Template:Box"

From Kerbal Space Program Wiki
Jump to: navigation, search
m (Examples: *explicit parameter names;)
Line 6: Line 6:
 
{{Parameter Table|name=both|parameters=
 
{{Parameter Table|name=both|parameters=
 
{{Parameter Row|1|Small image on the left shrunk to 40×40 pixels.|[[:File:notice.svg]]}}
 
{{Parameter Row|1|Small image on the left shrunk to 40×40 pixels.|[[:File:notice.svg]]}}
{{Parameter Row|2|Text}}
+
{{Parameter Row|2|Text, if this parameter isn't set, uses the first parameter as text.}}
 
{{Parameter Row|3|Color of the box. When transparent it does hide the border.|<tt>#1e90ff</tt> {{ColorBox|#1e90ff}}}}
 
{{Parameter Row|3|Color of the box. When transparent it does hide the border.|<tt>#1e90ff</tt> {{ColorBox|#1e90ff}}}}
{{Parameter Row|4|Title in bold.|None}}
 
 
{{Parameter Row|type|Type of the box.|Not set}}
 
{{Parameter Row|type|Type of the box.|Not set}}
 
}}
 
}}
Line 47: Line 46:
  
 
   <nowiki>{{Box|2='''This article is currently undergoing a major expansion or revamping.''' However, you are free to help in the construction of this page by improving it.}}</nowiki>
 
   <nowiki>{{Box|2='''This article is currently undergoing a major expansion or revamping.''' However, you are free to help in the construction of this page by improving it.}}</nowiki>
{{Box|type=warning|2=Most of this page is entirely speculation based on in-game observation and should not be taken as absolute fact!}}
+
{{Box|type=warning|Most of this page is entirely speculation based on in-game observation and should not be taken as absolute fact!}}
  
   <nowiki>{{Box|type=warning|2=Most of this page is entirely speculation based on in-game observation and should not be taken as absolute fact!}}</nowiki>
+
   <nowiki>{{Box|type=warning|Most of this page is entirely speculation based on in-game observation and should not be taken as absolute fact!}}</nowiki>
  
 
== Additional Box templates ==
 
== Additional Box templates ==
Line 65: Line 64:
 
|notice=bba
 
|notice=bba
 
|#default=1e90ff}}}}}"
 
|#default=1e90ff}}}}}"
| class="mbox-image" | [[File:{{{1|{{#switch: {{{type|}}}
+
| class="mbox-image" | {{#if: {{Booland|{{{1|}}}|{{{2|}}}}}|[[File:{{{1|}}}|40x40px|alt=|link=]]|[[File:{{#switch: {{{type|}}}
 
|error=Ambox warning pn.svg
 
|error=Ambox warning pn.svg
 
|warning=warning.svg
 
|warning=warning.svg
 
|editnotice
 
|editnotice
 
|notice
 
|notice
|#default=notice.svg}}}}}|40x40px|alt=|link=]]
+
|#default=notice.svg}}|40x40px|alt=|link=]]}}
| class="mbox-text" | {{{2}}}
+
| class="mbox-text" | {{#if: {{{2|}}}|{{{2}}}|{{{1}}}}}
 
|}</includeonly>
 
|}</includeonly>

Revision as of 10:55, 18 August 2013

Description

This templates create a box with an image.

Parameters

Template:Parameter Table

It is possible to add additional rows by using {{!}} in the Text parameter. One example is {{SVG available}}.

Types

With types it is possible to predefine the image and color, although both can be changed.

Type Image Color
Not set Notice.svg    
error Ambox warning pn.svg    
warning Warning.svg    
editnotice or notice Notice.svg    

Examples

Text
 {{Box|Kerbin18.png|Text|#b22222|Title}}
This article is currently undergoing a major expansion or revamping. However, you are free to help in the construction of this page by improving it.
 {{Box|2='''This article is currently undergoing a major expansion or revamping.''' However, you are free to help in the construction of this page by improving it.}}
Most of this page is entirely speculation based on in-game observation and should not be taken as absolute fact!
 {{Box|type=warning|Most of this page is entirely speculation based on in-game observation and should not be taken as absolute fact!}}

Additional Box templates

There exists another box template named {{mbox}} which for example {{Stub}} uses.