Template:Message box: Difference between revisions
>OmegaK2 (Redirected page to Template:Mbox) |
(Removed redirect to Template:Mbox) |
||
Line 1: | Line 1: | ||
# | <div class="c-mbox {{#switch:{{{type|}}} | ||
|warning | |||
|action | |||
|content | |||
|style | |||
|info | |||
|proposal | |||
|lock = c-mbox--{{{type}}} | |||
}} {{{class|}}} {{#if:{{{style|}}}|style="{{{style}}}"}}"> | |||
{{#if:{{{image|}}}|<div class="c-mbox__image">[[File:{{{image}}}|45px|link=]]</div>}} | |||
<div class="c-mbox__main"> | |||
{{#if:{{{title|}}}|<div class="c-mbox__title"> | |||
{{{title}}} | |||
</div>}} | |||
<div class="c-mbox__text"> | |||
{{{text|{{{1}}}}}} | |||
</div> | |||
</div> | |||
</div><noinclude> | |||
{{Documentation}} | |||
</noinclude> |
Revision as of 02:30, 11 June 2023
{{{1}}}
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
|
[[File:
![]() 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. |
Editors can experiment in this template's sandbox and testcases pages.
Please add categories to the /doc subpage. Subpages of this template.