Template:DisplayBox: Difference between revisions

From ChoralWiki
Jump to navigation Jump to search
(defaults to green if namespace=Template)
(moved documentation from the comments to a visible box)
Line 1: Line 1:
<!-- centered box with fixed margins for displaying material, optional parameters:
<includeonly>
|marginL=<margin-left, default=30px>
|marginR=<margin-right, default=30px>
|marginB=<margin-bottom, default=0>
|marginT=<margin-top, default=0>
|bdwidth=<borderwidth in pixels, default=1>
|bdcolor=<bordercolor, default=#3399ff>
|padding=<padding, default=0.4em 1em 0.4em 1em (top, right, bottom, left)>
|bgcolor=<backgroundcolor, default=#d8d8d8; other options include:
  grey=#dddddd
  char=#bbbbbb (charcoal)
  g  =#ddffdd (green)
  r  =#ffdddd (red)
  y  =#ffffbb (yellow)
  b  =#ddddff (blue)
  m  =#ddccff (magenta)
  o  =#ffeebb (orange)
  none=#ffffff (white)
  w  =#ffffff (white)
>
|text=<text to display, defaults to parameter 1 when no optional parameters are used
-->
<div style="margin: 0; margin-right: {{{marginR|30px}}}; margin-left: {{{marginL|30px}}}; margin-top: {{{marginT|0}}}; margin-bottom: {{{marginB|0}}}; border:{{{bdwidth|1}}}px solid {{{bdcolor|#3399ff}}}; padding: {{{padding|0.4em 1em 0.4em 1em}}}; background-color:{{switch|{{{bgcolor|{{#ifeq:{{NAMESPACE}}|Template|g|grey}}}}}|
<div style="margin: 0; margin-right: {{{marginR|30px}}}; margin-left: {{{marginL|30px}}}; margin-top: {{{marginT|0}}}; margin-bottom: {{{marginB|0}}}; border:{{{bdwidth|1}}}px solid {{{bdcolor|#3399ff}}}; padding: {{{padding|0.4em 1em 0.4em 1em}}}; background-color:{{switch|{{{bgcolor|{{#ifeq:{{NAMESPACE}}|Template|g|grey}}}}}|
case: grey=#dddddd|
case: grey=#dddddd|
Line 39: Line 18:
case: gs5=#aaaaaa|
case: gs5=#aaaaaa|
default={{{bgcolor}}}}};">{{#if:{{{title|}}}|<center><big><b>{{{title}}}</b></big></center>}}
default={{{bgcolor}}}}};">{{#if:{{{title|}}}|<center><big><b>{{{title}}}</b></big></center>}}
{{{text|{{{1|<displayed text>}}}}}}
{{{text|{{{1|'''''Error:''' Text is missing!''}}}}}}
</div><noinclude><br>
</div></includeonly><noinclude>{{Doc|
Centered box with fixed margins for displaying material
 
'''Syntax:'''
:{{tl|DisplayBox|<displayed text>}}
 
'''Optional parameters:'''
<pre>
|marginL=<margin-left, default=30px>
|marginR=<margin-right, default=30px>
|marginB=<margin-bottom, default=0>
|marginT=<margin-top, default=0>
|bdwidth=<borderwidth in pixels, default=1>
|bdcolor=<bordercolor, default=#3399ff>
|padding=<padding, default=0.4em 1em 0.4em 1em (top, right, bottom, left)>
|bgcolor=<backgroundcolor, default=#d8d8d8;> other options include:
  grey=#dddddd
  char=#bbbbbb (charcoal)
  g  =#ddffdd (green)
  r  =#ffdddd (red)
  y  =#ffffbb (yellow)
  b  =#ddddff (blue)
  m  =#ddccff (magenta)
  o  =#ffeebb (orange)
  none=#ffffff (white)
  w  =#ffffff (white)
|title=<optional; a centered title displayed in bold>
|text=<text to display, defaults to parameter 1 when no optional parameters are used>
</pre>
}}
{{prot-temp}}
{{prot-temp}}
[[Category:Message box templates]]
[[Category:Message box templates]]
</noinclude>
</noinclude>

Revision as of 15:30, 10 September 2016

Documentation

Centered box with fixed margins for displaying material

Syntax:

{{DisplayBox|<displayed text>}}

Optional parameters:

|marginL=<margin-left, default=30px>
|marginR=<margin-right, default=30px>
|marginB=<margin-bottom, default=0>
|marginT=<margin-top, default=0>
|bdwidth=<borderwidth in pixels, default=1> 
|bdcolor=<bordercolor, default=#3399ff>
|padding=<padding, default=0.4em 1em 0.4em 1em (top, right, bottom, left)>
|bgcolor=<backgroundcolor, default=#d8d8d8;> other options include:
   grey=#dddddd
   char=#bbbbbb (charcoal)
   g   =#ddffdd (green)
   r   =#ffdddd (red)
   y   =#ffffbb (yellow)
   b   =#ddddff (blue)
   m   =#ddccff (magenta)
   o   =#ffeebb (orange)
   none=#ffffff (white)
   w   =#ffffff (white)
|title=<optional; a centered title displayed in bold>
|text=<text to display, defaults to parameter 1 when no optional parameters are used>