Difference between revisions of "Template:Character"

Template page
m (code formatting and removing duplication of code)
(Updating the template to the new standard, redesigning the headers, relabelling Assignment header to Career Information to allow for non-Starfleet characters (ie Starfleet, political, business etc etc). Supplying an example of how the infobox works. Category values. Done so that Character and Individual templates can be reduced down to just one template and template has same look as the rest..)
Line 1: Line 1:
<div class="infobox">
<div class="infobox">
{| width="315" align="right" cellpadding="3" cellspacing="0" style="border-radius: 13px; margin-bottom: 0; padding-left: 10px;"
{| class="ibtable" align="right" cellpadding="3" cellspacing="0"
{{#if: {{{image|}}}|
{{#if: {{{image|}}}|
{{!}} colspan="2" bgcolor={{{bgcolor_value|#222222; style="border-top-right-radius: 13px; border-top-left-radius: 13px; background: #f3f3f3; color: #cccccc; font-size: smaller; text-align: center; padding: 10px;"}}} {{!}} {{{image}}}
    {{!}} class="ibimage" colspan="2" style="border-top-right-radius: 13px; border-top-left-radius: 13px;" width="315px" {{!}} {{{image}}}
    {{!}}-
    {{!}} class="ibname" colspan="2" {{!}} '''{{{name}}}'''|
        {{!}} class="ibname" colspan="2" style="border-top-right-radius: 13px; border-top-left-radius: 13px;" width="315px" {{!}} '''{{{name}}}'''
}}
}}
|-
|-
| colspan="2" style="text-align: center; color: #e5e5ed; font-size: larger; background: #304665; padding: .3rem 1.25rem;" | '''{{{name}}}'''
| class="ibheader" colspan="2" | '''Biographical Information'''
|-
|-
| colspan="2" style="text-align: center; color: #e5e5ed; background: #2a4667c9; font-size: 8pt; padding: 6px" | '''Basic information'''
{{#if: {{{fullname|}}}|
{{!}} class="ibleft" {{!}} Full Name
{{!}} class="ibright" {{!}} {{{fullname}}}
}}
|-
|-
{{#if: {{{fullname|}}}|
{{#if: {{{placeoforigin|}}}|
{{!}} bgcolor={{{bgcolor_value|#222222; style="background: #e0e0e0; padding: 8px 10px; color: #696969; font-size: smaller; width: 40%;"}}} {{!}} Full Name
{{!}} class="ibleft" {{!}} Place of Origin
{{!}} bgcolor={{{bgcolor_value|#2B2B2B; style="background: #ececec; padding: 8px 10px; color: #696969; font-size: smaller; width: 60%;"}}} {{!}} {{{fullname}}}
{{!}} class="ibright" {{!}} {{{placeoforigin}}}
}}
}}
|-
|-
{{#if: {{{species|}}}|
{{#if: {{{species|}}}|
{{!}} bgcolor={{{bgcolor_value|#222222; style="background: #e0e0e0; padding: 8px 10px; color: #696969; font-size: smaller; width: 40%;"}}} {{!}} Species
{{!}} class="ibleft" {{!}} Species
{{!}} bgcolor={{{bgcolor_value|#2B2B2B; style="background: #ececec; padding: 8px 10px; color: #696969; font-size: smaller; width: 60%;"}}} {{!}} {{{species }}}
{{!}} class="ibright" {{!}} {{{species}}}
}}
}}
|-
|-
{{#if: {{{gender|}}}|
{{#if: {{{gender|}}}|
{{!}} bgcolor={{{bgcolor_value|#222222; style="background: #e0e0e0; padding: 8px 10px; color: #696969; font-size: smaller; width: 40%;"}}} {{!}} Gender
{{!}} class="ibleft" {{!}} Gender
{{!}} bgcolor={{{bgcolor_value|#2B2B2B; style="background: #ececec; padding: 8px 10px; color: #696969; font-size: smaller; width: 60%;"}}} {{!}} {{{gender}}}
{{!}} class="ibright" {{!}} {{{gender}}}
}}
}}
|-
|-
{{#if: {{{dateofbirth|}}}|
{{#if: {{{dateofbirth|}}}|
{{!}} bgcolor={{{bgcolor_value|#222222; style="background: #e0e0e0; padding: 8px 10px; color: #696969; font-size: smaller; width: 40%;"}}} {{!}} Date of Birth
{{!}} class="ibleft" {{!}} Date of Birth
{{!}} bgcolor={{{bgcolor_value|#2B2B2B; style="background: #ececec; padding: 8px 10px; color: #696969; font-size: smaller; width: 60%;"}}} {{!}} {{{dateofbirth}}}
{{!}} class="ibright" {{!}} {{{dateofbirth}}}
}}
|-
{{#if: {{{dateofdeath|}}}|
{{!}} class="ibleft" {{!}} Date of Death
{{!}} class="ibright" {{!}} {{{dateofdeath}}}
}}
}}
|-
|-
{{#if: {{{age|}}}|
{{#if: {{{age|}}}|
{{!}} bgcolor={{{bgcolor_value|#222222; style="background: #e0e0e0; padding: 8px 10px; color: #696969; font-size: smaller; width: 40%;"}}} {{!}} Age
{{!}} class="ibleft" {{!}} Age
{{!}} bgcolor={{{bgcolor_value|#2B2B2B; style="background: #ececec; padding: 8px 10px; color: #696969; font-size: smaller; width: 60%;"}}} {{!}} {{{age}}}
{{!}} class="ibright" {{!}} {{{age}}}
}}
|-
{{#if: {{{height|}}}{{{weight|}}}{{{hair|}}}{{{eyes|}}}|
{{!}} class="ibheader" colspan="2" {{!}} '''Physical Description'''
}}
|-
{{#if: {{{height|}}}|
{{!}} class="ibleft" {{!}} Height
{{!}} class="ibright" {{!}} {{{height}}}
}}
|-
{{#if: {{{weight|}}}|
{{!}} class="ibleft" {{!}} Weight
{{!}} class="ibright" {{!}} {{{weight}}}
}}
}}
|-
|-
{{#if: {{{placeoforigin|}}}|
{{#if: {{{hair|}}}|
{{!}} bgcolor={{{bgcolor_value|#222222; style="background: #e0e0e0; padding: 8px 10px; color: #696969; font-size: smaller; width: 40%;"}}} {{!}} Place of Origin
{{!}} class="ibleft" {{!}} Hair
{{!}} bgcolor={{{bgcolor_value|#2B2B2B; style="background: #ececec; padding: 8px 10px; color: #696969; font-size: smaller; width: 60%;"}}} {{!}} {{{placeoforigin}}}
{{!}} class="ibright" {{!}} {{{hair}}}
}}
|-
{{#if: {{{eyes|}}}|
{{!}} class="ibleft" {{!}} Eyes
{{!}} class="ibright" {{!}} {{{eyes}}}
}}
|-
{{#if: {{{affiliation|}}}{{{rank|}}}{{{posting|}}}{{{position|}}}|
{{!}} class="ibheader" colspan="2" {{!}} '''Career Information'''
}}
}}
|-
|-
| colspan="2" style="text-align: center; color: #e5e5ed; background:#2a4667c9; font-size: 8pt; padding: 6px" | '''Assignment'''
{{#if: {{{affiliation|}}}|
{{!}} class="ibleft" {{!}} Affiliation
{{!}} class="ibright" {{!}} {{{affiliation}}}
}}
|-
|-
{{#if: {{{rank|}}}|
{{#if: {{{rank|}}}|
{{!}} bgcolor={{{bgcolor_value|#222222; style="background: #e0e0e0; padding: 8px 10px; color: #696969; font-size: smaller; width: 40%;"}}} {{!}} Rank
{{!}} class="ibleft" {{!}} Rank
{{!}} bgcolor={{{bgcolor_value|#2B2B2B; style="background: #ececec; padding: 8px 10px; color: #696969; font-size: smaller; width: 60%;"}}} {{!}} {{{rank}}}
{{!}} class="ibright" {{!}} {{{rank}}}
}}
}}
|-
|-
{{#if: {{{posting|}}}|
{{#if: {{{posting|}}}|
{{!}} bgcolor={{{bgcolor_value|#222222; style="background: #e0e0e0; padding:8px 10px; color: #696969; font-size: smaller; width: 40%;"}}} {{!}} Posting
{{!}} class="ibleft" {{!}} Posting
{{!}} bgcolor={{{bgcolor_value|#2B2B2B; style="background: #ececec; padding:8px 10px; color: #696969; font-size: smaller; width: 60%;"}}} {{!}} {{{posting}}}
{{!}} class="ibright" {{!}} {{{posting}}}
}}
}}
|-
|-
{{#if: {{{position|}}}|
{{#if: {{{position|}}}|
{{!}} bgcolor={{{bgcolor_value|#222222; style="background: #e0e0e0; padding: 8px 10px; color: #696969; font-size: smaller; width: 40%;"}}} {{!}} Position
{{!}} class="ibleft" {{!}} Position
{{!}} bgcolor={{{bgcolor_value|#2B2B2B; style="background: #ececec; padding: 8px 10px; color: #696969; font-size: smaller; width: 60%;"}}} {{!}} {{{position}}}
{{!}} class="ibright" {{!}} {{{position}}}
}}
}}
|-
|-
{{#if: {{{affiliation|}}}|
| class="ibheader" colspan="2" style="border-bottom-right-radius: 13px; border-bottom-left-radius: 13px;" | [[Template:Character]]
{{!}} bgcolor={{{bgcolor_value|#222222; style="background: #e0e0e0; padding: 8px 10px; color: #696969; font-size: smaller; width: 40%;"}}} {{!}} Affiliation
{{!}} bgcolor={{{bgcolor_value|#2B2B2B; style="background: #ececec; padding: 8px 10px; color: #696969; font-size: smaller; width: 60%;"}}} {{!}} {{{affiliation}}}
}}
|- class="infobox-link" style="border-radius-bottom-right: 13px; border-radius-bottom-left: 13px;"
| colspan="2" style="border-bottom-right-radius: 13px; border-bottom-left-radius: 13px; text-align: center; color: #F67F00; font-size: 8pt; background:#2a4667c9; padding: 6px 0;" | [[Template:Character]]
|}
|}
</div>
</div>
<includeonly>[[Category:Characters]]{{DEFAULTSORT:{{PAGENAME}}}}</includeonly>
<includeonly>
{{#if: {{{templatemode|}}}|<!-- do nothing -->|<!--else-->[[Category:Character]]{{DEFAULTSORT:{{{name}}}}}
}}
</includeonly><noinclude>
==Character==
All fields, if not assigned values, will not render in the infobox. Physical Description and Career Information headers will not render without at least one of the appropriate fields having information.


<noinclude>
Fullname exists to allow for a character to have an excessively long name in full with a more short handed version displayed in the title of the infobox.
<br clear=all>
<pre>
<pre>
{{Character
{{Character
| name =
| fullname =
| image =  
| image =  
| species =
| name = First and last name ideally
| fullname = Go buck crazy, show all those middle names and lordly titles
| placeoforigin =
| species =  
| gender =  
| gender =  
| dateofbirth =  
| dateofbirth =  
| age =
| dateofdeath =
| placeoforigin =
| age =  
| posting =  
| height =
| position =  
| weight =
| rank =  
| hair =
| affiliation =  
| eyes =
| affiliation = Government or organisation they work for or are part of. Link if you can for beautiful cross-linking.
| rank = Where to they stand in their group
| posting = Where are they currently working ie Peace Moon, Starbase Kickass, Subspace Radar Station Alaska
| position = What are they doing there ie Commanding Officer, Lord High Inquisitor, Tea-lady
}}
</pre>
{{clear}}
==Example==
{{Character
| image =
| name = Old Lady Higgins
| fullname = Old Lady Gertrude Higgins
| placeoforigin = Starbase Kickass
| species = Old Lady
| gender = Female
| dateofbirth = Big Bang
| dateofdeath =
| age = Eternal
| height = 1.65m
| weight = Don't you date ask
| hair = Grey
| eyes = Hazel
| affiliation = She's a strong independent woman
| rank = Grandma to all
| posting = Starbase Kickass' only knitting shop
| position = Not too old to give you a good smacking sonny
| templatemode = nocats
}}
The following code generates the infobox to the right.
<pre>{{Character
| image =
| name = Old Lady Higgins
| fullname = Old Lady Gertrude Wilhemina Higgins
| placeoforigin = Starbase Kickass
| species = Old Lady
| gender = Female
| dateofbirth = Big Bang
| dateofdeath =
| age = Eternal
| height = 1.65m
| weight = Don't you date ask
| hair = Grey
| eyes = Hazel
| affiliation = She's a strong independent woman
| rank = Grandma to all
| posting = Starbase Kickass' only knitting shop
| position = Not too old to give you a good smacking sonny
}}
}}
</pre>
</pre>
[[Category:Infobox Templates|{{PAGENAME}}]]
[[Category:Infobox Templates]]
{{clear}}
</noinclude>
</noinclude>

Revision as of 08:46, 16 July 2022

{{{name}}}
Biographical Information
Template:Character

Character

All fields, if not assigned values, will not render in the infobox. Physical Description and Career Information headers will not render without at least one of the appropriate fields having information.

Fullname exists to allow for a character to have an excessively long name in full with a more short handed version displayed in the title of the infobox.

{{Character
| image = 
| name = First and last name ideally
| fullname = Go buck crazy, show all those middle names and lordly titles
| placeoforigin = 
| species = 
| gender = 
| dateofbirth = 
| dateofdeath = 
| age = 
| height = 
| weight = 
| hair = 
| eyes = 
| affiliation = Government or organisation they work for or are part of. Link if you can for beautiful cross-linking.
| rank = Where to they stand in their group
| posting = Where are they currently working ie Peace Moon, Starbase Kickass, Subspace Radar Station Alaska
| position = What are they doing there ie Commanding Officer, Lord High Inquisitor, Tea-lady
}}

Example

Old Lady Higgins
Biographical Information
Full Name Old Lady Gertrude Higgins
Place of Origin Starbase Kickass
Species Old Lady
Gender Female
Date of Birth Big Bang
Age Eternal
Physical Description
Height 1.65m
Weight Don't you date ask
Hair Grey
Eyes Hazel
Career Information
Affiliation She's a strong independent woman
Rank Grandma to all
Posting Starbase Kickass' only knitting shop
Position Not too old to give you a good smacking sonny
Template:Character


The following code generates the infobox to the right.

{{Character
| image = 
| name = Old Lady Higgins
| fullname = Old Lady Gertrude Wilhemina Higgins
| placeoforigin = Starbase Kickass
| species = Old Lady
| gender = Female
| dateofbirth = Big Bang
| dateofdeath = 
| age = Eternal
| height = 1.65m
| weight = Don't you date ask
| hair = Grey
| eyes = Hazel
| affiliation = She's a strong independent woman
| rank = Grandma to all
| posting = Starbase Kickass' only knitting shop
| position = Not too old to give you a good smacking sonny
}}