Difference between revisions of "Template:Wbox"

From Organic Design wiki
(margin)
Line 1: Line 1:
{| align={{{align|right}}} style="border-spacing:8px; margin:8px;"
+
<includeonly>{| align={{{align|right}}} style="border-spacing:8px; margin:8px;"
 
{{#switch: {{{colour|purple}}} |
 
{{#switch: {{{colour|purple}}} |
green={{!}} style="width:{{{width|300}}}px; border:1px solid #cef2e0; background:#f5fffa; vertical-align:top; color:#000;"{{!}} |
+
green={{!}} class="MainPageBG style="width:{{{width|300}}}px; border:1px solid #cef2e0; background:#f5fffa; vertical-align:top; color:#000;"{{!}} |
blue={{!}} style="width:{{{width|300}}}px; border:1px solid #cedff2; background:#f5faff; vertical-align:top"{{!}}|
+
blue={{!}} class="MainPageBG style="width:{{{width|300}}}px; border:1px solid #cedff2; background:#f5faff; vertical-align:top"{{!}}|
purple={{!}} style="width:{{{width|300}}}px; border:1px solid #ddcef2; background:#faf5ff; vertical-align:top; color:#000;"{{!}}
+
purple={{!}} class="MainPageBG" style="width:{{{width|300}}}px; border:1px solid #ddcef2; background:#faf5ff; vertical-align:top; color:#000;"{{!}}
 
}}
 
}}
 
{|width="100%" cellpadding="2" cellspacing="5" style="vertical-align:top; background:{#switch: {{{colour|purple}}}|green=#f5fffa;|#faf5ff; color:#000}};"
 
{|width="100%" cellpadding="2" cellspacing="5" style="vertical-align:top; background:{#switch: {{{colour|purple}}}|green=#f5fffa;|#faf5ff; color:#000}};"
Line 12: Line 12:
 
|}
 
|}
 
|}
 
|}
 +
</includeonly>
  
 
<noinclude>==Usage==
 
<noinclude>==Usage==
Line 17: Line 18:
 
*contents = optional, if supplied the wikitext is placed under the box
 
*contents = optional, if supplied the wikitext is placed under the box
 
*colour = green|blue|purple (default)
 
*colour = green|blue|purple (default)
</noinclude>
+
*align = left|center|right (default)
 +
*width = pixel number (300 default)
  
 +
==Examples==
 +
Wikitext content;
 +
<pre>
 +
{{User:Zven/Wbox|name=Foo|content=Fodda|colour=purple|align=center|width=100}}
 +
{{User:Zven/Wbox|name=Foo|content=Fodda|colour=green|align=center|width=100}}
 +
{{User:Zven/Wbox|name=Foo|content=Fodda|colour=blue|align=center|width=100}}
 +
</pre>
 +
Renders;
 +
{| =
 +
|- align="center" valign="top"
 +
| {{User:Zven/Wbox|name=Foo|content=Fodda|colour=purple|align=center|width=100}}
 +
| {{User:Zven/Wbox|name=Foo|content=Fodda|colour=green|align=center|width=100}}
 +
| {{User:Zven/Wbox|name=Foo|content=Fodda|colour=blue|align=center|width=100}}
 +
|}
  
 
+
</noinclude>
<!--
 
 
 
{|style="border-spacing:8px; margin:0px -8px;"
 
|class="MainPageBG" style="width:55%; border:1px solid #cef2e0; background:#f5fffa; vertical-align:top; color:#000;"|
 
{|width="100%" cellpadding="2" cellspacing="5" style="vertical-align:top; background:#f5fffa;"
 
green =! <h2 style="margin:0; background:#cef2e0; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">Today's featured article</h2>
 
 
 
{|style="border-spacing:8px; margin:0px -8px;"
 
|class="MainPageBG" style="width:45%; border:1px solid #cedff2; background:#f5faff; vertical-align:top"|
 
{| width="100%" cellpadding="2" cellspacing="5" style="vertical-align:top; background:#f5faff;"
 
blue = ! <h2 style="margin:0; background:#cedff2; font-size:120%; font-weight:bold; border:1px solid #a3b0bf; text-align:left; color:#000; padding:0.2em 0.4em;">In the news</h2>
 
 
 
{| style="border-spacing:8px; margin:-8px -8px;"
 
|class="MainPageBG" style="width:100%; border:1px solid #ddcef2; background:#faf5ff; vertical-align:top; color:#000;"|
 
{| cellpadding="2" cellspacing="5" style="vertical-align:top; background:#faf5ff; color:#000"
 
purple = ! <h2 style="margin:0; background:#ddcef2; font-size:120%; font-weight:bold; border:1px solid #afa3bf; text-align:left; color:#000; padding:0.2em 0.4em;">Today's featured picture</h2>
 
-->
 

Revision as of 22:43, 5 December 2007


Usage

  • name = article name, name used in box, if {{{contents}}} is omitted, then the name is a link, and {{{name}}} is transcluded under the box
  • contents = optional, if supplied the wikitext is placed under the box
  • colour = green|blue|purple (default)
  • align = left|center|right (default)
  • width = pixel number (300 default)

Examples

Wikitext content;

{{User:Zven/Wbox|name=Foo|content=Fodda|colour=purple|align=center|width=100}}
{{User:Zven/Wbox|name=Foo|content=Fodda|colour=green|align=center|width=100}}
{{User:Zven/Wbox|name=Foo|content=Fodda|colour=blue|align=center|width=100}}

Renders;

User:Zven/Wbox User:Zven/Wbox User:Zven/Wbox