Template:Ambox/doc: Difference between revisions

From Bitcoin Wiki
Jump to navigation Jump to search
Firestorm (talk | contribs)
Created page with "An '''article message box''', or '''ambox''', can be added to notify users of specific messages regarding the article. == Usage == === All parameters === {| class="wikitable g..."
 
Bytecoyn (talk | contribs)
ambox doc copied from osm.org
 
Line 1: Line 1:
An '''article message box''', or '''ambox''', can be added to notify users of specific messages regarding the article.  
{{Documentation subpage}}
This template is used in many [[:Category:Ambox Derived Works|pages]].


== Usage ==
==History==
=== All parameters ===
This template is a derived work. It is, however, NOT exactly the same as Wikipedia's template of the same name!  All CSS has been integrated into the template, and therefore some features are not available. However it is still a very useful template!


{| class="wikitable grid"
==Usage Instructions==
! class="header" | Name
Example to display a notice:
! class="header" | Examples
<pre><nowiki>
! class="header" | Description
{{Ambox
|-
| type = notice
| colspan="3" | '''''Line colors'''''
| text  = Hello world!
|-
}}
| rowspan="6" | type
</nowiki></pre>
| style="border-left: 10px solid #1e90ff;" | ''type = notice'' [default]
The code above should return:
| rowspan="6" | Use the correct value for the message box.
{{Ambox
|-
| type = notice
| class="ambox-style" | ''type = style''
| text  = Hello world!
|-
}}
| class="ambox-content" | ''type = content''
 
|-
There are lots more examples of ambox use on the [[Wiki labels]] page.
| class="ambox-delete" | ''type = delete''
|-
| class="ambox-protection" | ''type = protection''
|-
| class="ambox-images" | ''type = images''
|-
| colspan="3" | '''''Images'''''
|-
|image
|''Example.png''
|Places an image on the left of the message box.
|-
|imagewidth
|''56px'' [default]
|Defines the width of the left image.
|-
|imagealt
|''Notice''
|Text to be displayed if image isn't shown properly.
|-
|image2
|''PD-icon.png''
|Places a second image on the right of the message box
|-
|image2width
|''56px'' [default]
|Defines the width of the right image.
|-
|image2alt
|''Public Domain''
|Text to be displayed if the right image isn't shown properly.
|-
| colspan="3" | '''''Other'''''
|-
|width
|['''deprecated''']
|''No longer available''
|-
|style
| e.g. ''font-size: 90%;''
| Takes any valid CSS style.
|-
|contents
| (see below)
|}


== Contents ==
Amboxes are divided into various types.  Each type should have a corresponding colour code.  The colour-coding helps to inform of the severity of the issues at a glance, so you can use the following parameters to change the color of your ambox.


Use {{tl|ambox/message}} in the ''contents'' parameter. Example:
{{ambox
|type= danger
|text= <code><nowiki>|type= danger</nowiki></code>, deletion and other serious warnings, concerns, and serious issues such as {{tl|delete}} and {{tl|delete proposal}}
}}


<pre><nowiki>
{{ambox
{{ambox/message
|type= warning
| 1 = Need some help over here!
|text= <code><nowiki>|type= warning</nowiki></code>, important concerns and notes, major issues such as {{tl|cleaning}}
| 2 = This article needs cleaning up.
}}
| 3 = You can help by editing it.
 
{{ambox
|type= caution
|text= <code><nowiki>|type= caution</nowiki></code>, recommended operations, moderate to fairly major issues, such as {{tl|cleanup}}
}}
}}
</nowiki></pre>


produces...
{{ambox
|type= detail
|text= <code><nowiki>|type= detail</nowiki></code>, minor to fairly moderate issues such as {{tl|OutOfDate}}
}}


{{ambox/message
{{ambox
| 1 = Need some help over here!
|type= proposal
| 2 = This article needs cleaning up.
|text= <code><nowiki>|type= proposal</nowiki></code>, move, transwiki and copy to Wikimedia Commons proposals such as {{tl|move}}
| 3 = You can help by editing it.
}}
}}


== Examples ==
{{ambox
|type= protection
|text= <code><nowiki>|type= protection</nowiki></code>, page is protected against edits.
}}


* Ambox with no image: <code><nowiki>{{ambox | type = notice | contents = '''Lorem ipsum''' dolor sit amet.}}</nowiki></code>
{{ambox
<br />
|type= notice
{{ambox | type = notice | contents = '''Lorem ipsum''' dolor sit amet.}}
|text= <code><nowiki>|type= notice</nowiki></code>, general notices and minor issues such as {{tl|stub}}
<br />
* Ambox with 2 images and custom style:
<pre><nowiki>
{{ambox
| type    = images
| image    = Copyright.png
| image2  = Red copyright.png
| style    = font-family: Georgia, serif;
| contents = '''Lorem ipsum''' dolor sit amet.
}}
}}
</nowiki></pre>
 
<br />
{{ambox
{{ambox  
|type= approval
| type     = images
|text= <code><nowiki>|type= approval</nowiki></code>, done operations such as {{tl|cleaned}}
| image    = information.png
| image2  = information.png
| style    = font-family: Georgia, serif;
| contents = '''Lorem ipsum''' dolor sit amet.
}}
}}


<noinclude>[[Category:Template documentation|{{BASEPAGENAME}}]]</noinclude>
<includeonly>
[[Category:Admin Templates]]
[[Category:Message Box Templates]]
</includeonly>

Latest revision as of 19:03, 28 February 2014

This template is used in many pages.

History

This template is a derived work. It is, however, NOT exactly the same as Wikipedia's template of the same name! All CSS has been integrated into the template, and therefore some features are not available. However it is still a very useful template!

Usage Instructions

Example to display a notice:

 {{Ambox
 | type  = notice
 | text  = Hello world!
 }}

The code above should return:

There are lots more examples of ambox use on the Wiki labels page.

Amboxes are divided into various types. Each type should have a corresponding colour code. The colour-coding helps to inform of the severity of the issues at a glance, so you can use the following parameters to change the color of your ambox.