Difference between revisions of "Template:Ivory messagebox/doc"

From Bogleheads
Jump to navigation Jump to search
(Update to Wikipedia version https://en.wikipedia.org/w/index.php?title=Template:Ivory_messagebox/doc&oldid=962868992)
(Revised for use on Bogleheads wiki.)
 
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
{{Template shortcut|Ivmbox}}
 
<!-- Categories at the bottom of this page, please -->
 
  
{| class="messagebox" style="background-color:#f3f3ff; border:1px solid; padding-left: 0.5em; padding-right: 0.5em"
+
==Overview==
| To leave an Ivmbox message with ''no'' icon:
+
This template supercedes [[Wikipedia:Template:Ivory messagebox|Template:Ivory messagebox]] with {{tl|Mbox}} set to an Ivory colored background with no image.
*{{tlx|Ivmbox|Text to display in messagebox}}
 
  
To use this template ''with'' an icon, use:
+
The Wikipedia implementation has formatting issues with bulleted lists, references, and notes.
* {{tlx|Ivmbox|Text to display|Information icon4.svg}}
 
|}
 
  
The '''<u>iv</u>ory <u>m</u>essage<u>box</u>''' or '''Ivmbox''' is a simplistic, full-width box intended to surround important messages or notices. The ivory background of this template contrasts well to the white background used by most Wikipedia users on most Wikipedia pages (so it is noticeable enough to be used in notices or messages), but the background colour is not as garish as many other message boxes.
+
To use the template, enter the text as follows:
  
The basic use of the template is as follows. If the message you wish to convey using Ivmbox contains complex wiki-code or equals signs, it may be necessary to use {{para|1|Lorem ipsum [etc…]}} instead of merely {{para||Lorem ipsum [etc…]}}:
+
<pre>{{Ivory messagebox | text = Text to display}}</pre>
  
{{tlx|Ivmbox|Lorem ipsum [etc…]}} which gives:
+
which results in:
{{Ivmbox|{{Lorem ipsum}}}}
 
  
The template can display an image to the left of the text content. By default, the image will be 25px in width:
+
{{Ivory messagebox | text = Text to display}}
 
 
{{tlx|Ivmbox|Lorem ipsum [etc…]|Information icon4.svg}}
 
{{Ivmbox|{{Lorem ipsum}}|Information icon4.svg}}
 
 
 
The image can be made smaller or larger using the {{para|imagesize}} parameter:
 
 
 
{{tlx|Ivmbox|Lorem ipsum [etc…]|Information icon4.svg|imagesize{{=}}40px}}
 
{{Ivmbox|{{Lorem ipsum|2}}|Information icon4.svg|imagesize=40px}}
 
 
 
===Advanced use===
 
By default, if an icon is used with Ivmbox, the icon will not be clickable (in [[Wikipedia:Extended image syntax|MediaWiki image nomenclature]], {{para|link}} will be declared but empty). If you wished, for example, clicking the image to lead to [[List of Prime Ministers of the United Kingdom]], you would include the following parameter:
 
 
 
{{para|image link|List of Prime Ministers of the United Kingdom}}
 
 
 
The background of an Ivmbox is the off-white X11 colour [[Ivory (color)|ivory]]. If you like the functionality of Ivmbox but require it to display with a background other than the off-white ivory it uses by default, simply include the parameter {{para|bg}}; for example:
 
 
 
{{para|bg|salmon}} for a <span style="background: salmon; padding: 1px;">salmon</span> message box<br/>
 
{{para|bg|#90EE90}} for a <span style="background: #90EE90; padding: 1px;">#90EE90 (light green)</span> message box.
 
  
 
===See also===
 
===See also===

Latest revision as of 23:36, 31 October 2020

Overview

This template supercedes Template:Ivory messagebox with {{Mbox}} set to an Ivory colored background with no image.

The Wikipedia implementation has formatting issues with bulleted lists, references, and notes.

To use the template, enter the text as follows:

{{Ivory messagebox | text = Text to display}}

which results in:

See also

There are seven metatemplates in the Module:Message box family:

  • {{Ambox}}, for messageboxes on article pages.
  • {{Cmbox}}, for messageboxes on category pages.
  • {{Imbox}}, for messageboxes on file (image) pages.
  • {{Tmbox}}, for messageboxes on talk pages.
  • {{Fmbox}}, for header and footer messageboxes.
  • {{Ombox}}, for messageboxes on other types of page.
  • {{Mbox}}, for messageboxes that are used in different namespaces and change their presentation accordingly.

Closely related metatemplates:

  • {{Asbox}}, for messageboxes in article stubs.
  • {{Dmbox}}, for messageboxes on disambiguation or set-index pages.
  • {{Ivmbox}}, a simple full-width box with default ivory background intended to frame important messages or notices.