Difference between revisions of "Template:Characterbox"
From LGPedia
m (Changing category sort key) |
(Test save to catch problems. THIS WILL BREAK ALL CURRENT CHARACTERBOXES.) |
||
| Line 1: | Line 1: | ||
| − | <includeonly> | + | <includeonly><div style="float: {{{float|none}}}; width: {{{width|240}}}px; background: {{{background|transparent}}}; border: {{{border|none}}};">{{ #if: {{{image|}}} | <div style="float: left; border: {{{imageborder|none}}}; margin-right: 0.5em;">[[Image:{{{image}}}|{{{imagewidth|{{ #expr: {{{width|240}}}/2 }}}}}px]]</div> | }}<p style="color: {{{charactername-color|Black}}}; font-size: {{{charactername-size|{{ #expr: {{{width|240}}}/13 }}}}}px;">{{ #ifexist: {{{charactername}}} | [[{{{charactername}}}]] |{{{charactername|''character's name''}}} }}</p><p style="color: {{{actorname-color|Black}}}; font-size: {{{actorname-size|{{ #expr: {{{width|240}}}/21 }}}}}px;">Portrayed by: {{ #ifexist: {{{actorname}}} | [[{{{actorname}}}]] | {{{actorname|Unknown}}} }}</p><p style="color: {{{characterblurb-color|Black}}}; font-size: {{{characterblurb-size|{{ #expr: {{{width|240}}}/20 }}}}}px; clear: both;">{{{characterblurb|''character blurb missing''}}}</p></div></includeonly><noinclude> |
| − | <div style= | + | This template creates character boxes in variable sizes, for use on [[Characters]] and [[KM_Characters]], for example. |
| − | "float:{{{float| | + | |
| − | border:{{{border | + | |
| − | {| cellspacing=" | + | ==Usage== |
| − | |- | + | <pre>{{Characterbox |
| − | | | + | |float= |
| − | | style=" | + | |width= |
| − | | | + | |background= |
| − | | style=" | + | |border= |
| − | + | |image= | |
| − | | | + | |imageborder= |
| − | | | + | |imagewidth= |
| − | | | + | |charactername= |
| + | |charactername-size= | ||
| + | |charactername-color= | ||
| + | |actorname= | ||
| + | |actorname-size= | ||
| + | |actorname-color= | ||
| + | |characterblurb= | ||
| + | |characterblurb-size= | ||
| + | |characterblurb-color= | ||
| + | }}</pre> | ||
| + | All parameters have a default value, so if a certain parameter is unneeded, it can be omitted without damage (e.g. float). | ||
| + | |||
| + | {|align="center" width="90%" cellspacing="1" cellpadding="3" style="background-color: #cecece;" | ||
| + | !Parameter | ||
| + | !What to put there | ||
| + | !Default if omitted | ||
| + | |-style="background-color: #F5F5F5;" | ||
| + | |valign="top"|'''float''' | ||
| + | |"left" or "right", without quotes. | ||
| + | |None. If float isn't set, the box doesn't float. | ||
| + | |-style="background-color: #E8E8E8;" | ||
| + | |valign="top"|'''width''' | ||
| + | |Width of the character box, in pixels, without "px". | ||
| + | |240px | ||
| + | |-style="background-color: #F5F5F5;" | ||
| + | |valign="top"|'''background''' | ||
| + | |The box's background color. Accepts any valid HTML color name or code. <br><small>'''Note:''' In fact, this accepts any valid CSS background statement – so a knowledgable person can use background images, too.</small> | ||
| + | |#EEE | ||
| + | |-style="background-color: #E8E8E8;" | ||
| + | |valign="top"|'''border''' | ||
| + | |Any valid CSS border statement, in the form of ''size style color''. | ||
| + | ; size : Any valid size statement, e.g. "2px" | ||
| + | ; style : Any one of: dotted, dashed, solid, double, groove, ridge, inset, outset. | ||
| + | ; color : Any valid HTML color name or code. | ||
| + | |None. If omitted, there is no border. | ||
| + | |-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"|'''imageborder''' | ||
| + | |The border around the image. For input, see ''border''. | ||
| + | |None. If omitted, there is no border. | ||
| + | |-style="background-color: #F5F5F5;" | ||
| + | |valign="top"|'''imagewidth''' | ||
| + | |The width of the image to display, in pixels, without "px". | ||
| + | |Half of the box's width. | ||
| + | |-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. | ||
| + | |The text "''character's name''". | ||
| + | |-style="background-color: #F5F5F5;" | ||
| + | |valign="top"|'''charactername-size''' | ||
| + | |The text size of the character name, in pixels, without "px". | ||
| + | |One thirteenth of the box width. | ||
| + | |-style="background-color: #E8E8E8;" | ||
| + | |valign="top"|'''charactername-color''' | ||
| + | |The text color of the character name; accepts any valid HTML color name or code. | ||
| + | |Black. | ||
| + | |-style="background-color: #F5F5F5;" | ||
| + | |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: #E8E8E8;" | ||
| + | |valign="top"|'''actorname-size''' | ||
| + | |The text size of the actor name, in pixels, without "px". | ||
| + | |One twenty-oneth of the box width. | ||
| + | |-style="background-color: #F5F5F5;" | ||
| + | |valign="top"|'''actorname-color''' | ||
| + | |The text color of the actor name; accepts any valid HTML color name or code. | ||
| + | |Black. | ||
| + | |-style="background-color: #E8E8E8;" | ||
| + | |valign="top"|'''characterblurb''' | ||
| + | |Whatever you want to say about that character. | ||
| + | |The text "''character blurb missing''". | ||
| + | |-style="background-color: #F5F5F5;" | ||
| + | |valign="top"|'''characterblurb-size''' | ||
| + | |The text size of the character blurb, in pixels, without "px". | ||
| + | |One twentieth of the box width. | ||
| + | |-style="background-color: #E8E8E8;" | ||
| + | |valign="top"|'''characterblurb-color''' | ||
| + | |The text color of the character blurb; accepts any valid HTML color name or code. | ||
| + | |Black. | ||
|} | |} | ||
| − | |||
| − | |||
| − | + | ==Example== | |
| − | + | Daniel's box from [[Characters]]: | |
| − | + | <pre>{{Characterbox | |
| − | + | |width=240 | |
| − | + | |background=#f5faff | |
| − | + | |border=2px solid MidnightBlue | |
| − | < | + | |image=0167-DanielLaughing-Cropped.JPG |
| − | + | |imageborder=1px solid MidnightBlue | |
| − | + | |imagewidth=120 | |
| − | + | |charactername-size=18 | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | | | + | |
| − | | | + | |
| − | | | + | |
| − | | | + | |
| − | |charactername-size= | + | |
|charactername-color=black | |charactername-color=black | ||
| − | |charactername= | + | |charactername=Daniel |
| − | |actorname-size= | + | |actorname-size=11 |
|actorname-color=black | |actorname-color=black | ||
| − | |actorname= | + | |actorname=Yousef Abu-Taleb |
|characterblurb-size=12 | |characterblurb-size=12 | ||
|characterblurb-color=black | |characterblurb-color=black | ||
| − | |characterblurb= | + | |characterblurb=[[Bree]]'s loyal friend and budding filmmaker. |
| − | }} | + | }}</pre> |
| − | + | {{Characterbox | |
| − | | | + | |width=240 |
| − | | | + | |background=#f5faff |
| − | | | + | |border=2px solid MidnightBlue |
| − | | | + | |image=0167-DanielLaughing-Cropped.JPG |
| − | |charactername-size= | + | |imageborder=1px solid MidnightBlue |
| + | |imagewidth=120 | ||
| + | |charactername-size=18 | ||
|charactername-color=black | |charactername-color=black | ||
| − | |charactername= | + | |charactername=Daniel |
| − | |actorname-size= | + | |actorname-size=11 |
|actorname-color=black | |actorname-color=black | ||
| − | |actorname= | + | |actorname=Yousef Abu-Taleb |
|characterblurb-size=12 | |characterblurb-size=12 | ||
|characterblurb-color=black | |characterblurb-color=black | ||
| − | |characterblurb= | + | |characterblurb=[[Bree]]'s loyal friend and budding filmmaker. |
}} | }} | ||
| − | + | And the minimalist version: | |
| − | | | + | <pre>{{Characterbox |
| − | + | |image=0167-DanielLaughing-Cropped.JPG | |
| − | + | |charactername=Daniel | |
| − | + | |actorname=Yousef Abu-Taleb | |
| − | |charactername | + | |characterblurb=[[Bree]]'s loyal friend and budding filmmaker. |
| − | | | + | }}</pre> |
| − | | | + | {{Characterbox |
| − | | | + | |image=0167-DanielLaughing-Cropped.JPG |
| − | |actorname | + | |charactername=Daniel |
| − | | | + | |actorname=Yousef Abu-Taleb |
| − | + | |characterblurb=[[Bree]]'s loyal friend and budding filmmaker. | |
| − | + | ||
| − | + | ||
}} | }} | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
[[Category:Templates|{{PAGENAME}}]]</noinclude> | [[Category:Templates|{{PAGENAME}}]]</noinclude> | ||
Revision as of 03:31, 13 September 2007
This template creates character boxes in variable sizes, for use on Characters and KM_Characters, for example.
Usage
{{Characterbox
|float=
|width=
|background=
|border=
|image=
|imageborder=
|imagewidth=
|charactername=
|charactername-size=
|charactername-color=
|actorname=
|actorname-size=
|actorname-color=
|characterblurb=
|characterblurb-size=
|characterblurb-color=
}}
All parameters have a default value, so if a certain parameter is unneeded, it can be omitted without damage (e.g. float).
| Parameter | What to put there | Default if omitted |
|---|---|---|
| float | "left" or "right", without quotes. | None. If float isn't set, the box doesn't float. |
| width | Width of the character box, in pixels, without "px". | 240px |
| background | The box's background color. Accepts any valid HTML color name or code. Note: In fact, this accepts any valid CSS background statement – so a knowledgable person can use background images, too. |
#EEE |
| border | Any valid CSS border statement, in the form of size style color.
|
None. If omitted, there is no border. |
| image | Purely the name of the image to use, without "Image:" prefix. | None. If omitted, no image is displayed. |
| imageborder | The border around the image. For input, see border. | None. If omitted, there is no border. |
| imagewidth | The width of the image to display, in pixels, without "px". | Half of the box's width. |
| charactername | Purely the name of the character, nothing else. If a page with that name exists, a link will be created automatically. | The text "character's name". |
| charactername-size | The text size of the character name, in pixels, without "px". | One thirteenth of the box width. |
| charactername-color | The text color of the character name; accepts any valid HTML color name or code. | Black. |
| 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". |
| actorname-size | The text size of the actor name, in pixels, without "px". | One twenty-oneth of the box width. |
| actorname-color | The text color of the actor name; accepts any valid HTML color name or code. | Black. |
| characterblurb | Whatever you want to say about that character. | The text "character blurb missing". |
| characterblurb-size | The text size of the character blurb, in pixels, without "px". | One twentieth of the box width. |
| characterblurb-color | The text color of the character blurb; accepts any valid HTML color name or code. | Black. |
Example
Daniel's box from Characters:
{{Characterbox
|width=240
|background=#f5faff
|border=2px solid MidnightBlue
|image=0167-DanielLaughing-Cropped.JPG
|imageborder=1px solid MidnightBlue
|imagewidth=120
|charactername-size=18
|charactername-color=black
|charactername=Daniel
|actorname-size=11
|actorname-color=black
|actorname=Yousef Abu-Taleb
|characterblurb-size=12
|characterblurb-color=black
|characterblurb=[[Bree]]'s loyal friend and budding filmmaker.
}}
And the minimalist version:
{{Characterbox
|image=0167-DanielLaughing-Cropped.JPG
|charactername=Daniel
|actorname=Yousef Abu-Taleb
|characterblurb=[[Bree]]'s loyal friend and budding filmmaker.
}}