Template:Mbox: Difference between revisions
(new mbox) |
(update) |
||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
{{Documentation/sandbox|doc = | {{Documentation/sandbox|doc = | ||
This template is used to create a {{ | This template is used to create a {{ll|PZwiki:Mboxes|mbox}}. | ||
Do not use this template directly, instead use one of the types listed | Do not use this template directly, instead use one of the types listed in {{ll|PZwiki:Mboxes}}. | ||
==Usage== | ==Usage== | ||
===Syntax=== | |||
<pre> | <pre> | ||
{{Mbox | {{Mbox | ||
Line 19: | Line 20: | ||
}} | }} | ||
</pre> | </pre> | ||
===Parameters=== | |||
;<code>background</code> | |||
:Background color. Default is <code>#f8f9fa</code>. | |||
;<code>color</code> | |||
:Left bar color. Default is <code>#f28500</code>. | |||
;<code>sign</code> | |||
:Mbox image. Default is <code><nowiki>[[File:Imbox content.png|link=]]</nowiki></code>. | |||
;<code>title</code> | |||
:Mbox title. Displayed in bold and large font. Default is <code>This is an Mbox.</code>. | |||
;<code>content</code> | |||
:Normal text. Default is <code>This is content of the Mbox.</code>. | |||
;<code>note</code> | |||
:Bottom text. Displayed in italic and small font. Will be empty if not specified. | |||
;<code>cat</code> | |||
:Category name, omit <code>Category:</code> prefix. Will be empty if not specified. | |||
;<code>id</code> | |||
:Id for each Mbox to collapse the content. Should be unique. Recommended to use <code>mbox-xxx</code> format. Default is <code>mbox</code>. | |||
;<code>collapsed</code> | |||
:Initial state of the content. Will be collapsed if specified. | |||
===Example=== | ===Example=== | ||
{{Mbox | {{Mbox | ||
Line 30: | Line 52: | ||
| collapsed = true | | collapsed = true | ||
}} | }} | ||
This is a collpasable element. You can toggle it by clicking the button on the top-right corner. | |||
When collapsed, the image, content and note will be hidden, only the title will be displayed. | |||
{{Translation guide}} | {{Translation guide}} | ||
==See also== | |||
*{{ll|PZwiki:Mboxes}} | |||
}} | }} | ||
{{ll|Category:Metatemplates}} | {{ll|Category:Metatemplates}} | ||
{{ll|Category:Mbox templates}} | |||
</noinclude><includeonly><div class="mbox" {{#if:{{{background|}}}|style="background-color: {{{background}}};"}}>{{#if:{{{cat|}}}|{{ll|Category:{{{cat}}}}}}} | </noinclude><includeonly><div class="mbox" {{#if:{{{background|}}}|style="background-color: {{{background}}};"}}>{{#if:{{{cat|}}}|{{ll|Category:{{{cat}}}}}}} | ||
<div {{#if:{{{color|}}}|style="background-color: {{{color}}};"}}></div> | <div {{#if:{{{color|}}}|style="background-color: {{{color}}};"}}></div> |
Revision as of 03:23, 29 December 2023
This template is used to create a mbox.
Do not use this template directly, instead use one of the types listed in PZwiki:Mboxes.
Usage
Syntax
{{Mbox | background = background color | color = left bar colors | sign = image (collapsible) | title = title | content = normal text (collapsible) | note = bottom text (collapsible) | cat = category name, omit 'Category:' | id = id for each Mbox | collapsed = initial state }}
Parameters
background
- Background color. Default is
#f8f9fa
. color
- Left bar color. Default is
#f28500
. sign
- Mbox image. Default is
[[File:Imbox content.png|link=]]
. title
- Mbox title. Displayed in bold and large font. Default is
This is an Mbox.
. content
- Normal text. Default is
This is content of the Mbox.
. note
- Bottom text. Displayed in italic and small font. Will be empty if not specified.
cat
- Category name, omit
Category:
prefix. Will be empty if not specified. id
- Id for each Mbox to collapse the content. Should be unique. Recommended to use
mbox-xxx
format. Default ismbox
. collapsed
- Initial state of the content. Will be collapsed if specified.
Example
This is a collpasable element. You can toggle it by clicking the button on the top-right corner.
When collapsed, the image, content and note will be hidden, only the title will be displayed.
How to translate
This template doesn't need to/shouldn't be translated, but you can translate the documentation of this template with the following steps:
- Create a subpage of this template with the language code of the language you want to translate to.
- Copy the code wrapped in the
<noinclude>
tag in this template into the page you created.{{Translation guide}}
template should be removed from the translated documentation.
- Translate the page according to the translation requirements of normal pages.