Difference between revisions of "Template:Hmbox"

From blackwiki
Jump to navigation Jump to search
imported>Casliber
m (Changed protection level of Template:Hmbox: new protection cat ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite)))
imported>Sardanaphalus
(Update via sandbox (code comprehensibility, {{{extra}}} font-size (was too small), made {{{message}}} required, removed Blank.png default (otherwise gap created))
Line 1: Line 1:
<includeonly><div style="margin: 1em;" class="{{{class|}}}"><span style="border: 1px solid #aaa; background-color: #{{{{{|safesubst:}}}#switch:{{{class|}}}
+
<div class="{{{class|}}}" style="margin:1.0em;"><!--
| resolved   = f9fcf9
+
 
| unresolved = fcf9f9
+
(Image and) message in box:
| #default   = fcfcf9
+
  --><span style="margin-right:0.35em;border:1px solid #aaa;padding:0.5em;
}}; margin-right: 0.5em; padding: 0.5em;">[[File:{{{image|Blank.png}}}|{{{{{|safesubst:}}}#if:{{{imagesize|}}}|{{{imagesize}}}|20x20}}px|link=|alt=]] {{{message|}}}{{{{{|safesubst:}}}#if:{{{extra|}}}|&#58;}}</span> {{{{{|safesubst:}}}#if:{{{extra|}}}|<span style="font-size: 85%">{{{extra}}}</span>}}</div></includeonly><noinclude>
+
                  background:#{{{{{|safesubst:}}}#switch:{{{class|}}} |resolved=f9fcf9 |unresolved=fcf9f9 |#default=fcfcf9}};"><!--
{{documentation}}
+
      -->{{#if:{{{image|}}} |[[File:{{{image}}} |{{{{{|safesubst:}}}#if:{{{imagesize|}}}|{{{imagesize}}}|20x20}}px |alt= |link=]]&nbsp; |<noinclude>''(image)''&nbsp;</noinclude>}}<!--
<!-- place category and language links on the /doc sub-page, not here -->
+
      -->{{{message}}}{{{{{|safesubst:}}}#if:{{{extra<includeonly>|</includeonly>}}} |&nbsp;'''&#58;<!--(colon)-->'''}}<!--
 +
  --></span><!--
 +
 
 +
Optional message after (i.e. to right of) box:
 +
  -->{{{{{|safesubst:}}}#if:{{{extra<includeonly>|</includeonly>}}}
 +
      |&nbsp;<span style="font-size:95%;"><noinclude>''Optional ''</noinclude>{{{extra}}}<noinclude>'' message''</noinclude></span><!--
 +
  -->}}<!--
 +
 
 +
--></div><noinclude>
 +
{{Documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 11:40, 16 December 2014

(image) {{{message}}} : Optional {{{extra}}} message
Template documentation[view] [edit] [history] [purge]

This is {{hmbox}}, an {{mbox}} meta-template for hatnote-style templates such as {{resolved}} which are placed at the top of discussions or other matters which have been closed.

Usage

{{hmbox
| class   = 
| image   = 
| message = 
| extra   = {{{1|}}}
}}

Examples

{{hmbox
| class   = resolved
| image   = Yes check.svg
| message = Resolved
| extra   = {{{1|}}}
}}

produces:

 Resolved

See also