Difference between revisions of "Template:Ambox/doc"

From Team Fortress Wiki
Jump to: navigation, search
(cleanup)
(Fixed coloring.)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
An '''article message box''', or '''ambox''', can be added to notify users of specific messages regarding the article. The {{tl|cleanup}} template is an example of an ambox.
+
An '''ambox''', or '''article message box''', can be added to notify users of specific messages regarding the article. The {{tl|cleanup}} template is an example of an ambox.
  
 
== Usage ==
 
== Usage ==
 
=== All parameters ===
 
=== All parameters ===
 
+
{| class="wikitable"
{| class="wikitable grid"
+
! class="header" | Name
! Name
+
! class="header" | Examples
! Examples
+
! class="header" | Description
 +
|-
 +
| colspan="3" | '''''Line colors'''''
 +
|-
 +
| rowspan="6" | type
 +
| style="border-left: 10px solid #1e90ff;" | ''type = notice'' [default]
 +
| rowspan="6" | Use the correct value for the message box.
 +
|-
 +
| style="border-left: 10px solid #ffcc00;" | ''type = style''
 +
|-
 +
| style="border-left: 10px solid #f28500;" | ''type = content''
 +
|-
 +
| style="border-left: 10px solid #b22222;" | ''type = delete''
 +
|-
 +
| style="border-left: 10px solid #bba;" | ''type = protection''
 +
|-
 +
| style="border-left: 10px solid #000000;" | ''type = images''
 
|-
 
|-
|type
+
| colspan="3" | '''''Images'''''
|''notice'' [default], ''delete'', ''serious'', <br />''content'', ''style'', ''images'', ''protection''
 
 
|-
 
|-
 
|image
 
|image
 
|''Example.png''
 
|''Example.png''
 +
|Places an image on the left of the message box.
 
|-
 
|-
 
|imagewidth
 
|imagewidth
 
|''56px'' [default]
 
|''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
 
|width
 
|['''deprecated''']
 
|['''deprecated''']
 +
|''No longer available''
 
|-
 
|-
 
|style
 
|style
| [''any valid CSS style'']
+
| e.g. ''font-size: 90%;''
 +
| Takes any valid CSS style.
 
|-
 
|-
 
|contents
 
|contents
|  
+
| (see below)
 
|}
 
|}
  
=== Examples ===
+
== Contents ==
<div style="background-color:white;border:solid navy 1px">
+
Use {{tl|ambox/message}} in the ''contents'' parameter. Example:
{{Ambox}}
+
 
{|
+
<pre><nowiki>
|
+
{{ambox/message
<pre>
+
| 1 = Need some help ova here!
<nowiki>
+
| 2 = This article needs cleaning up.
{{Ambox}}
+
| 3 = You can help by editing it.
</nowiki>
+
}}
</pre>
+
</nowiki></pre>
|}
 
</div>
 
<br style="clear:both" />
 
  
<div style="background-color:white;border:solid navy 1px">
+
produces...
{{Ambox|type=notice|contents=This is a standard notice.}}
 
{|
 
|
 
<pre>
 
<nowiki>
 
{{Ambox|type=notice|contents=This is a standard notice.}}
 
</nowiki>
 
</pre>
 
|}
 
</div>
 
<br style="clear:both" />
 
  
<div style="background-color:white;border:solid navy 1px">
+
{{ambox/message
{{Ambox
+
| 1 = Need some help ova here!
|image=Broom.png
+
| 2 = This article needs cleaning up.
|type=style
+
| 3 = You can help by editing it.
|contents=
 
'''This page has been marked for general cleanup'''.<br/>
 
<small>Please see [[Help:Team Fortress Wiki style guide|Team Fortress Wiki style guide]] for information on how to improve this article.</small>
 
 
}}
 
}}
{|
+
 
|
+
== Examples ==
<pre>
+
* Ambox with no image: <code><nowiki>{{ambox | type = notice | contents = '''Lorem ipsum''' dolor sit amet.}}</nowiki></code>
<nowiki>
+
<br />
{{Ambox
+
{{ambox | type = notice | contents = '''Lorem ipsum''' dolor sit amet.}}
|image=Broom.png
+
<br />
|type=style
+
* Ambox with 2 images and custom style:
|contents=
+
<pre><nowiki>
'''This page has been marked for general cleanup'''.<br/>
+
{{ambox
<small>Please see [[Help:{{subst:SITENAME}} style guide|{{subst:SITENAME}} style guide]]
+
| type    = images
for information on how to improve this article.</small>
+
| image    = Copyright.png
 +
| image2  = Red copyright.png
 +
| style   = font-family: Georgia, serif;
 +
| contents = '''Lorem ipsum''' dolor sit amet.
 
}}
 
}}
</nowiki>
+
</nowiki></pre>
</pre>
+
<br />
|}
+
{{ambox
</div>
+
| type     = images
<br style="clear:both" />
+
| image   = Copyright.png
 
+
| image2  = Red copyright.png
<div style="background-color:white;border:solid navy 1px">
+
| style    = font-family: Georgia, serif;
{{Ambox
+
| contents = '''Lorem ipsum''' dolor sit amet.
|type=content
 
|image=Discussion.gif
 
|contents='''This page has been marked for an open review'''.<br/>
 
<small>Please see the discussion pages for additional information your opinion is welcome.</small>
 
 
}}
 
}}
{|
 
|
 
<pre>
 
<nowiki>
 
{{Ambox
 
|type=content
 
|image=Discussion.gif
 
|contents='''This page has been marked for an open review'''.<br/>
 
<small>Please see the discussion pages for additional information your opinion is welcome.</small>
 
}}</nowiki>
 
</pre>
 
|}
 
</div>
 
  
<br style="clear:both" />
 
 
<div style="background-color:white;border:solid navy 1px">
 
{{Ambox
 
|type=delete
 
|style=background-color:#FFF0EA;
 
|image=Icon_trash.png
 
|contents=
 
'''This article has been marked for deletion'''.<br/>
 
'''Reason''': No one other than its original author has made substantial edits to this page.}}
 
{|
 
|
 
<pre>
 
<nowiki>
 
{{Ambox
 
|type=delete
 
|style=background-color:#FFF0EA;
 
|image=Icon_trash.png
 
|contents=
 
'''This article has been marked for deletion'''.<br/>
 
'''Reason''': No one other than its original author has made substantial edits to this page.}}
 
</nowiki>
 
</pre>
 
|}
 
</div>
 
 
<noinclude>[[Category:Template documentation|{{BASEPAGENAME}}]]</noinclude>
 
<noinclude>[[Category:Template documentation|{{BASEPAGENAME}}]]</noinclude>

Latest revision as of 15:47, 4 November 2014

An ambox, or article message box, can be added to notify users of specific messages regarding the article. The {{cleanup}} template is an example of an ambox.

Usage

All parameters

Name Examples Description
Line colors
type type = notice [default] Use the correct value for the message box.
type = style
type = content
type = delete
type = protection
type = images
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.
Other
width [deprecated] No longer available
style e.g. font-size: 90%; Takes any valid CSS style.
contents (see below)

Contents

Use {{ambox/message}} in the contents parameter. Example:

{{ambox/message
| 1 = Need some help ova here!
| 2 = This article needs cleaning up.
| 3 = You can help by editing it.
}}

produces...

“Need some help ova here!”
This article needs cleaning up.
You can help by editing it.

Examples

  • Ambox with no image: {{ambox | type = notice | contents = '''Lorem ipsum''' dolor sit amet.}}



  • Ambox with 2 images and custom style:
{{ambox 
| type     = images
| image    = Copyright.png
| image2   = Red copyright.png
| style    = font-family: Georgia, serif;
| contents = '''Lorem ipsum''' dolor sit amet.
}}