Template:Ambox: Difference between revisions

Jump to navigation Jump to search
Want an adless experience? Log in or Create an account.
m
Text replacement - "<br>" to "<br/>"
mNo edit summary
m (Text replacement - "<br>" to "<br/>")
 
(32 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly><css>
<onlyinclude>
table.ambox-header {
{| class="ambox {{#ifeq: {{{1|}}}|section|ambox-small}} ambox-{{#switch: {{{type|}}}
  width: 80%;
   | content = content | style = style
   height: 100px
   | delete = delete | move = move
   margin: 1em auto 1em auto;
   | protection = protection | notice | #default = notice
   vertical-align: top;
   }}"
   text-align: left;
| class="ambox-image" | {{#if:{{{image|}}}
}
  | {{{image}}}
td.ambox-header { width: 100px; }
   | [[File:Ambox-{{#switch: {{{type|}}}
table.ambox-inline {
    | content = content | style = style
   width: 40%;
    | delete = delete | move = move
  height: 50px;
    | protection = protection | notice | #default = notice
  margin: 1em auto 1em auto;
    }}.png|40x40px|link=|alt=]]
  vertical-align: top;
   }}
   text-align: center;
| class="ambox-text" | {{{text}}}
}
|}</onlyinclude>
td.ambox-inline { width: 50px; }
</css><!--


==Purpose==
'''Ambox''' is a meta-template used to create different types of amboxes. Amboxes are used to describe issues or information about articles. They can be placed at the top of an article to describe the entire article, or smaller versions can be used within sections. According to the [[Help:Format|formatting guide]], amboxes are the second things to appear in an article or section, just below {{Temlink|Hatnote|Hatnotes}}.
==Usage==
{{Usage/Block|type|image|text}}
{{Usage/Param|type|Which category the ambox falls under. The available types are listed below.}}
{{Usage/Param|image|An image to override the default image for that type.|optional|depends on type}}
{{Usage/Param|text|The contents of the message.}}
For use in a section rather than at the top of an article, pass "section" as an anonymous parameter. This will remove the image and make the ambox narrower, like so: {{Ambox|section|type=notice|text=This is a small ambox. It is used within sections, rather than at the top of an article.}}
{{Clear}}
===Ambox Types===
====Maintenance====
{{Ambox|type=delete|text=type=<u>delete</u>, used for articles being considered for deletion.}}
{{Ambox|type=content|text=type=<u>content</u>, used for articles or sections with content problems.}}
{{Ambox|type=style|text=type=<u>style</u>, used for articles or sections with style problems.}}
{{Ambox|type=move|text=type=<u>move</u>, used for articles being considered for moves, merges, etc.}}
====Information====
{{Ambox|type=notice|text=type=<u>notice</u>, used to display information about the article or section.}}
{{Ambox|type=protection|text=type=<u>protection</u>, used to display protection information.}}


-->{| class="ambox-{{{type}}}" style="border: 1px solid {{#if: {{{color|}}}|{{{color}}}|black}};"
===Common Amboxes===
|-
These are some commonly used amboxes which use this meta-template. For a full up-to-date list of available amboxes, see {{Catlink|Ambox Templates}}.
{{#ifeq: {{{type|}}}|header
  |{{!}} width="5px" style="background: {{#if: {{{color|}}}|{{{color}}}|black}}" {{!}}}}
| class="ambox-{{{type}}}" | {{{image}}}
| {{#if: {{{header|}}}
  | <div style="color: {{#if: {{{color|}}}|{{{color}}}|black}}">'''{{{header}}}'''</div>
  }}{{{1}}}
{{#ifeq: {{{type|}}}|inline
  |{{!}} class="ambox-inline" {{!}} {{{image}}}}}
|}</includeonly><noinclude>
{{Ambox|type=header
|color=green
|image=[[File:largeimage.png]]
|header=Example
|This is an example header AMbox<br>It's large and appears at the top of articles.
}}


{{Ambox|type=inline
{| class="wikitable"
|color=red
! colspan=4 | Maintenance || colspan=2 | Information
|image=[[File:smallimage.png]]
|-
|This inline AMbox is used to mark off sections of an article.
! style="background-color: red;" | delete
}}
! style="background-color: orange;" | content
==Purpose==
! style="background-color: yellow;" | style
Ambox (Article Message Box) is a meta-template used to create various specific Amboxes.  It allows for the creation of two different types:
! style="background-color: green;" | move
*Header Amboxes are put at the top of an article to describe the entire article. (e.g. The article is about an unreleased game.)
! style="background-color: #5a7db5;" | notice
*Inline Amboxes are used within the body of an article to mark off sections. Inline Amboxes should have a /End template to designate when the message no longer applies. (e.g. This section of the article involves fan theories.)
! style="background-color: gray;" | protection
|-
| {{Temlink|Delete}}
| {{Temlink|Stub}}
{{Temlink|Focus}}
| {{Temlink|Perspective}}
| {{Temlink|Merge}}
| {{Temlink|Spoiler}}
{{Temlink|IncInterview}}<br/>
{{Temlink|Policy}}
| {{Temlink|Editing}}
|}


==Usage==
<pre>
{{Ambox|type=
|color=
|image=
|header=
|Descriptive Text Here
}}
</pre>
'''color''' and '''header''' are optional. '''Type''' can be either ''header'' or ''inline''. Include the last pipe even if there's no description (enter a blank description).


{{Cat|Formatting Templates}}
{{Cat|Formatting Templates}}
{{Cat|Ambox Templates}}
{{Cat|Ambox Templates}}
</noinclude>

Navigation menu