Template:Mbox: Difference between revisions

From Hazeron Wiki
Jump to navigation Jump to search
(Hope this work.)
 
m (Added class for later styling)
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{
<includeonly><center>
  {{namespace detect
{| class="mbox" style="{{#if:{{{floatright|}}}|float:right;|}} border-style: solid; border-width: {{{bwidth|5px}}}; border-color: {{{colorborder|}}}; background-color:{{{colorbackground|}}}; color: {{{colortext|}}};"
  | demospace = {{{demospace|}}}
| style="vertical-align:middle; text-align:center;" | [[File:{{#if:{{{icon|}}}|{{{icon}}}|Imbox_deletion.png}}]]
  | main      = ombox
{{#if:{{{text|}}}|{{!}} style="vertical-align:middle;" {{!}} {{{text}}}|}}
  | talk      = ombox
|}
  | file      = ombox
</center></includeonly><noinclude>{{Mbox/Doc}}</noinclude>
  | category  = ombox
  | other    = ombox
  }}
| type      = {{{type|}}}
| image      = {{{image|}}}
| imageright = {{{imageright|}}}
| class      = {{{class|}}}
| style     = {{{style|}}}
| textstyle  = {{{textstyle|}}}
| text      = {{{text}}}
| small      = {{{small|}}}
| smallimage = {{{smallimage|}}}
| smallimageright = {{{smallimageright|}}}
| smalltext  = {{{smalltext|}}}
| subst      = {{{subst|}}}
| date      = {{{date|}}}
| name      = {{{name|}}}
}}

Latest revision as of 12:12, 6 April 2024

What is {{Mbox}}

The {{Mbox}} template is a standard text box with an icon.

For example it is used in:

How to use

This template it most of all used to create other templates, there is no need to use this directly on a page.

That said, here are some examples:

{{Mbox
| icon = 
| colorborder = 
| colorbackground = 
| colortext = 
| text = 
}}

Suggested icons:

  • Imbox_content.png Imbox_content.png
  • Imbox_deletion.png Imbox_deletion.png
  • Imbox_notice.png Imbox_notice.png

Examples

{{Mbox
| icon = 
| colorborder = 
| colorbackground = 
| colortext = 
| text = 
}}
{{Mbox
| icon = Imbox_content.png
| colorborder = 
| colorbackground = 
| colortext = 
| text = This is a test.
}}
This is a test.
{{Mbox
| icon = Imbox_notice.png
| colorborder = darkred
| colorbackground = red
| colortext = yellow
| text = This is also a test.
}}
This is also a test.

You can also change the width of the border and float the box to the right:

{{Mbox
| icon = Imbox_notice.png
| colorborder = black
| bwidth = 2px
| floatright = yes
| colorbackground = blue
| colortext = yellow
| text = This is an extra test.
}}
This an extra test.