Difference between revisions of "Template:Ambox/doc"

From Team Fortress Wiki
Jump to: navigation, search
m (1 revision: Imported from TF2 Wiki.)
(Fixed coloring.)
 
(9 intermediate revisions by 4 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 <nowiki>{{</nowiki>[[Template:Cleanup|Cleanup]]<nowiki>}}</nowiki> 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 ===
The default ambox will display in the center of the page where the template is included. To include default ambox type
+
{| class="wikitable"
<pre>
+
! class="header" | Name
{{Ambox}}
+
! class="header" | Examples
</pre>
+
! class="header" | Description
It is recommended that you include a picture on the ambox by adding an ''image'' property by typing
+
|-
<pre>
+
| colspan="3" | '''''Line colors'''''
{{Ambox|image=Myimage.jpg}}
+
|-
</pre>
+
| rowspan="6" | type
and replacing ''Myimage.jpg'' with your own picture name.
+
| style="border-left: 10px solid #1e90ff;" | ''type = notice'' [default]
 
+
| rowspan="6" | Use the correct value for the message box.
===Parameters===
+
|-
 
+
| style="border-left: 10px solid #ffcc00;" | ''type = style''
{| class="wikitable grid"
+
|-
 +
| style="border-left: 10px solid #f28500;" | ''type = content''
 +
|-
 +
| style="border-left: 10px solid #b22222;" | ''type = delete''
 +
|-
 +
| style="border-left: 10px solid #bba;" | ''type = protection''
 
|-
 
|-
!Name
+
| style="border-left: 10px solid #000000;" | ''type = images''
!Requirement
 
!Options
 
 
|-
 
|-
|type
+
| colspan="3" | '''''Images'''''
|optional
 
|''notice'', ''delete'', ''serious'', <br/>''content'', or ''style'' [''Default: notice'']
 
 
|-
 
|-
 
|image
 
|image
|optional
+
|''Example.png''
|
+
|Places an image on the left of the message box.
 
|-
 
|-
 
|imagewidth
 
|imagewidth
|optional
+
|''56px'' [default]
|[''Default:48px'']
+
|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
|optional
+
|['''deprecated''']
|[''Default:80%'']
+
|''No longer available''
 +
|-
 +
|style
 +
| e.g. ''font-size: 90%;''
 +
| Takes any valid CSS style.
 
|-
 
|-
 
|contents
 
|contents
|optional
+
| (see below)
|
 
|-
 
|style
 
|optional
 
|(takes any valid css style)
 
 
|}
 
|}
  
 +
== Contents ==
 +
Use {{tl|ambox/message}} in the ''contents'' parameter. Example:
  
===Examples===
+
<pre><nowiki>
 +
{{ambox/message
 +
| 1 = Need some help ova here!
 +
| 2 = This article needs cleaning up.
 +
| 3 = You can help by editing it.
 +
}}
 +
</nowiki></pre>
  
<div style="background-color:white;border:solid navy 1px">
+
produces...
{{Ambox}}
 
{|
 
|
 
<pre>
 
<nowiki>
 
{{Ambox}}
 
</nowiki>
 
</pre>
 
|}
 
</div>
 
<br style="clear:both" />
 
  
<div style="background-color:white;border:solid navy 1px">
+
{{ambox/message
{{Ambox|type=notice|contents=This is a standard notice.}}
+
| 1 = Need some help ova here!
{|
+
| 2 = This article needs cleaning up.
|
+
| 3 = You can help by editing it.
<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">
+
== Examples ==
{{Ambox
+
* Ambox with no image: <code><nowiki>{{ambox | type = notice | contents = '''Lorem ipsum''' dolor sit amet.}}</nowiki></code>
|image=Broom.png
+
<br />
|type=style
+
{{ambox | type = notice | contents = '''Lorem ipsum''' dolor sit amet.}}
|contents=
+
<br />
'''This page has been marked for general cleanup'''.<br/>
+
* Ambox with 2 images and custom style:
<small>Please see [[Help:TF2 Wiki style guide|TF2 Wiki style guide]] for information on how to improve this article.</small>
+
<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 />
<pre>
+
{{ambox
<nowiki>
+
| type    = images
{{Ambox
+
| image   = Copyright.png
|image=Broom.png
+
| image2  = Red copyright.png
|type=style
+
| style   = font-family: Georgia, serif;
|contents=
+
| contents = '''Lorem ipsum''' dolor sit amet.
'''This page has been marked for general cleanup'''.<br/>
 
<small>Please see [[Help:TF2 Wiki style guide|TF2 Wiki style guide]]
 
for information on how to improve this article.</small>
 
 
}}
 
}}
</nowiki>
 
</pre>
 
|}
 
</div>
 
<br style="clear:both" />
 
 
<div style="background-color:white;border:solid navy 1px">
 
{{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>
 
}}
 
{|
 
|
 
<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>
 
 
*[[Template:Infobox class]]
 
*[[Template:Infobox map]]
 
 
<noinclude>
 
[[Category:Template documentation|{{PAGENAME}}]]
 
  
[[Category:Every page]]</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.
}}