Template:Box

From New York City LDS History
(Difference between revisions)
Jump to: navigation, search
(Undo revision 2738 by LDSdbSysop (talk))
 
Line 1: Line 1:
<noinclude>{{Box |title=example |content={{Lorem ipsum}} |width=50%}}</noinclude><includeonly> <div id="{{{title|}}}">
+
<includeonly>{| width="{{{width}}}" style="float:{{{float}}};"
{|style="margin-bottom: .5 em; font-size: 95%; text-align: left; padding: -2px; background: none; width:{{{width|100%}}}; {{#if:{{{height|}}}|height:{{{height}}}}}; border-spacing:0;"  
+
| 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>
 
|-
 
|-
<!-- 1: Tab settings -->
+
|style="color:#000;"| {{{content}}}
| rowspan="{{#if:{{{link|}}}|2|1}}" nowrap="nowrap" style="width:{{#if:{{{link|}}}|1%|100%}}; height:37px; vertical-align:top; background:#FFF; border:2px solid {{#switch:{{{color|}}} |blue=blue |grey=darkgray |gray=darkgray |green=darkgreen |violet=blueviolet |orange=orange |yellow=gold |red=darkred |pink=darksalmon |user={{{border}}} |#default=blue}}; border-bottom: 0; padding:0; padding-right: .5em; margin:0; {{border-radius|0 {{#if:{{{link|}}}|1em|0}} 0 0}}; {{#if:{{{bg|}}}|background-color:{{{bg}}};}}" |
+
|}
[[File:cartella_{{#switch:{{{color|}}} |blue=blu |gray=grigia |grey=grigia |green=verde |violet=viola |orange=arancione |red=roug |pink=rossa |yellow=giallo |user={{{cartella}}}|#default=blu}}.{{{ext|jpg}}}|link={{{link|}}}]]
+
|}</includeonly><noinclude>
<div style="padding-left:12px; margin-top:-37px;">[[File:{{{logo|Crystal_Clear_app_xmag.png}}}|{{{px|21}}}px |link={{{link|}}}]]</div>
+
__NOTOC__  __NOEDITSECTION__
<div style="padding-left:43px; margin-top:-{{{height_px|{{#expr:{{{px|21}}}+4}}}}}px; font-size:130%;"> '''{{{title}}}'''</div>
+
== Purpose ==
<!-- 2 -->
+
To easily produce boxes with matching colored titles and borders.
| {{#if:{{{link|}}}| {{!!}} }}
+
 
 +
== Usage==
 +
{| border="1"
 +
!Field Name !! Usage !! Description
 
|-
 
|-
<!-- 3: Edit box -->
+
| 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.
{{#if:{{{link|}}}| {{!}} style="vertical-align:bottom; text-align:center; padding-left:0; padding-bottom:0; border-bottom:2px solid {{#switch:{{{color|}}} |blue=blue |grey=darkgray |gray=darkgray |green=darkgreen |violet=blueviolet |orange=orange |yellow=gold |red=darkred |pink=darksalmon |user={{{border}}} |#default=blue}};" {{!}}
+
<div style="float:left; padding:0 .5em 0 .5em; border-left:0; border-bottom:0; font-size:85%; {{border-radius|0 1em 0 0}} border: 1px solid {{#switch:{{{color|}}} |blue=blue |grey=darkgray |gray=darkgray |green=darkgreen |violet=blueviolet |orange=orange |yellow=gold |red=darkred |pink=darksalmon |user={{{border}}} |#default=blue}}; border-left:0; border-bottom:0; background:{{#switch:{{{color|}}} |blue=lightblue |grey=lightgray |gray=lightgray |green=lightgreen |violet=violet |orange=gold |yellow=yellow |red=salmon |pink=lightsalmon |user={{{background}}} |#default=lightblue}};">{{#if:{{{logo_editlink|}}}|[[File:{{{logo_editlink}}} |20px]]}}[{{fullurl:{{{link}}}|action=edit}} edit]
+
</div>
+
}}
+
 
|-
 
|-
<!-- 4: Content space -->
+
| float || optional || Valid options: left or right.<br />Default: left.
| colspan="{{#if:{{{link|}}}|2|1}}" style="padding-left:.5em; padding-right:.5em; background:#FFF; border: 2px solid {{#switch:{{{color|}}} |blue=blue |grey=darkgray |gray=darkgray |green=darkgreen |violet=blueviolet |orange=orange |yellow=gold |red=darkred |pink=darksalmon |user={{{border}}} |#default=blue}}; border-top:0; border-bottom:0; {{#if:{{{bg|}}}|background-color:{{{bg}}};}} vertical-align:top;" |
+
{{{content}}}
+
 
|-
 
|-
<!-- 5: Bottom tray -->
+
| width || optional || Values can be expressed in either % or px.<br />Default: adjusts to width of content.
| colspan="{{#if:{{{link|}}}|2|1}}" class="radius_bottom" style="height:8px; {{border-radius |0 0 1em 1em}} background:{{#switch:{{{color|}}} |blue=lightblue |grey=lightgray |gray=lightgray |green=lightgreen |violet=violet |orange=gold |yellow=yellow |red=salmon |pink=lightsalmon |user={{{background}}} |#default=gold}}; border:2px solid {{#switch:{{{color|}}} |blue=blue |grey=darkgray |gray=darkgray |green=darkgreen |violet=blueviolet |orange=orange |yellow=gold |red=darkred |pink=darksalmon |user={{{border}}} |#default=orange}}; border-top:0;" | {{#if:{{{footer_image|}}}|[[File:{{{footer_image}}}]]}}
+
|-
<div style="font-size:{{#if:{{{footer|}}}|x-small|0%}};">{{#if:{{{footer|}}}|&nbsp;{{{footer}}}}}</div>
+
| title || mandatory || The title of the box.
|}</div></includeonly><noinclude>
+
|-
{{Documentation}}
+
| 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

Default Box

This box has all default settings.
{{Box 
| title=Default Box
| content=This box has all default settings.
}}

Blue Box

This is a test A
{{Box 
| color=blue 
| float=right
| width=75%
| title=Blue Box
| content=This is a test A
}}

Purple Box

Link to LDSClerks
follow the link above
{{Box 
| color=purple
| title=Purple Box
| content=Link to [[LDSClerks]]<br><small>follow the link</small>
}}

Green Box

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
{{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. 
}}
Personal tools
Namespaces

Variants
Actions
our other site
Navigation
Toolbox