Difference between revisions of "Template:Characterbox"
From LGPedia
					
										
					
					 (Switching to the new template (fingers crossed))  | 
				|||
| Line 1: | Line 1: | ||
| − | <includeonly><div style="  | + | <includeonly><div style="background-color: {{{background|transparent}}}; margin-bottom: 1.5em; border: {{{border|#aaa}}} 1px solid; height:{{{height|auto}}}; width:{{{width|{{#if: {{{image|}}}|90%|100%}}}}};">{{#if: {{{image|}}}|<div style="position: relative; left: -4px; top: -4px;"><div style="float: left; border: 4px solid {{{imageborder|{{{border|#aaa}}}}}};"><div style="border: 1px solid #fff;">[[Image:{{{image}}}|{{{imagewidth|{{#if: {{{main|}}}|80|60}}}}}px]]</div></div></div>|}}  | 
| − | This template creates character boxes   | + | <div style="background-color: {{{header|{{{background|transparent}}}}}}; margin: 0px; padding: {{#if: {{{main|}}}|0.3em 0.2em 0.2em 0.5em|0.1em 0.2em 0.1em 0.5em}}; font-weight:bold; border-bottom: 1px solid {{{border|none}}}; text-align:left;{{#if: {{{main|}}}||font-size:12px;}}">{{ #ifexist: {{{charactername}}} | '''[[{{{charactername}}}]]''' |'''{{{charactername|{{color|red|Name missing.}}}}}''' }}</div>  | 
| + | <p style="color: {{{textcolor|#000}}}; font-size: 10px; padding: 0em 0.5em 0em 0.5em; text-align: left;">{{ #if: {{{actorname|}}} | Portrayed by: {{ #ifexist: {{{actorname}}} | [[{{{actorname}}}]] | {{{actorname|Unknown}}} }} |}}</p><p style="color: {{{textcolor|#000}}}; font-size: 11px; clear: both; padding: 0.2em 0.5em 0em 0.5em; text-align: left;">{{{characterblurb|{{color|red|'''No description entered.'''}}}}}</p></div></includeonly><noinclude>  | ||
| + | ==New Characterbox template==  | ||
| + | This template creates character boxes like those on [[lonelygirl15 characters]], for example.  | ||
==Usage==  | ==Usage==  | ||
<pre>{{Characterbox  | <pre>{{Characterbox  | ||
| − | |||
|width=  | |width=  | ||
|height=  | |height=  | ||
|background=  | |background=  | ||
|border=  | |border=  | ||
| + | |header=  | ||
|image=  | |image=  | ||
| − | |||
|imagewidth=  | |imagewidth=  | ||
| + | |imageborder=  | ||
|charactername=  | |charactername=  | ||
| − | |  | + | |textcolor=  | 
| − | + | ||
|actorname=  | |actorname=  | ||
| − | |||
| − | |||
|characterblurb=  | |characterblurb=  | ||
| − | + | ||
| − | + | <!--include only if a main character-->  | |
| − | |  | + | |main=yes  | 
}}</pre>  | }}</pre>  | ||
| − | All parameters have a default value, so if a certain parameter is unneeded, it can be omitted without damage   | + | All parameters have a default value, so if a certain parameter is unneeded, it can be omitted without damage.  | 
{|align="center" width="90%" cellspacing="1" cellpadding="3" style="background-color: #cecece;"  | {|align="center" width="90%" cellspacing="1" cellpadding="3" style="background-color: #cecece;"  | ||
| Line 29: | Line 29: | ||
!What to put there  | !What to put there  | ||
!Default if omitted  | !Default if omitted  | ||
| − | |||
| − | |||
| − | |||
| − | |||
|-style="background-color: #E8E8E8;"  | |-style="background-color: #E8E8E8;"  | ||
|valign="top"|'''width'''  | |valign="top"|'''width'''  | ||
| − | |Width of the character box  | + | |Width of the character box  | 
| − | |  | + | |90%, if an image is specified, 100% otherwise  | 
|-style="background-color: #F5F5F5;"  | |-style="background-color: #F5F5F5;"  | ||
|valign="top"|'''height'''  | |valign="top"|'''height'''  | ||
| Line 43: | Line 39: | ||
|-style="background-color: #E8E8E8;"  | |-style="background-color: #E8E8E8;"  | ||
|valign="top"|'''background'''  | |valign="top"|'''background'''  | ||
| − | |The box's background color. Accepts any valid HTML color name or code.   | + | |The box's background color. Accepts any valid HTML color name or code.  | 
| − | |  | + | |transparent  | 
|-style="background-color: #F5F5F5;"  | |-style="background-color: #F5F5F5;"  | ||
|valign="top"|'''border'''  | |valign="top"|'''border'''  | ||
| − | |  | + | |The box's border color. Accepts any valid HTML color name or code.  | 
| − | + | |#aaa  | |
| − | + | ||
| − | + | ||
| − | |  | + | |
|-style="background-color: #E8E8E8;"  | |-style="background-color: #E8E8E8;"  | ||
| + | |valign="top"|'''header'''  | ||
| + | |The box's header color. Accepts any valid HTML color name or code.  | ||
| + | |Defaults to the background color.  | ||
| + | |-style="background-color: #F5F5F5;"  | ||
|valign="top"|'''image'''  | |valign="top"|'''image'''  | ||
|Purely the name of the image to use, without "Image:" prefix.  | |Purely the name of the image to use, without "Image:" prefix.  | ||
|None. If omitted, no image is displayed.  | |None. If omitted, no image is displayed.  | ||
| − | |||
| − | |||
| − | |||
| − | |||
|-style="background-color: #E8E8E8;"  | |-style="background-color: #E8E8E8;"  | ||
|valign="top"|'''imagewidth'''  | |valign="top"|'''imagewidth'''  | ||
|The width of the image to display, in pixels, without "px".  | |The width of the image to display, in pixels, without "px".  | ||
| − | |  | + | |80px for main characters, 50px otherwise  | 
|-style="background-color: #F5F5F5;"  | |-style="background-color: #F5F5F5;"  | ||
| + | |valign="top"|'''imageborder'''  | ||
| + | |The border around the image. Accepts any valid HTML color name or code.  | ||
| + | |Defaults to the border color.  | ||
| + | |-style="background-color: #E8E8E8;"  | ||
|valign="top"|'''charactername'''  | |valign="top"|'''charactername'''  | ||
|Purely the name of the character, nothing else. If a page with that name exists, a link will be created automatically.  | |Purely the name of the character, nothing else. If a page with that name exists, a link will be created automatically.  | ||
| − | |  | + | |{{color|red|'''Name missing.'''}}  | 
| − | + | ||
| − | |  | + | |
| − | + | ||
| − | + | ||
|-style="background-color: #F5F5F5;"  | |-style="background-color: #F5F5F5;"  | ||
| − | |valign="top"|'''  | + | |valign="top"|'''textcolor'''  | 
| − | |The   | + | |The color of text in the character box. Accepts any valid HTML color name or code.  | 
| − | |  | + | |#000  | 
|-style="background-color: #E8E8E8;"  | |-style="background-color: #E8E8E8;"  | ||
|valign="top"|'''actorname'''  | |valign="top"|'''actorname'''  | ||
|Purely the name of the actor, nothing else. If a page with that name exists, a link will be created automatically.  | |Purely the name of the actor, nothing else. If a page with that name exists, a link will be created automatically.  | ||
|The text "Unknown".  | |The text "Unknown".  | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
|-style="background-color: #F5F5F5;"  | |-style="background-color: #F5F5F5;"  | ||
|valign="top"|'''characterblurb'''  | |valign="top"|'''characterblurb'''  | ||
|Whatever you want to say about that character.  | |Whatever you want to say about that character.  | ||
| − | |  | + | |{{color|red|'''No description entered.'''}}  | 
| − | + | ||
| − | |  | + | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
|}  | |}  | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
[[Category:Templates|{{PAGENAME}}]]</noinclude>  | [[Category:Templates|{{PAGENAME}}]]</noinclude>  | ||
Revision as of 17:59, 6 April 2009
New Characterbox template
This template creates character boxes like those on lonelygirl15 characters, for example.
Usage
{{Characterbox
|width=
|height=
|background=
|border=
|header=
|image=
|imagewidth=
|imageborder=
|charactername=
|textcolor=
|actorname=
|characterblurb=
<!--include only if a main character-->
|main=yes
}}
All parameters have a default value, so if a certain parameter is unneeded, it can be omitted without damage.
| Parameter | What to put there | Default if omitted | 
|---|---|---|
| width | Width of the character box | 90%, if an image is specified, 100% otherwise | 
| height | Height of the character box, any valid css unit. | If omitted, height is automatically determined | 
| background | The box's background color. Accepts any valid HTML color name or code. | transparent | 
| border | The box's border color. Accepts any valid HTML color name or code. | #aaa | 
| header | The box's header color. Accepts any valid HTML color name or code. | Defaults to the background color. | 
| image | Purely the name of the image to use, without "Image:" prefix. | None. If omitted, no image is displayed. | 
| imagewidth | The width of the image to display, in pixels, without "px". | 80px for main characters, 50px otherwise | 
| imageborder | The border around the image. Accepts any valid HTML color name or code. | Defaults to the border color. | 
| charactername | Purely the name of the character, nothing else. If a page with that name exists, a link will be created automatically. | Name missing. | 
| textcolor | The color of text in the character box. Accepts any valid HTML color name or code. | #000 | 
| actorname | Purely the name of the actor, nothing else. If a page with that name exists, a link will be created automatically. | The text "Unknown". | 
| characterblurb | Whatever you want to say about that character. | No description entered. |