Template:Ambox: Difference between revisions

m Removed redundant code in switch; Added grey as colour
Correct compatibility wrapper for Wikipedia and Fandom notices
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<onlyinclude><table style="{{{style|}}}" class="plainlinks ambox {{#switch:{{{border|}}}
{{#if:{{{border|}}}
  | orange     = ambox-orange
|{{#invoke:Message box|ambox|type={{#switch:{{{border|}}}|red=delete|orange=content|yellow=style|#default=notice}}|text={{{type|}}}{{#if:{{{info|}}}|<br />{{{info|}}}}}|small={{{small|}}}}}
  | yellow     = ambox-yellow
|{{#if:{{{text|}}}
  | purple      = ambox-purple
   |{{#invoke:Message box|ambox}}
  | blue        = ambox-blue
   |{{#if:{{{info|}}}
  | green      = ambox-green
    |{{#switch:{{{type|}}}|speedy|delete|content|style|move|protection|notice={{#invoke:Message box|ambox}}|#default={{#invoke:Message box|ambox|type=notice|text={{{type|}}}<br />{{{info|}}}|small={{{small|}}}}}}}
  | grey
    |{{#invoke:Message box|ambox}}
   | gray        = ambox-gray
  }}
   | red
}}
  | #default    = ambox-red
}}<noinclude>
}}">
This template uses Wikipedia's article message box and accepts the former Fandom <code>border</code>, <code>type</code> and <code>info</code> parameters for compatibility with imported articles. Wikipedia source and contributor history: [https://en.wikipedia.org/wiki/Template:Ambox?action=history Template:Ambox].
<tr>
</noinclude>
<td class="ambox-image">{{{image|[[File:InterdictMsgAlert.jpg|x80px]]}}}</td>
<td style="color: black; padding: 0.25em 0.5em;">{{{type|}}}
<div class="ambox-smalltext">
{{{info|}}}
</div></td></tr></table><br></onlyinclude>
{{documentation}}