Difference between revisions of "Template:Characterbox"
From LGPedia
					
										
					
					|  (test) | m | ||
| (25 intermediate revisions by 6 users not shown) | |||
| Line 1: | Line 1: | ||
| − | <includeonly> | + | <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|link={{ #ifexist: {{{charactername}}} | {{{charactername|}}} |}}]]</div></div></div>|}} | 
| − | <div style= | + | <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> | 
| − | border:{{{border | + | ==New Characterbox template== | 
| + | This template creates character boxes like those on [[lonelygirl15 characters]], for example. | ||
| − | + | ==Usage== | |
| − | | | + | <pre>{{Characterbox | 
| − | | | + | |width= | 
| − | |  | + | |height= | 
| − | | | + | |background= | 
| − | |  | + | |border= | 
| − | + | |header= | |
| − | | | + | |image= | 
| − | | | + | |imagewidth= | 
| − | | | + | |imageborder= | 
| − | | | + | |charactername= | 
| − | + | |textcolor= | |
| − | + | |actorname= | |
| + | |characterblurb= | ||
| − | < | + | <!--include only if a main character--> | 
| − | + | |main=yes | |
| − | + | }}</pre> | |
| + | 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;" | |
| − | { | + | !Parameter | 
| − | + | !What to put there | |
| − | + | !Default if omitted | |
| − | === | + | |-style="background-color: #E8E8E8;" | 
| − | + | |valign="top"|'''width''' | |
| − | + | |Width of the character box | |
| − | + | |90%, if an image is specified, 100% otherwise | |
| − | + | |-style="background-color: #F5F5F5;" | |
| − | + | |valign="top"|'''height''' | |
| − | | | + | |Height of the character box, any valid css unit. | 
| − | + | |If omitted, height is automatically determined | |
| − | | | + | |-style="background-color: #E8E8E8;" | 
| − | + | |valign="top"|'''background''' | |
| − | + | |The box's background color. Accepts any valid HTML color name or code. | |
| − | + | |transparent | |
| − | | | + | |-style="background-color: #F5F5F5;" | 
| − | | | + | |valign="top"|'''border''' | 
| − | | | + | |The box's border color. Accepts any valid HTML color name or code. | 
| − | | | + | |#aaa | 
| − | | | + | |-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''' | |
| − | | | + | |Purely the name of the image to use, without "Image:" prefix. | 
| − | | | + | |None. If omitted, no image is displayed. | 
| − | + | |-style="background-color: #E8E8E8;" | |
| − | + | |valign="top"|'''imagewidth''' | |
| − | + | |The width of the image to display, in pixels, without "px". | |
| − | | | + | |80px for main characters, 50px otherwise | 
| − | + | |-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''' | |
| − | |  | + | |Purely the name of the character, nothing else. If a page with that name exists, a link will be created automatically. | 
| − | |border | + | |{{color|red|'''Name missing.'''}} | 
| − | | | + | |-style="background-color: #F5F5F5;" | 
| − | | | + | |valign="top"|'''textcolor''' | 
| − | | | + | |The color of text in the character box. Accepts any valid HTML color name or code. | 
| − | + | |#000 | |
| − | + | |-style="background-color: #E8E8E8;" | |
| − | + | |valign="top"|'''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". | |
| − | | | + | |-style="background-color: #F5F5F5;" | 
| − | + | |valign="top"|'''characterblurb''' | |
| − | + | |Whatever you want to say about that character. | |
| − | + | |{{color|red|'''No description entered.'''}} | |
| − | + | ||
| − | |- | + | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | | | + | |
| − | + | ||
| − | + | ||
| − | | | + | |
| − | | | + | |
| − | + | ||
| − | | | + | |
| − | + | ||
| − | | | + | |
| − | | | + | |
| − | | | + | |
| − | | | + | |
| − | + | ||
| − | + | ||
| − | | | + | |
| − | + | ||
| − | + | ||
| − | |border | + | |
| − | | | + | |
| − | + | ||
| − | | | + | |
| − | | | + | |
| − | | | + | |
| − | | | + | |
| − | | | + | |
| − | + | ||
| − | | | + | |
| − | | | + | |
| − | | | + | |
| − | + | ||
| − | + | ||
| − | |  | + | |
| − | | | + | |
| − | + | ||
| − | | | + | |
| − | | | + | |
| − | | | + | |
| − | + | ||
| − | | | + | |
| − | | | + | |
| − | | | + | |
| − | | | + | |
| − | | | + | |
| − | + | ||
| − | + | ||
| − | }} | + | |
| − | + | ||
| |} | |} | ||
| − | + | [[Category:Templates|{{PAGENAME}}]]</noinclude> | |
| − | + | ||
| − | </noinclude> | + | |
Latest revision as of 22:51, 10 April 2010
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. | 
