Difference between revisions of "Template:Mbox"

From The VG Resource Wiki
Jump to: navigation, search
Line 1: Line 1:
<table class="msgbox" style="{{ #if: {{{border|}}} | border-color: {{{border}}}; | }} {{ #if: {{{background|}}} | background: {{{background}}}; | }} {{ #if: {{{color|}}} | color: {{{color}}}; | }}"><tr><td class="msgboximg">[[File:{{{image|Placeholder.png|}}}| {{{pic-align|center}}} | link= | {{{caption|}}} | {{{iwidth|}}}px]]</td><td>{{{text|'''Message box template'''.<br>Use attribute 'text' to change this!}}}</td></tr></table>{{ #if: {{{category1|}}} | [[Category:{{{category1}}}]] | }}{{ #if: {{{category2|}}} | [[Category:{{{category2}}}]] | }}{{ #if: {{{category3|}}} | [[Category:{{{category3}}}]] | }}<noinclude>
+
{|{{#if: {{{trans|}}}| class='transbar'|}} align=center width=60% id=toc style='color: {{{c4|#000}}}; background-color: {{{color2|{{{c2|{{{colour2|#fbf6ff}}}}}}}}}; border-collapse: collapse; border: {{{border|1px solid {{{color3|{{{c3|{{{border|{{{colour3|{{{color1|{{{c1|{{{color|{{{colour1|{{{colour|#abada6}}}}}}}}}}}}}}}}}}}}}}}}}}}}}};'
 +
|-
 +
| style='background-color: {{{color1|{{{c1|{{{color|{{{colour1|{{{colour|#9c66cc}}}}}}}}}}}}}}}; width: 8px;' |
 +
| class="messageImage" align=left valign="middle" style='width: 42px;'|&nbsp;[[{{{image|{{{img|Image:Generic.png}}}}}}]]
 +
| class="messageBody" align=center style="padding: 1px; font-size: 90%;" | '''{{{title|Title text}}}'''
 +
{{{description|{{{desc|Description text}}}}}}
 +
|}<noinclude>
 +
'' ''
 +
== Usage ==
 +
This is a '''parent template''', used to create other templates that all look like this one.
  
Message box template, used for generating an easy-to-make nagbox for people.
+
This template should be used directly only for basic messages and very special or individual cases.
  
<nowiki>{{mbox</nowiki>
 
| text=        Text inside the box
 
<u>optional:</u>
 
| image=      Image to use (1:1 aspect ratio), file name only.
 
| iwidth=      Image width in pixels.
 
| caption=    Image caption.
 
| border=      Border color, e.g. named constants, #0123456, #123, etc.
 
| background=  Background color.
 
| color=      Text color.
 
| category1=  Category to put this page in.
 
| category2=  Second category to put this page in.
 
| category3=  Third category to put this page in.
 
| min-width=  Minimum width to put the picture in.
 
| pic-align=  Picture alignment. Use ''left'', ''right'', or ''center''. Defaults to ''center''.
 
<nowiki>}}</nowiki>
 
  
</noinclude>
+
<nowiki>{{Message
 +
|trans = ..
 +
|c1 = ..
 +
|c2 = ..
 +
|c3 = ..
 +
|c4 = Text color
 +
|img = ..
 +
|title = ..
 +
|desc = ..
 +
|cat = ..
 +
}}</nowiki>

Revision as of 12:18, 6 February 2019

 File:Generic.png Title text

Description text

Usage

This is a parent template, used to create other templates that all look like this one.

This template should be used directly only for basic messages and very special or individual cases.


{{Message
|trans = ..
|c1 = ..
|c2 = ..
|c3 = ..
|c4 = Text color
|img = ..
|title = ..
|desc = ..
|cat = ..
}}