Zum Inhalt springen

Vorlage:Ambox/Doku: Unterschied zwischen den Versionen

Adding some minor text improvements, copied from the docs of the newer mboxes. And about escaping special characters: Changed to proper escaping of pipe, and explaining the div tags.
imported>Mayalld
K (Reverted 5 edits by Mjoh02 identified as vandalism to last revision by Edokter. (TW))
imported>Davidgothberg
(Adding some minor text improvements, copied from the docs of the newer mboxes. And about escaping special characters: Changed to proper escaping of pipe, and explaining the div tags.)
Zeile 131: Zeile 131:
| 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 = CSS value
| style = CSS values
| textstyle = CSS value
| textstyle = CSS values
| text  = The message body text.  
| text  = The message body text.  
}}
}}
Zeile 154: Zeile 154:


'''style'''
'''style'''
:An optional [[Cascading Style Sheets|CSS]] value used by the entire article message box table. Without quotation marks <code>" "</code>. For example:
:Optional [[Cascading Style Sheets|CSS]] values used by the entire message box table. Without quotation marks <code>" "</code> but with the ending semicolons <code>;</code>. For example:
::<code>style = margin-bottom: 0.5em;</code>
::<code>style = margin-bottom: 0.5em;</code>


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


Zeile 172: Zeile 172:
| text  = <div>
| text  = <div>
Equal sign = and a start and end brace { } work fine as they are.  
Equal sign = and a start and end brace { } work fine as they are.  
But here is a pipe {{!}} and two end braces &lt;nowiki>}}&lt;/nowiki>.  
But here is a pipe &amp;#124; and two end braces &lt;nowiki>}}&lt;/nowiki>.  
And now a pipe and end braces &lt;nowiki>|}}&lt;/nowiki>.
And now a pipe and end braces &lt;nowiki>|}}&lt;/nowiki>.
</div>
</div>
Zeile 181: Zeile 181:
| text  = <div>
| text  = <div>
Equal sign = and a start and end brace { } work fine as they are.  
Equal sign = and a start and end brace { } work fine as they are.  
But here is a pipe {{!}} and two end braces <nowiki>}}</nowiki>.  
But here is a pipe &#124; and two end braces <nowiki>}}</nowiki>.  
And now a pipe and end braces <nowiki>|}}</nowiki>.
And now a pipe and end braces <nowiki>|}}</nowiki>.
</div>
</div>
}}
}}


The <code>&lt;div></code> tags that surround the text in the example above are usually not needed. But if the text contains line breaks then sometimes we get weird line spacing. This especially happens when using vertical dotted lists. Then use the div tags to fix that.


This template uses CSS classes in [[MediaWiki:Common.css]] for most of its looks, thus it is fully skinnable.  
This template uses CSS classes in [[MediaWiki:Common.css]] for most of its looks, thus it is fully skinnable.  


Internally this meta-template uses HTML markup instead of wiki markup for the table code. That is the usual way we make meta-templates since wiki markup has several drawbacks. For instance it makes it harder to use [[m:Help:ParserFunctions|parser functions]] and special characters in parameters.  
Internally this meta-template uses HTML wikimarkup instead of wikimarkup for the table code. That is the usual way we make meta-templates since wikimarkup has several drawbacks. For instance it makes it harder to use [[m:Help:ParserFunctions|parser functions]] and some special characters in parameters.  


The default images for this meta-template are in png format instead of svg format. The main reason is that some older web browsers have trouble with the transparent background that MediaWiki renders for svg images. The png images here have hand optimised transparent background colour so they look good in all browsers. Note that svg icons only look somewhat bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons.
The default images for this meta-template are in png format instead of svg format. The main reason is that some older web browsers have trouble with the transparent background that MediaWiki renders for svg images. The png images here have hand optimised transparent background colour so they look good in all browsers. Note that svg icons only look somewhat bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons.


For more technical details see the [[{{TALKPAGENAME}}|talk page]] and the "See also" links below.
For more technical details see the [[Template talk:Ambox|talk page]] and the "See also" links below. Since this template works almost exactly like {{tl|tmbox}}, {{tl|imbox}}, {{tl|cmbox}} and {{tl|ombox}} their talk pages and related pages might also contain more details.


=== See also ===
=== See also ===
Zeile 203: Zeile 204:
* {{tl|cmbox}} – For category message boxes.
* {{tl|cmbox}} – For category message boxes.
* {{tl|ombox}} – For other pages message boxes.
* {{tl|ombox}} – For other pages message boxes.
* {{tl|mbox}} – Has namespace detection, for message boxes that are used on several types of pages and thus need to change style depending on what page they are used on.
Closely related meta-templates:
* {{tl|fmbox}} – For header and footer message boxes.
* {{tl|fmbox}} – For header and footer message boxes.
* {{tl|mbox}} – Has namespace detection, for message boxes that are used on several types of pages and thus need to change style depending on what page they are used on.
* {{tl|dmbox}} – For disambiguation and set index message boxes.


Other pages:
Other pages:
Anonymer Benutzer