Template:Box
From New York City LDS History
(Difference between revisions)
LDSdbSysop (Talk | contribs) |
LDSdbSysop (Talk | contribs) (Undo revision 2738 by LDSdbSysop (talk)) |
||
Line 1: | Line 1: | ||
− | < | + | <includeonly>{| width="{{{width}}}" style="float:{{{float}}};" |
− | + | | class="MainPageBG" style="width:100%; border:1px solid #{{ #switch: {{{color}}} | |
+ | | pink=f2cedf | ||
+ | | orange=f2dfce | ||
+ | | yellow=f2f2ce | ||
+ | | green=cef2e0 | ||
+ | | blue=cedff2 | ||
+ | | purple=ddcef2 | ||
+ | | #default=dddddd | ||
+ | }}; background:#{{ #switch: {{{color}}} | ||
+ | | pink=fff5fa | ||
+ | | orange=fffaf5 | ||
+ | | yellow=fffff5 | ||
+ | | green=f5fffa | ||
+ | | blue=f5faff | ||
+ | | purple=faf5ff | ||
+ | | #default=ffffff | ||
+ | }}; vertical-align:top;"| | ||
+ | {| width="100%" cellpadding="2" cellspacing="5" style="vertical-align:top; background:#{{ #switch: {{{color}}} | ||
+ | | pink=fff5fa | ||
+ | | orange=fffaf5 | ||
+ | | yellow=fffff5 | ||
+ | | green=f5fffa | ||
+ | | blue=f5faff | ||
+ | | purple=faf5ff | ||
+ | | #default=ffffff | ||
+ | }};" | ||
+ | ! <p style="margin:0; background:#{{ #switch: {{{color}}} | ||
+ | | pink=f2cedf | ||
+ | | orange=f2dfce | ||
+ | | yellow=f2f2ce | ||
+ | | green=cef2e0 | ||
+ | | blue=cedff2 | ||
+ | | purple=ddcef2 | ||
+ | | #default=dddddd | ||
+ | }}; font-size:120%; font-weight:bold; border:1px solid #{{ #switch: {{{color}}} | ||
+ | | pink=bfa3b0 | ||
+ | | orange=bfb0a3 | ||
+ | | yellow=bfbfa3 | ||
+ | | green=a3bfb1 | ||
+ | | blue=a3b0bf | ||
+ | | purple=afa3bf | ||
+ | | #default=aaaaaa | ||
+ | }}; text-align:left; color:#000; padding:0.2em 0.4em;">{{{title}}}</p> | ||
|- | |- | ||
− | + | |style="color:#000;"| {{{content}}} | |
− | | | + | |} |
− | + | |}</includeonly><noinclude> | |
− | + | __NOTOC__ __NOEDITSECTION__ | |
− | + | == Purpose == | |
− | + | To easily produce boxes with matching colored titles and borders. | |
− | + | ||
+ | == Usage== | ||
+ | {| border="1" | ||
+ | !Field Name !! Usage !! Description | ||
|- | |- | ||
− | + | | color || optional || Valid options: pink, orange, yellow, green, blue and purple.<br />Default: Gray box title, white background for body, shades of gray for borders. | |
− | + | ||
− | < | + | |
− | + | ||
− | + | ||
|- | |- | ||
− | + | | float || optional || Valid options: left or right.<br />Default: left. | |
− | | | + | |
− | + | ||
|- | |- | ||
− | < | + | | width || optional || Values can be expressed in either % or px.<br />Default: adjusts to width of content. |
− | | | + | |- |
− | < | + | | title || mandatory || The title of the box. |
− | |} | + | |- |
− | + | | content || mandatory || The content to be displayed in the box. | |
− | </noinclude> | + | |- |
+ | |} | ||
+ | |||
+ | == Examples == | ||
+ | {| width="100%" | ||
+ | |width="50%"| | ||
+ | {{Box | ||
+ | | title=Default Box | ||
+ | | content=This box has all default settings. | ||
+ | }} | ||
+ | |width="50%"| | ||
+ | <pre> | ||
+ | {{Box | ||
+ | | title=Default Box | ||
+ | | content=This box has all default settings. | ||
+ | }} | ||
+ | </pre> | ||
+ | |} | ||
+ | {| width="100%" | ||
+ | |width="50%"| | ||
+ | {{Box | ||
+ | | color=blue | ||
+ | | float=right | ||
+ | | width=75% | ||
+ | | title=Blue Box | ||
+ | | content=This is a test A | ||
+ | }} | ||
+ | |width="50%"| | ||
+ | <pre> | ||
+ | {{Box | ||
+ | | color=blue | ||
+ | | float=right | ||
+ | | width=75% | ||
+ | | title=Blue Box | ||
+ | | content=This is a test A | ||
+ | }} | ||
+ | </pre> | ||
+ | |} | ||
+ | {| width="100%" | ||
+ | |width="50%"| | ||
+ | {{Box | ||
+ | | color=purple | ||
+ | | title=Purple Box | ||
+ | | content=Link to [[LDSClerks]]<br><small>follow the link above</small> | ||
+ | }} | ||
+ | |width="50%"| | ||
+ | <pre> | ||
+ | {{Box | ||
+ | | color=purple | ||
+ | | title=Purple Box | ||
+ | | content=Link to [[LDSClerks]]<br><small>follow the link</small> | ||
+ | }} | ||
+ | </pre> | ||
+ | |} | ||
+ | {| width="100%" | ||
+ | |width="50%"| | ||
+ | {{Box | ||
+ | | color=green | ||
+ | | width=500px | ||
+ | | title=Green Box | ||
+ | | content=Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. | ||
+ | }} | ||
+ | |width="50%"| | ||
+ | <pre> | ||
+ | {{Box | ||
+ | | color=green | ||
+ | | width=500px | ||
+ | | title=Green Box | ||
+ | | content=Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. | ||
+ | }} | ||
+ | </pre> | ||
+ | |} | ||
+ | |||
+ | [[Category:Templates|Box]]</noinclude> |
Latest revision as of 23:28, 15 May 2012
Purpose
To easily produce boxes with matching colored titles and borders.
Usage
Field Name | Usage | Description |
---|---|---|
color | optional | Valid options: pink, orange, yellow, green, blue and purple. Default: Gray box title, white background for body, shades of gray for borders. |
float | optional | Valid options: left or right. Default: left. |
width | optional | Values can be expressed in either % or px. Default: adjusts to width of content. |
title | mandatory | The title of the box. |
content | mandatory | The content to be displayed in the box. |
Examples
|
{{Box | title=Default Box | content=This box has all default settings. }} |
|
{{Box | color=blue | float=right | width=75% | title=Blue Box | content=This is a test A }} |
|
{{Box | color=purple | title=Purple Box | content=Link to [[LDSClerks]]<br><small>follow the link</small> }} |
|
{{Box | color=green | width=500px | title=Green Box | content=Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. }} |