Difference between revisions of "Template:Mbox"

From James Dooley's Wiki
Jump to: navigation, search
Line 31: Line 31:
 
| #default=60px}}|center|{{{caption|}}}]]{{#if: {{{version|}}}| <div style="text-align: center; {{#switch:{{{size|}}}
 
| #default=60px}}|center|{{{caption|}}}]]{{#if: {{{version|}}}| <div style="text-align: center; {{#switch:{{{size|}}}
 
| normal
 
| normal
| small=
+
| small=font-size: 20px;
 
| tiny=
 
| tiny=
| #default=font-size: 20px; }} background-color: rgba(128,128,128,.7);">{{{version}}}</div>|}}{{{caption|}}}
+
| #default=font-size: 30px; }} background-color: rgba(128,128,128,.7);">{{{version}}}</div>|}}{{{caption|}}}
 
}}
 
}}
 
</td><td style="text-align: left; vertical-align: center; {{#switch:{{{size|}}}
 
</td><td style="text-align: left; vertical-align: center; {{#switch:{{{size|}}}
 
| normal
 
| normal
| small=
+
| small=font-size: 20px;
 
| tiny=
 
| tiny=
| #default=font-size: 20px; }}">{{{msg|}}}</td></tr>
+
| #default=font-size: 30px; }}">{{{msg|}}}</td></tr>
 
</table>
 
</table>
 
{{{text|}}}
 
{{{text|}}}

Revision as of 16:00, 26 February 2013

Info icon.png

Usage

General usage layout is:

{{mbox
|type= [warning|caution|info|step|centos|ubuntu]
|msg= Text in this area will be used for a title message, font size is 20px
|text= Text in this area will be treated like normal wiki text (MOST normal formatting should work but will be contained inside the border, note | may not work properly).
 This also allows for multiple lines.
|image= [image file name| none]
|caption= This will provide a small area for an image caption.
|version= Useful if you are specifying a specific version of an operating system, will display below the icon.
|style= Additional style information after the defaults are set. This should allow you to override the default settings.
|size= [normal|small|tiny]
}}

Example

{{mbox
|type=caution
|image=Centos_icon.png
|msg=Caution Message
|text=More information about the message
 example formatting
|caption=CentOS5
|version=5.x
|style=border: 4px dotted green
}}
CentOS5
5.x
CentOS5
Caution Message

More information about the message

example formatting


Pipes in message box

Info icon.png
Pipes '|' in message boxes

The template structure automatically will read |'s as being part of the template and will likely break the rest of the message.

To get around this there are a few things you can do.

  • Use the template:! template if you need the | to display on the screen.
{{!}}
  • Use HTML code if you are trying to create a table.


Nesting

Step icon.png
The text field will allow for nesting of message boxes
Info icon.png
This can make for some interesting message boxes


Types

Normal

Warning icon.png
warning
Caution icon.png
caution
Info icon.png
info
Step icon.png
step
Centos icon.png
centos
Ubuntu icon.png
ubuntu

Small

Warning icon.png
warning
Caution icon.png
caution
Info icon.png
info
Step icon.png
step
Centos icon.png
centos
Ubuntu icon.png
ubuntu


Tiny

Warning icon.png
warning
Caution icon.png
caution
Info icon.png
info
Step icon.png
step
Centos icon.png
centos
Ubuntu icon.png
ubuntu

No Image

warning
warning
warning