Vorlage:Ambox/Doku: Unterschied zwischen den Versionen

New doc from /sandbox/doc, contains the new parameters in the new ambox version and other fixes.
imported>Trixt
K (+interwiki it)
imported>Davidgothberg
(New doc from /sandbox/doc, contains the new parameters in the new ambox version and other fixes.)
Zeile 1: Zeile 1:
{{documentation subpage}}<includeonly>{{pp-template|small=yes}}{{intricate template}}</includeonly>
{{Documentation subpage}}
<includeonly>{{intricate template}}</includeonly>
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->


This is the '''ambox''' or '''article message box''' meta template.
This is the {{tl|ambox}} or '''article message box''' meta-template.


It is used to create ''article message box'' templates such as {{tl|wikify}} etc. It offers several different colours, uses default images if no image parameter is given and it has some other features.
It is used to create ''article message box'' templates such as {{tl|wikify}} etc. It offers several different colours, uses default images if no image parameter is given and it has some other features.


This meta template is just a thin wrapper for the ambox CSS classes in [[MediaWiki:Common.css]]. The classes can also be used directly in a [[Help:Table|wikitable]], especially if special functionality is needed. See the [[Wikipedia:Ambox CSS classes|how-to guide]] for that.
This meta template is just a thin wrapper for the ambox CSS classes in [[MediaWiki:Common.css]]. The classes can also be used directly in a [[Help:Table|wikitable]] if special functionality is needed. See the [[Wikipedia:Ambox CSS classes|how-to guide]] for that.


=== Usage ===
=== Usage ===
Zeile 24: Zeile 25:
{{ambox
{{ambox
| type  = style
| type  = style
| image = [[Image:Icon apps query.svg|38px]]
| image = [[Image:Ambox emblem question yellow.svg|38px]]
| style = width: 400px; color: red; font-weight: bold; font-style: italic
| style = width: 400px; color: red; font-weight: bold; font-style: italic;
| text  = The message body text.
| text  = The message body text.
}}
}}
Zeile 32: Zeile 33:
{{ambox
{{ambox
| type  = style
| type  = style
| image = [[Image:Icon apps query.svg|38px]]
| image = [[Image:Ambox emblem question yellow.svg|38px]]
| style = width: 400px; color: red; font-weight: bold; font-style: italic
| style = width: 400px; color: red; font-weight: bold; font-style: italic;
| text  = The message body text.
| text  = The message body text.
}}
}}
Zeile 42: Zeile 43:


{{ambox
{{ambox
| type  = serious
| type  = delete
| text  = type=<u>serious</u> – Deletion issues, such as {{tl|afd}} and {{tl|prod}}.
| text  = type=<u>delete</u> – Deletion issues, such as {{tl|afd}} and {{tl|prod}}.
}}
}}
{{ambox
{{ambox
Zeile 54: Zeile 55:
}}
}}
{{ambox
{{ambox
| type  = merge
| type  = notice
| text  = type=<u>merge</u> – Merge, split and transwiki proposals, such as {{tl|split}} and {{tl|copy to wiktionary}}.  
| text  = type=<u>notice</u> – Article notices, such as {{tl|current}} and {{tl|inuse}}.
}}
{{ambox
| type  = move
| text  = type=<u>move</u> – Merge, split and transwiki proposals, such as {{tl|split}} and {{tl|copy to wiktionary}}.  
}}
}}
{{ambox
{{ambox
| type  = notice
| type  = protection
| text  = type=<u>notice</u> – Article notices, such as {{tl|current}} and {{tl|inuse}}.  
| text  = type=<u>protection</u> – Protection notices, such as {{tl|pp-vandalism}} and {{tl|pp-semi-protected}}.
}}
}}


==== Other images ====
==== Other images ====
The default images shown above are mostly for convenience. In many cases it is more appropriate to use more specific images. These examples use the '''image''' parameter to specify an image other than the default images.
The default images shown above are mostly for convenience. In many cases it is more appropriate to use more specific images. These examples use the '''image''' parameter to specify an image other than the default images.


Zeile 76: Zeile 82:
}}
}}
{{ambox
{{ambox
| type  = merge
| type  = move
| image = [[Image:Merge-arrows.svg|50px]]
| image = [[Image:Merge-arrows.svg|50px]]
| text  = type = merge <br> image = <nowiki>[[Image:Merge-arrows.svg|50px]]</nowiki> <br> This image is used for {{tl|merge}} etc.  
| text  = type = move <br> image = <nowiki>[[Image:Merge-arrows.svg|50px]]</nowiki> <br> This image is used for {{tl|merge}} etc.  
}}
}}


Zeile 116: Zeile 122:
<pre>
<pre>
{{ambox
{{ambox
| type  = serious / content / style / merge / notice
| type  = delete / content / style / notice / move / protection
| image = none / blank / [[Image:Some image.svg|40px]]
| image = none / blank / [[Image:Some image.svg|40px]]
| imageright = [[Image:Some image.svg|40px]]
| imageright = [[Image:Some image.svg|40px]]
| style = Cascading Style Sheets value
| style = CSS value
| text  = The message body text.  
| text  = The message body text.  
| textstyle = CSS value
}}
}}
</pre>
</pre>
Zeile 130: Zeile 137:
:'''No parameter''' = If no '''image''' parameter is given the template uses a default image. Which default image it uses depends on the '''type''' parameter.  
:'''No parameter''' = If no '''image''' parameter is given the template uses a default image. Which default image it uses depends on the '''type''' parameter.  
:'''An image''' = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. For example:  
:'''An image''' = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. For example:  
::<code><nowiki>[[Image:Unbalanced scales.svg|40px]]</nowiki></code>
::<code><nowiki>image = [[Image:Unbalanced scales.svg|40px]]</nowiki></code>
:'''none''' = Means that no image is used.
:'''none''' = Means that no image is used.
:'''blank''' = Means that no image is used but an empty area the same size as a default image is used, which means that text in the message box gets aligned well with other article message boxes. (See the "special" examples above.)
:'''blank''' = Means that no image is used but an empty area the same size as a default image is used, which means that text in the message box gets aligned well with other article message boxes. (See the "special" examples above.)
Zeile 137: Zeile 144:
:'''No parameter''' = If no '''imageright''' parameter is given then no image is shown on the right side.
:'''No parameter''' = If no '''imageright''' parameter is given then no image is shown on the right side.
:'''An image''' = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. For example:  
:'''An image''' = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. For example:  
::<code><nowiki>[[Image:Nuvola apps bookcase.png|40px]]</nowiki></code>
::<code><nowiki>imageright = [[Image:Nuvola apps bookcase.png|40px]]</nowiki></code>
:'''Anything''' = Any other object that you want to show on the right side.
:'''Anything''' = Any other object that you want to show on the right side.


'''style'''
'''style'''
:An optional [[Cascading Style Sheets]] value used by ''article message box'' enclosing HTML:
:An optional [[Cascading Style Sheets|CSS]] value used by the entire ''article message box'' table. Without quotation marks <code>" "</code>. For example:
::<code>&lt;table style="{{((}}{'''style'''{{!}}{{))}}}" class="..."&gt; ... &lt;/table&gt;</code>
::<code>style = margin-bottom: 0.5em;</code>


'''text'''
'''text'''
:The message body text.
:The message body text.
'''textstyle'''
:An optional [[Cascading Style Sheets|CSS]] value used by the text cell. For example:
::<code>textstyle = text-align: center;</code>


=== Technical details ===
=== Technical details ===
Anonymer Benutzer