YellowWarningTriangle.png This wiki is closed in favour of the new wiki. Information shown is likely to be very out of date.

Difference between revisions of "Template:Fancy block"

From Discovery Wiki
Jump to navigationJump to search
Line 1: Line 1:
<noinclude>[[RogueCharlie]]'s template for dressing up a block of text.<!--</noinclude>
+
<noinclude>[[RogueCharlie]]'s template for dressing up a block of text.
{| {{#if: {{{wide|}}} | width="{{{wide}}}" }}
+
<!--</noinclude>{{#if: {{{border|}}} | {{#if: {{{clear|}}} | <div style="clear: {{{clear}}}; margin: 5px; border:1px solid {{{border}}}; border-radius: 10px; padding: 10px; background: {{{bgcolor}}};"> | <div style="margin: 5px; border:1px solid {{{border}}}; border-radius: 10px; padding: 10px; background: {{{bgcolor}}};">}} | {{#if: {{{clear|}}} | <div style="clear: {{{clear}}}; margin: 5px; border:1px solid #5c5c5c; border-radius: 10px; padding: 10px; background: {{{bgcolor}}};"> | <div style="margin: 5px; border:1px solid #5c5c5c; border-radius: 10px; padding: 10px; background: {{{bgcolor}}};">}}}}
|-
+
<div style="border-left: 4px solid {{{color}}}; padding-left: 10px;">
{{#if: {{{headtag|}}} | {{!}} style="border-left: 4px solid {{{color}}}; padding-left: 10px;" {{!}} {{#if: {{{header|}}} | <div style="border-bottom: 1px solid #5c5c5c; padding-bottom:5px;"><{{{headtag}}}>'''{{{header}}}''' </{{{headtag}}}>{{#if: {{{header2|}}} | {{{header2}}}}}</div>}} | {{!}} style="border-left: 4px solid {{{color}}}; padding-left: 10px;" {{!}} {{#if: {{{header|}}} | <div style="border-bottom: 1px solid #5c5c5c; padding-bottom:5px;"><span style="font-size: 1.5em;">'''{{{header}}}''' </span>{{#if: {{{header2|}}} | {{{header2}}}}}</div>}}}}
+
{{#if: {{{headtag|}}} | {{#if: {{{header|}}} | <div style="border-bottom: 1px solid #5c5c5c; padding-bottom:5px;"><{{{headtag}}}>'''{{{header}}}''' </{{{headtag}}}>{{#if: {{{header2|}}} | {{{header2}}}}}</div>}} | {{#if: {{{header|}}} | <div style="border-bottom: 1px solid #5c5c5c; padding-bottom:5px;"><span style="font-size: 1.5em;">'''{{{header}}}''' </span>{{#if: {{{header2|}}} | {{{header2}}}}}</div>}}}}
{{{body}}}
+
{{{body}}}</div></div><noinclude>-->
|}<noinclude>-->
 
  
 
== Usage ==
 
== Usage ==
 
<pre>
 
<pre>
 
{{Fancyblock
 
{{Fancyblock
| wide =  
+
| clear =
 +
| border =
 +
| bgcolor =  
 
| color =  
 
| color =  
 
| header =  
 
| header =  
Line 19: Line 20:
  
 
=== <u>Variables</u> ===
 
=== <u>Variables</u> ===
* wide = Specify the width of the table if necessary for aesthetics.
+
* clear = Choose to clear to the line. Options: left, right, or both.
 +
* border = Choose the color of your border. Default = #5c5c5c
 +
* bgcolor = background color of the block.
 
* color = Color of the left border.
 
* color = Color of the left border.
 
* header = The header for your information.
 
* header = The header for your information.
 
* headtag = Use header tags if you wish, for the page ToC.
 
* headtag = Use header tags if you wish, for the page ToC.
* header2 = Small text after your header on the same line.
+
* header2 = Small test after your header on the same line.
 
* body = The body of your information.
 
* body = The body of your information.
  
Line 31: Line 34:
 
These are examples and are not what the variable is limited to. '''Do NOT use the < and > symbols in this variable''', they will create errors in the output of the template.
 
These are examples and are not what the variable is limited to. '''Do NOT use the < and > symbols in this variable''', they will create errors in the output of the template.
 
* leave blank - The template uses <nowiki><span style="font-size: 1.5em;"></nowiki>
 
* leave blank - The template uses <nowiki><span style="font-size: 1.5em;"></nowiki>
* div - template uses <nowiki><div></nowiki> - This will force the header2 variable down to the next line of text.
+
* div - template uses <nowiki><div></nowiki> {{Warning}} This will force the header2 variable down to the next line of text.
* h2 - <nowiki><h2></nowiki> - This will force the header2 variable down to the next line of text and add the header variable to the Table of Contents.
+
* h2 - <nowiki><h2></nowiki> {{Warning}} This will force the header2 variable down to the next line of text and add the header variable to the Table of Contents.
* h3 - <nowiki><h3></nowiki> - This will force the header2 variable down to the next line of text and add the header variable to the Table of Contents.
+
* h3 - <nowiki><h3></nowiki> {{Warning}} This will force the header2 variable down to the next line of text and add the header variable to the Table of Contents.
 
* you get the point, right?
 
* you get the point, right?
* If you use an alternate tag for the header then you may insert a style too. For example: <nowiki>h3 style="font-size: 1.5em;" or div  style="font-size: 1.5em;"</nowiki>
+
* If you use an alternate tag for the header then you may insert a style too. For example: <nowiki>h3 style="font-size: 1.5em;"</nowiki>
  
 
== Result ==
 
== Result ==
 
<pre>{{Fancyblock
 
<pre>{{Fancyblock
| wide =  
+
| clear =
 +
| bgcolor =  
 
| color = #F9C45E
 
| color = #F9C45E
 
| header = Generic List
 
| header = Generic List
Line 49: Line 53:
 
}}</pre>
 
}}</pre>
 
{{Fancyblock
 
{{Fancyblock
| wide =  
+
| clear =
 +
| bgcolor =  
 
| color = #F9C45E
 
| color = #F9C45E
 
| header = Generic List
 
| header = Generic List
Line 62: Line 67:
 
<pre>
 
<pre>
 
{{Fancyblock
 
{{Fancyblock
| wide = 100%
+
| clear =  
 +
| bgcolor = #000000
 
| color = #41A317
 
| color = #41A317
 
| header = Generic Example
 
| header = Generic Example
Line 71: Line 77:
 
</pre>
 
</pre>
 
{{Fancyblock
 
{{Fancyblock
| wide = 100%
+
| clear =  
 +
| bgcolor = #000000
 
| color = #41A317
 
| color = #41A317
 
| header = Generic Example
 
| header = Generic Example

Revision as of 03:39, 2 August 2011

RogueCharlie's template for dressing up a block of text.

Usage

{{Fancyblock
| clear = 
| border = 
| bgcolor = 
| color = 
| header = 
| headtag = 
| header2 = 
| body = 
}}

Variables

  • clear = Choose to clear to the line. Options: left, right, or both.
  • border = Choose the color of your border. Default = #5c5c5c
  • bgcolor = background color of the block.
  • color = Color of the left border.
  • header = The header for your information.
  • headtag = Use header tags if you wish, for the page ToC.
  • header2 = Small test after your header on the same line.
  • body = The body of your information.


"headtag" can be:

These are examples and are not what the variable is limited to. Do NOT use the < and > symbols in this variable, they will create errors in the output of the template.

  • leave blank - The template uses <span style="font-size: 1.5em;">
  • div - template uses <div>
YellowWarningTriangle.png {{{1}}}
This will force the header2 variable down to the next line of text.
  • h2 - <h2>
YellowWarningTriangle.png {{{1}}}
This will force the header2 variable down to the next line of text and add the header variable to the Table of Contents.
  • h3 - <h3>
YellowWarningTriangle.png {{{1}}}
This will force the header2 variable down to the next line of text and add the header variable to the Table of Contents.
  • you get the point, right?
  • If you use an alternate tag for the header then you may insert a style too. For example: h3 style="font-size: 1.5em;"

Result

{{Fancyblock
| clear = 
| bgcolor = 
| color = #F9C45E
| header = Generic List
| headtag = 
| header2 = Sub-header
| body = 
* Item number 1
* Item number 2
}}
Generic List Sub-header
  • Item number 1
  • Item number 2


{{Fancyblock
| clear = 
| bgcolor = #000000
| color = #41A317
| header = Generic Example
| headtag = h3 style="font-size: 1.5em; color: Yellow;"
| header2 = Sub-header
| body = Peter Piper picked a peck of pickled peppers.
}}

Generic Example

Sub-header
Peter Piper picked a peck of pickled peppers.