Difference between revisions of "Template:Characterbox"
From LGPedia
(Template editing...*shakes head*) |
m (Once More, With Feeling) |
||
Line 1: | Line 1: | ||
− | <includeonly><div style="float: {{{float|none}}}; width: {{{width|240}}}px; height: {{{height|auto}}}; overflow: visible; background: {{{background|transparent}}}; border: {{{border|none}}};">{{ #if: {{{image|}}} | <div style="float: left; border-right: {{{imageborder|none}}}; border-bottom: {{{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; padding: 0em 0.5em 0em 0.5em;">{{ #ifexist: {{{charactername}}} | [[{{{charactername}}}]] |{{{charactername|''character's name''}}} }}</p><p style="color: {{{actorname-color|Black}}}; font-size: {{{actorname-size|{{ #expr: {{{width|240}}}/21 }}}}}px; padding: 0em 0.5em 0em 0.5em;">{{ #if: {{{actorname|}}} | 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; padding: | + | <includeonly><div style="float: {{{float|none}}}; width: {{{width|240}}}px; height: {{{height|auto}}}; overflow: visible; background: {{{background|transparent}}}; border: {{{border|none}}};">{{ #if: {{{image|}}} | <div style="float: left; border-right: {{{imageborder|none}}}; border-bottom: {{{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; padding: 0em 0.5em 0em 0.5em;">{{ #ifexist: {{{charactername}}} | [[{{{charactername}}}]] |{{{charactername|''character's name''}}} }}</p><p style="color: {{{actorname-color|Black}}}; font-size: {{{actorname-size|{{ #expr: {{{width|240}}}/21 }}}}}px; padding: 0em 0.5em 0em 0.5em;">{{ #if: {{{actorname|}}} | 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; padding: 0.2em 0.5em 0em 0.5em;">{{{characterblurb|''character blurb missing''}}}</p></div></includeonly><noinclude> |
This template creates character boxes in variable sizes, for use on [[Characters]] and [[KM Characters]], for example. | This template creates character boxes in variable sizes, for use on [[Characters]] and [[KM Characters]], for example. | ||
Revision as of 04:28, 13 September 2007
This template creates character boxes in variable sizes, for use on Characters and KM Characters, for example.
Usage
{{Characterbox |float= |width= |height= |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 |
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. 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-first 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. }}
The minimalist version:
{{Characterbox |image=0167-DanielLaughing-Cropped.JPG |charactername=Daniel |actorname=Yousef Abu-Taleb |characterblurb=[[Bree]]'s loyal friend and budding filmmaker. }}
A micro-box:
{{Characterbox |width=180 |border=1px solid MidnightBlue |charactername=Daniel |actorname=Yousef Abu-Taleb |characterblurb=[[Bree]]'s loyal friend and budding filmmaker. }}