Difference between revisions of "Template:Mbox"

From Appropedia
Jump to navigation Jump to search
(Prepare merge with {{Notice}})
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
<table style="background-color: {{{background-color|}}}; border-color: {{{border-color|}}} {{{style|}}}" class="noprint plainlinks mbox {{#switch:{{{type|}}}
+
<table style="background-color: {{{background-color|{{{background|}}}}}}; border-color: {{{border-color|{{{border|}}}}}}; {{{style|}}}" class="noprint plainlinks mbox {{#switch:{{{type|}}}
 
   | protection = mbox-protection
 
   | protection = mbox-protection
 
   | serious    = mbox-serious
 
   | serious    = mbox-serious
Line 28: Line 28:
 
   }}
 
   }}
 
}}</td>
 
}}</td>
<td class="mbox-text"><div class="mbox-text-div">{{#if:{{{headline|{{{head|{{{2|}}}}}}}}}|<strong>{{{headline|{{{head|{{{1}}}}}}}}}</strong>{{#if:{{{content|{{{text|{{{body|{{{2|}}}}}}}}}}}}|<div class="hide-when-compact">{{{content|{{{text|{{{body|{{{2}}}}}}}}}}}}</div>}}|{{{content|{{{text|{{{body|{{{1}}}}}}}}}}}}}}</div>{{#if:{{{foot|}}}|<div class="hide-when-compact"><small>{{{foot}}}</small></div>}}</td>
+
<td class="mbox-text"><div class="mbox-text-div">{{#if:{{{headline|{{{head|{{{2|}}}}}}}}}|<strong>{{{headline|{{{head|{{{1}}}}}}}}}</strong>{{#if:{{{content|{{{text|{{{body|{{{2|}}}}}}}}}}}}|<span class="mbox-tap">Tap for more</span><div class="hide-when-compact">{{{content|{{{text|{{{body|{{{2}}}}}}}}}}}}</div>}}|{{{content|{{{text|{{{body|{{{1}}}}}}}}}}}}}}</div>{{#if:{{{foot|}}}|<div class="hide-when-compact"><small>{{{foot}}}</small></div>}}</td>
 
</tr>
 
</tr>
</table><templatestyles src="Mbox/styles.css" /><noinclude>{{Documentation}}</noinclude>
+
</table><templatestyles src="Mbox/styles.css" />{{#if:{{NAMESPACE}}||{{#if:{{{category|}}}|[[Category:{{{category}}}]]}}}}<noinclude>{{Documentation}}</noinclude>

Latest revision as of 13:03, 26 October 2020

Template documentation[edit]

This is the {{mbox}} or message box meta-template. It is used to build message box templates such as {{References}} or {{Disambiguation}}. It offers several different colours, uses default images if no image parameter is given and it has some other features.

Usage[edit source]

Basic usage[edit source]

{{Mbox|This text will be visible on mobile and desktop devices alike.}}

Will produce:

Advanced usage[edit source]

{{Mbox
|type = serious
|background = #faa
|image = Sickcartoon.png
|head = This text will be visible on mobile and desktop devices alike.
|body = This text will be visible on mobile devices only after the user touches the message box.
|foot = This text will also be visible on mobile devices only after the user touches the message box.
|category = Examples
}}

Will produce:

See also[edit source]