Template:Character: Difference between revisions

mNo edit summary
m Removed background color to allow dynamic color shift in dark mode.
 
(42 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><div style="width: 300px; background: #f8f9fa; border: 1px solid #aaa; padding: 0.5em; float: right; margin: -1.5em 0 1.5em 1em; vertical-align: top; display: inline-block; clear: right; position: relative; top: 1.5em;">
<includeonly>{{Infobox<!--
  <table style="width: 100%; border-spacing: 0; margin: 0; background-color: #f8f9fa;">
-->| name = {{{name|}}}<!--
    <!-- Name -->
-->| image = {{{image|}}}<!--
    <tr>
-->| caption = {{{caption|}}}<!--
      <td colspan="2" style="text-align: center; background-color: #f8f9fa; font-size: 120%; font-weight: bold; padding: 0;">{{{name|No name provided}}}</td>
-->| data_rows =<!--
    </tr>
-->{{#if: {{{born|}}} |<tr class="infobox-data-row"><th>Born</th><td>{{{born}}}</td></tr>}}<!--
    <!-- Image -->
-->{{#if: {{{died|}}} |<tr class="infobox-data-row"><th>Died</th><td>{{{died}}}</td></tr>}}<!--
    {{#if: {{{image|}}} |
-->{{#if: {{{spouse|}}} |<tr class="infobox-data-row"><th>Spouse</th><td>{{{spouse}}}</td></tr>}}<!--
    <tr>
-->{{#if: {{{parents|}}} |<tr class="infobox-data-row"><th>Parents</th><td>{{{parents}}}</td></tr>}}<!--
      <td colspan="2" style="text-align: center; padding: 0; background-color: #f8f9fa;">
-->{{#if: {{{children|}}} |<tr class="infobox-data-row"><th>Children</th><td>{{{children}}}</td></tr>}}<!--
        <div style="display: block; margin: auto; padding: 0.5em 0; background-color: #f8f9fa;">
-->{{#if: {{{relatives|}}} |<tr class="infobox-data-row"><th>Relatives</th><td>{{{relatives}}}</td></tr>}}<!--
          [[File:{{{image}}}|200px|center|alt={{{caption|}}}|{{{caption|}}}]]
-->{{#if: {{{profession|}}} |<tr class="infobox-data-row"><th>Profession</th><td>{{{profession}}}</td></tr>}}<!--
        </div>
-->{{#if: {{{titles|}}} |<tr class="infobox-data-row"><th>Titles</th><td>{{{titles}}}</td></tr>}}<!--
      </td>
-->{{#if: {{{monikers|}}} |<tr class="infobox-data-row"><th>Monikers</th><td>{{{monikers}}}</td></tr>}}<!--
    </tr>
-->{{#if: {{{groups|}}} |<tr class="infobox-data-row"><th>Groups</th><td>{{{groups}}}</td></tr>}}<!--
    }}
-->{{#if: {{{residence|}}} |<tr class="infobox-data-row"><th>Residence</th><td>{{{residence}}}</td></tr>}}<!--
    <!-- Image Caption -->
-->{{#if: {{{introduced|}}} |<tr class="infobox-data-row"><th>Introduced</th><td>{{{introduced}}}</td></tr>}}<!--
    {{#if: {{{caption|}}} |
-->{{#if: {{{first_mentioned|}}} |<tr class="infobox-data-row"><th>First Mentioned</th><td>{{{first_mentioned}}}</td></tr>}}<!--
    <tr>
-->{{#if: {{{last_mentioned|}}} |<tr class="infobox-data-row"><th>Last Mentioned</th><td>{{{last_mentioned}}}</td></tr>}}
      <td colspan="2" style="text-align: center; font-size: 80%; font-style: italic; color: #000000; background-color: #f8f9fa; padding: 0.1em 0;">{{{caption}}}</td>
}}<!--
    </tr>
-->{{#ifeq:{{NAMESPACE}}|{{ns:0}}|[[Category:Characters]]}}</includeonly><noinclude>
    }}
== Description ==
    <!-- Data Rows -->
This template should be used on character pages to add an infobox in the upper right hand corner of the article.
    {{#if: {{{born|}}} |
 
    <tr>
== Usage ==
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 35%;">Born</td>
This template has several [[:Template:Character#Parameters|parameters]] that can be used.
      <td style="padding: 0.1em;">{{{born}}}</td>
: '''Note: Only parameters that are provided will appear in the infobox. Not all parameters are required for each character.'''
    </tr>
 
    }}
{| style="width: 100%; text-align: left; margin: auto;" class="wikitable"
    {{#if: {{{died|}}} |
|-
    <tr>
! width=50%|You Type
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 35%;">Died</td>
!You Get
      <td style="padding: 0.1em;">{{{died}}}</td>
|-
    </tr>
| style="text-align: left; vertical-align: top;" |<pre>
    }}
{{character
    {{#if: {{{spouse|}}} |
|name=Character Name
    <tr>
|image=FILENAME.EXTENSION
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 35%;">Spouse</td>
|caption=Caption Here
      <td style="padding: 0.1em;">{{{spouse}}}</td>
|born=Date of Birth
    </tr>
|died=Date of Death
    }}
|spouse=Spouse's Name
    {{#if: {{{parents|}}} |
|parents=Parent Names
    <tr>
|children=Children Names
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 35%;">Parents</td>
|relatives=Relatives Names
      <td style="padding: 0.1em;">{{{parents}}}</td>
|profession=Profession Here
    </tr>
|titles=Titles Here
    }}
|monikers=Monikers Here
    {{#if: {{{children|}}} |
|groups=Group Affiliations
    <tr>
|residence=Residence Here
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 35%;">Children</td>
|introduced=First Appearance
      <td style="padding: 0.1em;">{{{children}}}</td>
|first_mentioned=First Mentioned
    </tr>
|last_mentioned=Last Mentioned
    }}
}}
    {{#if: {{{relatives|}}} |
</pre>
    <tr>
|<br>{{character
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 35%;">Relatives</td>
      <td style="padding: 0.1em;">{{{relatives}}}</td>
    </tr>
    }}
    {{#if: {{{profession|}}} |
    <tr>
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 35%;">Profession</td>
      <td style="padding: 0.1em;">{{{profession}}}</td>
    </tr>
    }}
    {{#if: {{{titles|}}} |
    <tr>
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 35%;">Titles</td>
      <td style="padding: 0.1em;">{{{titles}}}</td>
    </tr>
    }}
    {{#if: {{{other_names|}}} |
    <tr>
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 35%;">Other Names</td>
      <td style="padding: 0.1em;">{{{other_names}}}</td>
    </tr>
    }}
    {{#if: {{{groups|}}} |
    <tr>
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 35%;">Groups</td>
      <td style="padding: 0.1em;">{{{groups}}}</td>
    </tr>
    }}
    {{#if: {{{introduced_in|}}} |
    <tr>
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 35%;">Introduced In</td>
      <td style="padding: 0.1em;">{{{introduced_in}}}</td>
    </tr>
    }}
    {{#if: {{{last_mentioned|}}} |
    <tr>
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 35%;">Last Mentioned</td>
      <td style="padding: 0.1em;">{{{last_mentioned}}}</td>
    </tr>
    }}
  </table>
</div></includeonly><noinclude>
{{Character
| name = Example Character Infobox
| name = Example Character Infobox
| image = Beth Brower.jpg
| image = Beth Brower.jpg
Line 108: Line 65:
| profession = Profession Here
| profession = Profession Here
| titles = Titles Here
| titles = Titles Here
| other_names = Other Names Here
| monikers = Monikers Here
| groups = Group Affiliations
| groups = Group Affiliations
| introduced_in = First Appearance
|residence=Residence Here
| last_mentioned = Last Mentioned
| introduced = First Appearance
}}This is a generic infobox for characters.
| first_mentioned = First Mentioned
:'''Note:''' Only fields that are provided will appear in the infobox.
 
<pre>
{{Character
| name = Character Name
| image = FILENAME.EXTENSION
| caption = Caption Here
| born = Date of Birth
| died = Date of Death
| spouse = Spouse's Name
| parents = Parent Names
| children = Children Names
| relatives = Relatives Names
| profession = Profession Here
| titles = Titles Here
| other_names = Other Names Here
| groups = Group Affiliations
| introduced_in = First Appearance
| last_mentioned = Last Mentioned
| last_mentioned = Last Mentioned
}}
}}
</pre>
|}


=== Parameters ===
=== Parameters ===
* `name` (required): The character's name.
{| class="wikitable" style="width: 65%;"
* `image`: Filename of the character's image (e.g., `File:Example.jpg`).
! Parameter !! Description
* `caption`: Caption for the image.
|-
* `born`: The character's date of birth.
| style="text-align: center;" | <code>name</code> || The character's name.
* `died`: The character's date of death (if applicable).
|-
* `spouse`: The character's spouse (if applicable).
| style="text-align: center;" | <code>image</code> || Filename of the character's image (e.g., "Example.jpg").
* `parents`: The character's parents.
|-
* `children`: The character's children.
| style="text-align: center;" | <code>caption</code> || Caption for the image.
* `relatives`: Other relatives of the character.
|-
* `profession`: The character's profession.
| style="text-align: center;" | <code>born</code> || The character's date of birth.
* `titles`: Titles or honorifics the character holds.
|-
* `other names`: Alternate names or nicknames for the character.
| style="text-align: center;" | <code>died</code> || The character's date of death (if applicable).
* `groups`: Groups or affiliations the character belongs to.
|-
* `introduced_in`: Where the character was first introduced (e.g., book, chapter, etc.).
| style="text-align: center;" | <code>spouse</code> || The character's spouse (if applicable).
* `last_mentioned`: Where the character was last mentioned (e.g., book, chapter, etc.).
|-
| style="text-align: center;" | <code>parents</code> || The character's parents.
|-
| style="text-align: center;" | <code>children</code> || The character's children.
|-
| style="text-align: center;" | <code>relatives</code> || Other relatives of the character.
|-
| style="text-align: center;" | <code>profession</code> || The character's profession.
|-
| style="text-align: center;" | <code>titles</code> || Titles or honorifics the character holds.
|-
| style="text-align: center;" | <code>monikers</code> || Alternate names or nicknames for the character.
|-
| style="text-align: center;" | <code>groups</code> || Groups or affiliations the character belongs to.
|-
| style="text-align: center;" | <code>introduced</code> || Where the character was first introduced (e.g., book, chapter, etc.).
|-
| style="text-align: center;" | <code>first_mentioned</code> || Where the character was first mentioned (e.g., book, chapter, etc.).
|-
| style="text-align: center;" | <code>last_mentioned</code> || Where the character was last mentioned (e.g., book, chapter, etc.).
|}


== Articles using Template ==
== Articles using Template ==
:{{for|Special:WhatLinksHere/{{FULLPAGENAME}}|a full listing|here|pre=This list is limited to 100 pages}}
{{for|Special:WhatLinksHere/{{FULLPAGENAME}}|a full listing|here|pre=This list is limited to 100 pages}}
{{Special:WhatLinksHere/{{FULLPAGENAME}}|namespace=0|limit=100}}
{{Special:WhatLinksHere/{{FULLPAGENAME}}|namespace=0|limit=100}}


[[Category:Templates]]
[[Category:Infoboxes]]
</noinclude>