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

Материал из Аэроскан Сервис
Перейти к: навигация, поиск
м (Dialog-information on.svg)
(using css classes now)
Строка 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|}}}
+
<includeonly><table class="plainlinks noprint messagebox {{{type|notice}}}" {{#if:{{{style|}}}|style="{{{style}}}"}}>
  | warning  = #b22222
+
  | serious  = #b22222
+
  | content  = #f28500
+
  | style   = #f4c430
+
  | merge    = #9932cc
+
  | move    = #9932cc
+
  | notice  = #1e90ff
+
  | growth  = #228b22
+
  | idea    = yellow
+
  | query    = #ffb734
+
  |#default  = #1e90ff
+
}};">
+
 
<tr style="vertical-align:middle;">{{#ifeq:{{{image|yes}}}|none
 
<tr style="vertical-align:middle;">{{#ifeq:{{{image|yes}}}|none
 
  |<!-- no image cell -->
 
  |<!-- no image cell -->
Строка 33: Строка 21:
 
{{#if:{{{imageright|}}}|<td>{{{imageright}}}</td>}}
 
{{#if:{{{imageright|}}}|<td>{{{imageright}}}</td>}}
 
</tr></table></includeonly><noinclude>
 
</tr></table></includeonly><noinclude>
== 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:
+
== Usage ==
  
<nowiki>{{mbox|type=<TYPE>|text=<TEXT>}}</nowiki>
+
{{[[{{FULLPAGENAME}}|{{lc:{{PAGENAME}}}}]]|type=<TYPE>|your message here}}
  
Where <TYPE> can be one of the following:
+
This template is used to create messages with a consistent visual style, based on message types, and is typically used in other templates. The type of messages supported are:
  
 
{{msg:mbox|type=warning|text=warning or serious}}
 
{{msg:mbox|type=warning|text=warning or serious}}
Строка 50: Строка 37:
 
{{msg:mbox|type=query|text=query}}
 
{{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]].
+
The default image can be suppressed with image="none", or you can use a custom image with image="<IMAGE>" (without the Image: prefix). See [[Wikibooks:Template messages]] for examples of how this template is used.
 
</noinclude>
 
</noinclude>

Версия 19:21, 28 сентября 2008


Usage

{{mbox|type=<TYPE>|your message here}}

This template is used to create messages with a consistent visual style, based on message types, and is typically used in other templates. The type of messages supported are:

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 image can be suppressed with image="none", or you can use a custom image with image="<IMAGE>" (without the Image: prefix). See Wikibooks:Template messages for examples of how this template is used.