Template:Character: Difference between revisions

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


=== 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
* `image_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.
|-
* `aliases`: 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.).
|-
</noinclude>
| 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 ==
{{for|Special:WhatLinksHere/{{FULLPAGENAME}}|a full listing|here|pre=This list is limited to 100 pages}}
{{Special:WhatLinksHere/{{FULLPAGENAME}}|namespace=0|limit=100}}
 
[[Category:Infoboxes]]

Latest revision as of 22:40, 27 May 2025

Description

This template should be used on character pages to add an infobox in the upper right hand corner of the article.

Usage

This template has several parameters that can be used.

Note: Only parameters that are provided will appear in the infobox. Not all parameters are required for each character.
You Type You Get
{{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
|residence=Residence Here
|introduced=First Appearance
|first_mentioned=First Mentioned
|last_mentioned=Last Mentioned
}}

Example Character Infobox
Caption Here
Caption Here
Caption Here
BornDate of Birth
DiedDate of Death
SpouseSpouse's Name
ParentsParent Names
ChildrenChildren Names
RelativesRelatives Names
ProfessionProfession Here
TitlesTitles Here
MonikersMonikers Here
GroupsGroup Affiliations
ResidenceResidence Here
IntroducedFirst Appearance
First MentionedFirst Mentioned
Last MentionedLast Mentioned

Parameters

Parameter Description
name The character's name.
image Filename of the character's image (e.g., "Example.jpg").
caption Caption for the image.
born The character's date of birth.
died The character's date of death (if applicable).
spouse The character's spouse (if applicable).
parents The character's parents.
children The character's children.
relatives Other relatives of the character.
profession The character's profession.
titles Titles or honorifics the character holds.
monikers Alternate names or nicknames for the character.
groups Groups or affiliations the character belongs to.
introduced Where the character was first introduced (e.g., book, chapter, etc.).
first_mentioned Where the character was first mentioned (e.g., book, chapter, etc.).
last_mentioned Where the character was last mentioned (e.g., book, chapter, etc.).

Articles using Template