Template:Ambox/doc:修订间差异

 
(清空页面)
标签清空
 
(未显示另一用户的1个中间版本)
第1行: 第1行:
<includeonly>{{template doc page transcluded}}</includeonly><noinclude>{{template doc page viewed directly}}</noinclude>
   <!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
{| class="wikitable" align="right" style="margin: 0px 0px 5px 5px; background: #fbfbfb;"
|-
! style="background: #000000;" | &nbsp;
! style="padding: 0.25em 0.5em;" | Code
! Name
! Description
|- style="background: #FEE;"
| style="background: #b22222;" | &nbsp;
| style="padding: 0.25em 0.5em;" | #b22222
| '''Speedy'''
| Immediate deletion
|-
| style="background: #b22222;" | &nbsp;
| style="padding: 0.25em 0.5em;" | #b22222
| '''Deletion'''
| Full-discussion deletion; proposed deletion
|-
| style="background: #f28500;" | &nbsp;
| style="padding: 0.25em 0.5em;" | #f28500
| '''Content'''
| Problems with the content of an article, i.e., what the article actually says
|-
| style="background: #f4c430;" | &nbsp;
| style="padding: 0.25em 0.5em;" | #f4c430
| '''Style'''
| Problems not with the content, but how it is formatted/presented
|-
| style="background: #1e90ff;" | &nbsp;
| style="padding: 0.25em 0.5em;" | #1e90ff
| '''Notice'''
| Information readers/editors should be aware of
|-
| style="background: #9932cc;" | &nbsp;
| style="padding: 0.25em 0.5em;" | #9932cc
| '''Move'''
| Merge, split and transwiki proposals
|-
| style="background: #bbbbaa;" | &nbsp;
| style="padding: 0.25em 0.5em;" | #bba
| '''Protection'''
| Page is locked against edits
|-
! style="background: #000000;" | &nbsp;
| style="padding: 0.25em 0.5em;" | #000000
| '''Other'''
| Archives and other things
|}
'''''Ambox''''', short for article message box, is a message box management template.


[[:Category:Amboxes]] contains Ambox and Ambox information.
== Parameters ==
List of all parameters:
<pre>
{{ambox
| type  = speedy / delete / content / style / notice / move / protection / other
| image = none / [[File:...|40px|...]]
| imageright = [[File:...|40px|...]]
| style = CSS values
| textstyle = CSS values
| text  = The message body text.
| small = {{{small|}}} / left
| smallimage = none / [[File:...|20px|...]]
| smallimageright = none / [[File:...|20px|...]]
| smalltext  = A shorter message body text.
}}
</pre>
'''type'''
:If no '''type''' parameter is given the template defaults to type '''notice'''. That means it gets a blue side bar. The eight available types and their default images are shown below.
{{ambox
| type  = speedy
| text = type = speedy
}}
{{ambox
| type  = delete
| text = type  = delete
}}
{{ambox
| type  = content
| text = type  = content
}}
{{ambox
| type  = style
| text = type  = style
}}
{{ambox
| type  = notice
| text = type  = notice
}}
{{ambox
| type  = move
| text = type  = move
}}
{{ambox
| type  = protection
| text = type  = protection
}}
{{ambox
| type  = other
| text = type  = other
}}
'''image'''
:'''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. Widths of 40px - 50px are usually about right. (Images over 52 pixels wide will cause padding problems.)
:'''none''' = Means that no image is used.
'''imageright'''
:'''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. (Images over 52 pixels width will cause padding problems.)
:'''Anything''' = Any other object that you want to show on the right side.
'''style'''
:Optional 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>
'''textstyle'''
:Optional CSS values used by the text cell. For example:
::<code>textstyle = text-align: center;</code>
'''text'''
:The message body text.
==== The Small Parameters ====
The small article message boxes are meant for the top of sections. Normally they should only contain one or two lines of text.
'''small'''
:'''left''' = Makes it a smaller left aligned message box. This also makes the default images smaller. Note that any data fed to the '''smallimage''', '''smallimageright''' and '''smalltext''' parameters is only used if "small=left". To make it so your template also understands the small parameter you can use this code:
::<code><nowiki>small = {{{small|}}}</nowiki></code>
{{ambox
| small = left
| text = small = left
}}
{{ambox
| type = style
| small = left
| text = type = style <br> small = left
}}
'''smallimage'''
:'''No parameter''' = If no '''smallimage''' parameter is given then this template falls back to use the '''image''' parameter. If the '''image''' parameter also is empty then a small default image is used.
:'''An image''' = Should be an image with usual wiki notation. 20px width is usually about right for boxes with one line of text, while 25px width is usually about right for boxes with two lines of text. For example:
::<code><nowiki>smallimage = [[File:Gnome globe current event.svg|20px|alt=Clock over a larger globe]]</nowiki></code>
:'''none''' = Means that no image is used. This overrides any image fed to '''image''', when "small=left".
'''smallimageright'''
:'''No parameter''' = If no '''smallimageright''' parameter is given then this template falls back to use the '''imageright''' parameter. If the '''imageright''' parameter also is empty then no image is shown on the right side.
:'''An image''' = Should be an image with usual wiki notation. 20px - 25px width is usually about right.
:'''Anything''' = Any other object that you want to show on the right side.
:'''none''' = Means that no right side image is used. This overrides any image fed to '''imageright''', when "small=left".
'''smalltext'''
:A shorter version of the message body text. If no '''smalltext''' parameter is given then this template falls back to use the '''text''' parameter.
== Examples ==
=== Usage ===
Simple usage example:
<pre>
{{ambox | text = Some text.}}
</pre>
{{ambox | text = Some text.}}<noinclude>
<small>This page was moved from [[paradoxwikis:ck3:Template:Ambox/doc]]. Its edit history can be viewed at [[Template:Ambox/doc/edithistory]]</small></noinclude>

2020年12月14日 (一) 13:27的最新版本