Difference between revisions of "Template:Characterbox"

From LGPedia
Jump to: navigation, search
(smaller pic box)
m
 
(19 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>
"float:{{{float|left}}};
+
<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-width|{{{border-s|1}}}}}}px solid {{{border-color|{{{1|{{{border-c|{{{id-c|#999}}}}}}}}}}}}; margin:1px;">
+
==New Characterbox template==
 +
This template creates character boxes like those on [[lonelygirl15 characters]], for example.
  
{| cellspacing="0" style="width:240px; background:{{{info-background|{{{2|{{{info-c|#EEE}}}}}}}}};"
+
==Usage==
|-
+
<pre>{{Characterbox
|rowspan=2 style="width:10px; height:90px; background:{{{logo-background|{{{1|{{{id-c|#DDD}}}}}}}}}; text-align:center; font-size:{{{logo-size|{{{5|{{{id-s|14}}}}}}}}}px; color:{{{logo-color|{{{id-fc|black}}}}}};" | '''{{{logo|{{{3|{{{id|id}}}}}}}}}'''
+
|width=
| style="font-size:{{{charactername-size|{{{charactername-size|8}}}}}}px; padding:4px; line-height:1.25em; color:{{{charactername-color|{{{charactername-color|black}}}}}};" | {{{charactername|{{{4|{{{charactername|''character's name''}}}}}}}}}
+
|height=
|-
+
|background=
| style="font-size:{{{actorname-size|{{{actorname-size|8}}}}}}px; padding:4px; line-height:1.25em; color:{{{actorname-color|{{{actorname-color|black}}}}}};" | Portrayed by:
+
|border=
{{{actorname|{{{4|{{{actorname|''actor's name''}}}}}}}}}
+
|header=
|-
+
|image=
|colspan=2 align=center  style="height:60px;font-size:{{{characterblurb-size|{{{characterblurb-size|8}}}}}}px; padding:4px; line-height:1.25em; color:{{{characterblurb-color|{{{characterblurb-color|black}}}}}};" | {{{characterblurb|{{{4|{{{characterblurb|''character blurb''}}}}}}}}}
+
|imagewidth=
|-
+
|imageborder=
|}
+
|charactername=
</div>
+
|textcolor=
</includeonly>
+
|actorname=
 +
|characterblurb=
  
<noinclude>
+
<!--include only if a main character-->
Early version of a character box for use in the redesign of the [[Characters]] page. Only tested in Firefox so far.
+
|main=yes
==Examples==
+
}}</pre>
 +
All parameters have a default value, so if a certain parameter is unneeded, it can be omitted without damage.
  
===Plain===
+
{|align="center" width="90%" cellspacing="1" cellpadding="3" style="background-color: #cecece;"
{{Characterbox}}
+
!Parameter
<br clear="left"/>
+
!What to put there
 
+
!Default if omitted
===Simple usage in a table===
+
|-style="background-color: #E8E8E8;"
<center>
+
|valign="top"|'''width'''
{| align=center style="width:720px" border=0
+
|Width of the character box
|-
+
|90%, if an image is specified, 100% otherwise
| {{Characterbox
+
|-style="background-color: #F5F5F5;"
|border-s=5
+
|valign="top"|'''height'''
|id-c=#194B95
+
|Height of the character box, any valid css unit.
|characterbox-background=#f5faff
+
|If omitted, height is automatically determined
|id=[[Image:0136-BreeShrugging-Cropped.jpg|120px]]
+
|-style="background-color: #E8E8E8;"
|charactername-size=14
+
|valign="top"|'''background'''
|charactername-color=black
+
|The box's background color. Accepts any valid HTML color name or code.
|charactername='''[[Bree]]'''
+
|transparent
|actorname-size=10
+
|-style="background-color: #F5F5F5;"
|actorname-color=black
+
|valign="top"|'''border'''
|actorname=[[Jessica Lee Rose]]
+
|The box's border color. Accepts any valid HTML color name or code.
|characterblurb-size=12
+
|#aaa
|characterblurb-color=black
+
|-style="background-color: #E8E8E8;"
|characterblurb=A home-schooled teen on the run from a powerful cult.
+
|valign="top"|'''header'''
}}
+
|The box's header color. Accepts any valid HTML color name or code.
| {{Characterbox
+
|Defaults to the background color.
|border-s=5
+
|-style="background-color: #F5F5F5;"
|id-c=#194B95
+
|valign="top"|'''image'''
|characterbox-background=#f5faff
+
|Purely the name of the image to use, without "Image:" prefix.
|id=[[Image:0167-DanielLaughing-Cropped.JPG|120px]]
+
|None. If omitted, no image is displayed.
|charactername-size=14
+
|-style="background-color: #E8E8E8;"
|charactername-color=black
+
|valign="top"|'''imagewidth'''
|charactername='''[[Daniel]]'''
+
|The width of the image to display, in pixels, without "px".
|actorname-size=10
+
|80px for main characters, 50px otherwise
|actorname-color=black
+
|-style="background-color: #F5F5F5;"
|actorname=[[Yousef Abu-Taleb]]
+
|valign="top"|'''imageborder'''
|characterblurb-size=12
+
|The border around the image. Accepts any valid HTML color name or code.
|characterblurb-color=black
+
|Defaults to the border color.
|characterblurb=Blurb goes here.
+
|-style="background-color: #E8E8E8;"
}}
+
|valign="top"|'''charactername'''
| {{Characterbox
+
|Purely the name of the character, nothing else. If a page with that name exists, a link will be created automatically.
|border-s=5
+
|{{color|red|'''Name missing.'''}}
|id-c=#194B95
+
|-style="background-color: #F5F5F5;"
|characterbox-background=#f5faff
+
|valign="top"|'''textcolor'''
|id=[[Image:0155-JonasAtTheParty-Cropped.jpg|120px]]
+
|The color of text in the character box. Accepts any valid HTML color name or code.
|charactername-size=14
+
|#000
|charactername-color=black
+
|-style="background-color: #E8E8E8;"
|charactername='''[[Jonas]]'''
+
|valign="top"|'''actorname'''
|actorname-size=10
+
|Purely the name of the actor, nothing else. If a page with that name exists, a link will be created automatically.
|actorname-color=black
+
|The text "Unknown".
|actorname=[[Jackson Davis]]
+
|-style="background-color: #F5F5F5;"
|characterblurb-size=12
+
|valign="top"|'''characterblurb'''
|characterblurb-color=black
+
|Whatever you want to say about that character.
|characterblurb=Blurb goes here.
+
|{{color|red|'''No description entered.'''}}
}}
+
|-
+
|}
+
</center>
+
<br>
+
<center>
+
{| align=center style="width:720px" border=0
+
|-
+
| {{Characterbox
+
|border-s=5
+
|id-c=#194B95
+
|characterbox-background=#f5faff
+
|id=[[Image:NBR001-Cropped.jpg|120px]]
+
|charactername-size=14
+
|charactername-color=black
+
|charactername='''[[Nikki Bower|Nikki B.]]'''
+
|actorname-size=10
+
|actorname-color=black
+
|actorname=[[Alli Danziger]]
+
|characterblurb-size=12
+
|characterblurb-color=black
+
|characterblurb=A reporter hot on the trail of [[BDJ]].
+
}}
+
| {{Characterbox
+
|border-s=5
+
|id-c=#194B95
+
|characterbox-background=#f5faff
+
|id=[[Image:JUL004-Julia-Cropped.jpg|120px]]
+
|charactername-size=14
+
|charactername-color=black
+
|charactername='''[[Jules]]'''
+
|actorname-size=10
+
|actorname-color=black
+
|actorname=Unknown
+
|characterblurb-size=12
+
|characterblurb-color=black
+
|characterblurb=Apparently the [[List of New Girl Candidates|new girl]] for the [[The Ceremony (ritual)|ceremony]].
+
}}
+
| {{Characterbox
+
|border-s=5
+
|id-c=#194B95
+
|characterbox-background=#f5faff
+
|id=[[Image:TAY001-TaylorSmiling.jpg|120px]]
+
|charactername-size=14
+
|charactername-color=black
+
|charactername='''[[Taylor]]'''
+
|actorname-size=10
+
|actorname-color=black
+
|actorname=[[Becki Kregoski]]
+
|characterblurb-size=12
+
|characterblurb-color=black
+
|characterblurb=Helps out [[BDJ]] to find the [[List of New Girl Candidates|new girl]].
+
}}
+
|-
+
 
|}
 
|}
</center>
+
[[Category:Templates|{{PAGENAME}}]]</noinclude>
<br>
+
</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.