Difference between revisions of "Template:Box/doc"

From Kerbal Space Program Wiki
Jump to: navigation, search
(Created page with "{{Documentation subpage}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see Wikipedia:Wikidata) --> == Usage == Recom...")
 
m (Examples)
Line 44: Line 44:
  
 
== Examples ==
 
== Examples ==
{{Box|Kerbin18.png|Displayed text|#b22222|Typename}}
+
{{Box|Kerbin18.png|Box with a custom image and color, overriding the <tt>type</tt>.|#00bb00|type=error}}
  
   <nowiki>{{Box|Kerbin18.png|Displayed text|#b22222|Typename}}</nowiki>
+
   <nowiki>{{Box|Kerbin18.png|Box with a custom image and color, overriding the <tt>type</tt>.|#00bb00|type=error}}</nowiki>
  
{{Box|'''This article is currently undergoing a major expansion or revamp.''' However, you are free to help in the construction of this page by improving it.}}
+
{{Box|Kerbin18.png|Box with a custom image and color, no <tt>type</tt> set.|#00bb00}}
  
   <nowiki>{{Box|'''This article is currently undergoing a major expansion or revamp.''' However, you are free to help in the construction of this page by improving it.}}</nowiki>
+
   <nowiki>{{Box|Kerbin18.png|Box with a custom image and color, no <tt>type</tt> set.|#00bb00}}</nowiki>
  
{{Box|type=warning|Most of this page is entirely speculation based on in-game observation and should not be taken as absolute fact!}}
+
{{Box|Kerbin18.png|Box with a custom image, no color set.}}
  
   <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>
+
   <nowiki>{{Box|Kerbin18.png|Box with a custom image, no color set.}}</nowiki>
 +
 
 +
{{Box|type=warning|Box with <tt>type</tt> set to <tt>warning</tt>.}}
 +
 
 +
  <nowiki>{{Box|type=warning|Box with <tt>type</tt> set to <tt>warning</tt>.}}</nowiki>
 +
 
 +
{{Box|Box with default settings.}}
 +
 
 +
  <nowiki>{{Box|Box with default settings.}}</nowiki>
  
 
== Additional Box templates ==
 
== Additional Box templates ==

Revision as of 16:35, 2 February 2020

Usage

Recommended usage: {{Box|''Contents''}}

Parameters

#/Name Optional Description Default
1 Yes Small image on the left shrunk to 40×40 pixels. File:notice.svg
2 No Text, if this parameter isn't set, uses the first parameter as text.
3 Yes Color of the box. When transparent it does hide the border. #1e90ff    
type Yes Type of the box. Not set

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 or info Notice.svg    
error Ambox warning pn.svg    
warning Warning.svg    
editnotice or notice Notice.svg    
disambig Disambig-dark.svg    

Examples

Box with a custom image and color, overriding the type.
 {{Box|Kerbin18.png|Box with a custom image and color, overriding the <tt>type</tt>.|#00bb00|type=error}}
Box with a custom image and color, no type set.
 {{Box|Kerbin18.png|Box with a custom image and color, no <tt>type</tt> set.|#00bb00}}
Box with a custom image, no color set.
 {{Box|Kerbin18.png|Box with a custom image, no color set.}}
Box with type set to warning.
 {{Box|type=warning|Box with <tt>type</tt> set to <tt>warning</tt>.}}
Box with default settings.
 {{Box|Box with default settings.}}

Additional Box templates