Шаблон:Mbox — различия между версиями

Материал из Аэроскан Сервис
Перейти к: навигация, поиск
(Changed "text = {{{text|}}}" to "text = {{{text}}}" so that the empty box displays "{{{text}}}".)
м (Dialog-information on.svg)
Строка 1: Строка 1:
{{
+
<includeonly><table class="metadata plainlinks noprint" style="{{{style|width:90%; margin:0px auto; background:#f8fcff; border:1px solid #aaa;}}} border-left:10px solid {{#switch:{{{type|}}}
  {{namespace detect
+
   | warning  = #b22222
  | demospace = {{{demospace|}}}
+
   | serious  = #b22222
   | main      = ambox
+
   | content  = #f28500
   | talk      = tmbox
+
  | style    = #f4c430
   | image     = imbox
+
  | merge    = #9932cc
   | category  = cmbox
+
  | move     = #9932cc
   | other     = ombox
+
   | notice  = #1e90ff
   }}
+
  | growth  = #228b22
| type      = {{{type|}}}
+
   | idea     = yellow
| image     = {{{image|}}}
+
   | query    = #ffb734
| imageright = {{{imageright|}}}
+
  |#default  = #1e90ff
| style      = {{{style|}}}
+
}};">
| textstyle = {{{textstyle|}}}
+
<tr style="vertical-align:middle;">{{#ifeq:{{{image|yes}}}|none
| text      = {{{text}}}
+
|<!-- no image cell -->
| small      = {{{small|}}}
+
|<td style="padding:0.3em; text-align:center; vertical-align:middle; width:45px;">
| smallimage = {{{smallimage|}}}
+
{{#if:{{{image|}}}|[[Image:{{{image}}}|{{{size|40x40px}}}]]|{{#switch:{{{type|}}}
| smallimageright = {{{smallimageright|}}}
+
| warning  = [[Image:Stop hand nuvola.svg|{{{size|40x40px}}}]]
| smalltext = {{{smalltext|}}}
+
| serious  = [[Image:Stop hand nuvola.svg|{{{size|40x40px}}}]]
}}<noinclude>
+
| content  = [[Image:Book important2.svg|{{{size|45x45px}}}]]
 +
| style   = [[Image:Applications-office.svg|{{{size|40x40px}}}]]
 +
| merge    = [[Image:Merge-split-transwiki default.svg|{{{size|40x40px}}}]]
 +
  | move    = [[Image:Merge-split-transwiki default.svg|{{{size|40x40px}}}]]
 +
| notice  = [[Image:Book notice.svg|{{{size|40x40px}}}]]
 +
| growth  = [[Image:Nuvola apps bookcase.svg|{{{size|40x40px}}}]]
 +
| idea    = [[Image:Dialog-information on.svg|{{{size|40x40px}}}]]
 +
| query    = [[Image:Torchlight help yellow.png|{{{size|40x40px}}}]]
 +
| blank    = <!-- empty image cell -->
 +
|#default = [[Image:Book notice.svg|{{{size|40x40px}}}]]}}}}</td>}}
 +
<td style="{{{text style|color:black; vertical-align:middle; padding:0.5em; padding-left:0em; width:90%;}}}">
 +
{{{1|{{{msg|{{{text|''Enter Text''}}}}}}}}}
 +
</td>
 +
{{#if:{{{imageright|}}}|<td>{{{imageright}}}</td>}}
 +
</tr></table></includeonly><noinclude>
 +
== Usage ==
  
{{pp-template|small=yes}}
+
This template is used to create other templates with a consistent visual style. Messages will be color coded to demonstrate their type and severity. The types of message are described as:
{{Documentation}}
+
 
<!-- Add categories and interwikis to the /doc subpage, not here! -->
+
<nowiki>{{mbox|type=<TYPE>|text=<TEXT>}}</nowiki>
 +
 
 +
Where <TYPE> can be one of the following:
 +
 
 +
{{msg:mbox|type=warning|text=warning or serious}}
 +
{{msg:mbox|type=content|text=content}}
 +
{{msg:mbox|type=style|text=style}}
 +
{{msg:mbox|type=merge|text=merge or move}}
 +
{{msg:mbox|type=notice|text=notice}}
 +
{{msg:mbox|type=growth|text=growth}}
 +
{{msg:mbox|type=idea|text=idea}}
 +
{{msg:mbox|type=query|text=query}}
 +
 
 +
the default images can be suppressed by specifying "image=none", or "image=<IMAGE>", where <IMAGE> is a replacement image link. Examples of how this template is used are located on [[Wikibooks:Template messages]].
 
</noinclude>
 
</noinclude>

Версия 17:50, 15 сентября 2008

Usage

This template is used to create other templates with a consistent visual style. Messages will be color coded to demonstrate their type and severity. The types of message are described as:

{{mbox|type=<TYPE>|text=<TEXT>}}

Where <TYPE> can be one of the following:

This message box is using an invalid "type=warning" parameter and needs fixing.
This message box is using an invalid "type=merge" parameter and needs fixing.
This message box is using an invalid "type=growth" parameter and needs fixing.
This message box is using an invalid "type=idea" parameter and needs fixing.
This message box is using an invalid "type=query" parameter and needs fixing.

the default images can be suppressed by specifying "image=none", or "image=<IMAGE>", where <IMAGE> is a replacement image link. Examples of how this template is used are located on Wikibooks:Template messages.