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>{{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 | 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]] | 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: | | 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: | | 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 = | | type = delete | ||
| text = type=<u> | | text = type=<u>delete</u> – Deletion issues, such as {{tl|afd}} and {{tl|prod}}. | ||
}} | }} | ||
{{ambox | {{ambox | ||
Zeile 54: | Zeile 55: | ||
}} | }} | ||
{{ambox | {{ambox | ||
| type = | | type = notice | ||
| text = type=<u> | | 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 = | | type = protection | ||
| text = type=<u> | | 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 = | | type = move | ||
| image = [[Image:Merge-arrows.svg|50px]] | | image = [[Image:Merge-arrows.svg|50px]] | ||
| text = type = | | 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 = | | 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 = | | 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'' | :An optional [[Cascading Style Sheets|CSS]] value used by the entire ''article message box'' table. Without quotation marks <code>" "</code>. For example: | ||
::<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 === |