Template:Message box/doc: Difference between revisions
No edit summary |
m (13 revisions imported) |
||
(11 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{Documentation subpage}} | ||
{{ | {{Template shortcut|Mbox}} | ||
< | This template is used to create standardised message boxes. It is most often used as the base for various types of [[:Category:Notice templates|notice templates]]. | ||
<!-- | |||
[[Category:Notice templates]] | __TOC__ | ||
==Usage== | |||
All parameters are optional. | |||
<pre>{{Message box | |||
|type = | |||
|full = | |||
|class = | |||
|style = | |||
|image = | |||
|title = | |||
|text = | |||
}}</pre> | |||
===Parameters=== | |||
{| class="wikitable" | |||
! Parameter !! Description | |||
|- | |||
| <code>type</code> | |||
| Determines the colors of the message box. See {{section link||Type}} for details. | |||
|- | |||
| <code>full</code> | |||
| Set this option to <code>yes</code> to expand the message box to the full width of the page. This is used primarily for [[:Category:Editnotice templates|editnotice templates]]. | |||
|- | |||
| <code>class</code> | |||
| Additional CSS classes applied to the message box | |||
|- | |||
| <code>style</code> | |||
| Inline CSS styles applied to the message box | |||
|- | |||
| <code>image</code> | |||
| If passed the name of an image file, it will be displayed as an icon with a standard width. If passed a file link, it will be displayed as given. | |||
|- | |||
| <code>title</code> | |||
| The title displayed at the top of the message box | |||
|- | |||
| <code>text</code> | |||
| The text displayed after the title | |||
|} | |||
===Type=== | |||
The <code>type</code> parameter determines the colors of the message box. | |||
{| class="wikitable" style="width: 100%;" | |||
! style="width: 20%;" | Type !! Example | |||
|- | |||
| style="text-align: center;" | <code>warning</code> | |||
| {{Message box | |||
|type = warning | |||
|image = Ambox warning pn.svg | |||
|title = This is an example of a warning notice. | |||
|text = This type of notice should only be used for warnings that demand editors' attention. | |||
}} | |||
|- | |||
| style="text-align: center;" | <code>action</code> | |||
| {{Message box | |||
|type = action | |||
|image = Ambox warning orange.svg | |||
|title = This is an example of an action notice. | |||
|text = This type of notice is used to convey critical information about actions that should be taken by editors. | |||
}} | |||
|- | |||
| style="text-align: center;" | <code>content</code> | |||
| {{Message box | |||
|type = content | |||
|image = Ambox important.svg | |||
|title = This is an example of a content notice. | |||
|text = This type of notice is typically used to provide editing instructions about the contents of a page. | |||
}} | |||
|- | |||
| style="text-align: center;" | <code>style</code> | |||
| {{Message box | |||
|type = style | |||
|image = Edit-clear.svg | |||
|title = This is an example of a style notice. | |||
|text = This type of notice is typically used to provide editing notes related to style. | |||
}} | |||
|- | |||
| style="text-align: center;" | <code>info</code> | |||
| {{Message box | |||
|type = info | |||
|image = Information icon4.svg | |||
|title = This is an example of an info notice. | |||
|text = This type of notice is used to convey important information to readers or editors. | |||
}} | |||
|- | |||
| style="text-align: center;" | <code>proposal</code> | |||
| {{Message box | |||
|type = proposal | |||
|image = Merge-arrow.svg | |||
|title = This is an example of a proposal notice. | |||
|text = This type of notice is typically used for editing proposals. | |||
}} | |||
|- | |||
| style="text-align: center;" | <code>lock</code> | |||
| {{Message box | |||
|type = lock | |||
|image = Padlock-silver-medium.svg | |||
|title = This is an example of a lock notice. | |||
|text = This type of notice can be used for edit protection and archival notices. It is sometimes also used to give readers historical context. | |||
}} | |||
|- | |||
| style="text-align: center;" | <code>legal</code> | |||
| {{Message box | |||
|type = legal | |||
|image = [[File:CC-BY-NC-SA.svg|140px|alt=|link=]] | |||
|title = This is an example of a legal notice. | |||
|text = This type of notice is typically used to display licensing and copyright information. | |||
}} | |||
|- | |||
| style="text-align: center;" | (default) | |||
| {{Message box | |||
|image = Nuvola apps bookcase.svg | |||
|title = This is an example of a generic notice. | |||
|text = This type of notice can be used to provide readers or editors with supplementary information. | |||
}} | |||
|} | |||
{{Documentation categories| | |||
<!-- Categories and interwikis go here. --> | |||
[[Category:Notice templates| ]] | |||
}} |
Latest revision as of 17:48, 23 September 2024
This subpage provides documentation for Template:Message box.
This template is used to create standardised message boxes. It is most often used as the base for various types of notice templates.
Usage
All parameters are optional.
{{Message box |type = |full = |class = |style = |image = |title = |text = }}
Parameters
Parameter | Description |
---|---|
type
|
Determines the colors of the message box. See § Type for details. |
full
|
Set this option to yes to expand the message box to the full width of the page. This is used primarily for editnotice templates.
|
class
|
Additional CSS classes applied to the message box |
style
|
Inline CSS styles applied to the message box |
image
|
If passed the name of an image file, it will be displayed as an icon with a standard width. If passed a file link, it will be displayed as given. |
title
|
The title displayed at the top of the message box |
text
|
The text displayed after the title |
Type
The type
parameter determines the colors of the message box.
Type | Example |
---|---|
warning
|
This is an example of a warning notice. This type of notice should only be used for warnings that demand editors' attention. |
action
|
This is an example of an action notice. This type of notice is used to convey critical information about actions that should be taken by editors. |
content
|
This is an example of a content notice. This type of notice is typically used to provide editing instructions about the contents of a page. |
style
|
This is an example of a style notice. This type of notice is typically used to provide editing notes related to style. |
info
|
This is an example of an info notice. This type of notice is used to convey important information to readers or editors. |
proposal
|
This is an example of a proposal notice. This type of notice is typically used for editing proposals. |
lock
|
This is an example of a lock notice. This type of notice can be used for edit protection and archival notices. It is sometimes also used to give readers historical context. |
legal
|
This is an example of a legal notice. This type of notice is typically used to display licensing and copyright information. |
(default) | This is an example of a generic notice. This type of notice can be used to provide readers or editors with supplementary information. |