Template:Character: Difference between revisions

m Removed background color to allow dynamic color shift in dark mode.
 
(32 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: {{{monikers|}}} |
    <tr>
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 35%;">Monikers</td>
      <td style="padding: 0.1em;">{{{monikers}}}</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|}}} |
    <tr>
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 35%;">Introduced</td>
      <td style="padding: 0.1em;">{{{introduced}}}</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 110: Line 67:
| monikers = Monikers Here
| monikers = Monikers Here
| groups = Group Affiliations
| groups = Group Affiliations
|residence=Residence Here
| introduced = First Appearance
| introduced = First Appearance
| first_mentioned = First Mentioned
| last_mentioned = Last Mentioned
| last_mentioned = Last Mentioned
}}
}}
==Summary==
|}
Below is the template for a character infobox. To be included on character pages as the first element, after the Display Title.
<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
| monikers = Monikers Here
| groups = Group Affiliations
| introduced = First Appearance
| last_mentioned = Last Mentioned
}}
</pre>
'''Note:''' Only fields that are provided will appear in the infobox.


=== Parameters ===
=== Parameters ===
Line 142: Line 80:
| style="text-align: center;" | <code>name</code> || The character's name.
| style="text-align: center;" | <code>name</code> || The character's name.
|-
|-
| style="text-align: center;" | <code>image</code> || Filename of the character's image (e.g., `File:Example.jpg`).
| style="text-align: center;" | <code>image</code> || Filename of the character's image (e.g., "Example.jpg").
|-
|-
| style="text-align: center;" | <code>caption</code> || Caption for the image.
| style="text-align: center;" | <code>caption</code> || Caption for the image.
Line 167: Line 105:
|-
|-
| style="text-align: center;" | <code>introduced</code> || Where the character was first introduced (e.g., book, chapter, etc.).
| 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.).
| style="text-align: center;" | <code>last_mentioned</code> || Where the character was last mentioned (e.g., book, chapter, etc.).
Line 172: Line 112:


== 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>