Difference between revisions of "Template:Mbox"

From James Dooley's Wiki
Jump to: navigation, search
Line 7: Line 7:
 
}} {{{style|}}}">
 
}} {{{style|}}}">
 
<table style="position: relative; left: -20px;">
 
<table style="position: relative; left: -20px;">
<tr>
+
<tr>{{#switch: {{{image|}}}
{{#switch:{{{image|}}}
+
|none=<td>
|none=<td></td>
 
 
|#default=<td style="width: {{#if: {{{small|}}} |30|60}}px; height: {{#if: {{{small|}}} |30|60}}px;">[[File:{{#if: {{{image|}}}
 
|#default=<td style="width: {{#if: {{{small|}}} |30|60}}px; height: {{#if: {{{small|}}} |30|60}}px;">[[File:{{#if: {{{image|}}}
|{{{image|}}}
+
  |{{{image|}}}
| {{#switch: {{{type|}}}
+
  | {{#switch: {{{type|}}}
  | warning = warning_icon.png
+
    | warning = warning_icon.png
  | caution = caution_icon.png
+
    | caution = caution_icon.png
  | centos = centos_icon.png
+
    | centos = centos_icon.png
  | ubuntu = ubuntu_icon.png
+
    | ubuntu = ubuntu_icon.png
  | info
+
    | info
  | #default = info_icon.png
+
    | #default = info_icon.png
  }}
+
    }}
}}|{{#if: {{{small|}}} |25px|50px}}|center|{{{caption|}}}]]{{#if: {{{version|}}}| <div style="text-align: center; {{#if:{{{small|}}}||font-size: 20px;}} background-color: rgba(128,128,128,.7);">{{{version}}}</div>|}}{{{caption|}}}
+
  }}|{{#if: {{{small|}}} |25px|50px}}|center|{{{caption|}}}]]{{#if: {{{version|}}}| <div style="text-align: center; {{#if:{{{small|}}}||font-size: 20px;}} background-color: rgba(128,128,128,.7);">{{{version}}}</div>|}}{{{caption|}}}
 +
}}
 
</td><td style="text-align: left; vertical-align: top; {{#if:{{{small|}}}||font-size: 20px;}} padding: {{#if: {{{small|}}}|10|20}}px 0 0 0;">{{{msg|}}}</td></tr>
 
</td><td style="text-align: left; vertical-align: top; {{#if:{{{small|}}}||font-size: 20px;}} padding: {{#if: {{{small|}}}|10|20}}px 0 0 0;">{{{msg|}}}</td></tr>
 
</table>
 
</table>

Revision as of 15:07, 16 February 2013

Info icon.png

Usage

General usage layout is:

{{mbox
|type= [warning|caution|info|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 (all normal formatting should work but will be contained inside the border.
 This also allows for multiple lines.
|image= Override the default image being displayed.
|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.
}}

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

Types

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