Template:Box

From New York City LDS History
(Difference between revisions)
Jump to: navigation, search
(Undo revision 2736 by LDSdbSysop (talk))
Line 1: Line 1:
<includeonly>{| width="{{{width}}}" style="float:{{{float}}};"
+
<noinclude>{{Box |title=example |content={{Lorem ipsum}} |width=50%}}</noinclude><includeonly> <div id="{{{title|}}}">
| class="MainPageBG" style="width:100%; border:1px solid #{{ #switch: {{{color}}}
+
{|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;"  
| 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}}}
+
<!-- 1: Tab settings -->
|}
+
| 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}}};}}" |
|}</includeonly><noinclude>
+
[[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|}}}]]
__NOTOC__  __NOEDITSECTION__
+
<div style="padding-left:12px; margin-top:-37px;">[[File:{{{logo|Crystal_Clear_app_xmag.png}}}|{{{px|21}}}px |link={{{link|}}}]]</div>
== Purpose ==
+
<div style="padding-left:43px; margin-top:-{{{height_px|{{#expr:{{{px|21}}}+4}}}}}px; font-size:130%;"> '''{{{title}}}'''</div>
To easily produce boxes with matching colored titles and borders.
+
<!-- 2 -->
 
+
| {{#if:{{{link|}}}| {{!!}} }}
== 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.
+
<!-- 3: Edit box -->
 +
{{#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>
 +
}}
 
|-
 
|-
| float || optional || Valid options: left or right.<br />Default: left.
+
<!-- 4: Content space -->
 +
| 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}}}
 
|-
 
|-
| width || optional || Values can be expressed in either % or px.<br />Default: adjusts to width of content.
+
<!-- 5: Bottom tray -->
|-
+
| 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}}}]]}}
| title || mandatory || The title of the box.
+
<div style="font-size:{{#if:{{{footer|}}}|x-small|0%}};">{{#if:{{{footer|}}}|&nbsp;{{{footer}}}}}</div>
|-
+
|}</div></includeonly><noinclude>
| content || mandatory || The content to be displayed in the box.
+
{{Documentation}}
|-
+
</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>
+

Revision as of 23:27, 15 May 2012

example

Template:Lorem ipsum
[create] Template documentation
Personal tools
Namespaces

Variants
Actions
our other site
Navigation
Toolbox