Template:Message box: Difference between revisions
(Removed redirect to Template:Mbox) |
No edit summary |
||
Line 10: | Line 10: | ||
{{#if:{{{image|}}}|<div class="c-mbox__image">[[File:{{{image}}}|45px|link=]]</div>}} | {{#if:{{{image|}}}|<div class="c-mbox__image">[[File:{{{image}}}|45px|link=]]</div>}} | ||
<div class="c-mbox__main"> | <div class="c-mbox__main"> | ||
{{#if:{{{title|}}}|<div class="c-mbox__title"> | {{#if:{{{title|<noinclude>1</noinclude>}}}| | ||
<div class="c-mbox__title"> | |||
{{{title}}} | {{{title}}} | ||
</div>}} | </div> | ||
}}{{#if:{{{text|<noinclude>1</noinclude>}}}| | |||
<div class="c-mbox__text"> | <div class="c-mbox__text"> | ||
{{{text | {{{text}}} | ||
</div> | </div> | ||
}} | |||
</div> | </div> | ||
</div><noinclude> | </div><noinclude> | ||
{{Documentation}} | {{Documentation}} | ||
</noinclude> | </noinclude> |
Revision as of 14:14, 11 June 2023
{{{title}}}
{{{text}}}
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.