Template:Mbox: Difference between revisions

From PZwiki
m (remove ll)
m (update doc)
Line 1: Line 1:
<noinclude>
<noinclude>
{{Documentation/sandbox|doc =
{{Documentation/sandbox|doc =
This template is used to create a {{ll|PZwiki:Mboxes|mbox}}.
This template is used to create a collapsible {{ll|PZwiki:Mboxes|mbox}}.


Do not use this template directly, instead use one of the types listed in {{ll|PZwiki:Mboxes}}.
This is a [[mw:Manual:Collapsible elements|collapsible element]]. You can toggle it by clicking the "◥" sign on the top-right corner.
 
When collapsed, the image, content and note will be hidden, only the title will be displayed.


==Usage==
==Usage==
===Syntax===
Do not use this template directly, instead use one of the types listed in {{ll|PZwiki:Mboxes}}.
<pre>
{{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
}}
</pre>


===Parameters===
===Parameters===
Line 41: Line 30:
:Initial state of the content. Will be collapsed if specified.
:Initial state of the content. Will be collapsed if specified.


===Example===
==Example==
<pre>
{{Mbox
| background = #f8f9fa
| color = #f28500
| sign = [[File:Imbox content.png|link=]]
| title = This is an Mbox.
| content = This is content of the Mbox.
| note = This is a note of the Mbox.
| id = mbox
| collapsed = true
}}
</pre>
{{Mbox
{{Mbox
| background = #f8f9fa
| background = #f8f9fa
Line 52: Line 53:
| 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}}
Line 60: Line 58:
==See also==
==See also==
*{{ll|PZwiki:Mboxes}}
*{{ll|PZwiki:Mboxes}}
 
*[https://oxygennotincluded.fandom.com/zh/wiki/Template:%E9%80%9A%E7%9F%A5%E6%A1%86 Mbox on Chinese Oxygen Not Included Wiki] - Template inspiration
}}
}}
{{ll|Category:Metatemplates}}
{{ll|Category:Metatemplates}}

Revision as of 17:03, 29 December 2023

Notebook.pngTemplate Documentation

This template is used to create a collapsible mbox.

This is a collapsible element. You can toggle it by clicking the "◥" sign on the top-right corner.

When collapsed, the image, content and note will be hidden, only the title will be displayed.

Usage

Do not use this template directly, instead use one of the types listed in PZwiki:Mboxes.

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 is mbox.
collapsed
Initial state of the content. Will be collapsed if specified.

Example

{{Mbox
| background = #f8f9fa
| color = #f28500
| sign = [[File:Imbox content.png|link=]]
| title = This is an Mbox.
| content = This is content of the Mbox.
| note = This is a note of the Mbox.
| id = mbox
| collapsed = true
}}
Imbox content.png
This is an Mbox.
This is content of the Mbox.
This is a note of the Mbox.

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:

  1. Create a subpage of this template with the language code of the language you want to translate to.
  2. 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.
  3. Translate the page according to the translation requirements of normal pages.

See also

Editors can experiment in this template's sandbox.