Jump to content

Template:Infobox character: Difference between revisions

From wiki58
No edit summary
 
m Remove generated paragraph spacing inside infobox cells; retain Wikipedia CSS
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<infobox>
{{#if:{{{name|}}}{{{image|}}}{{{aliases|}}}{{{relatives|}}}{{{affiliation|}}}{{{marital|}}}{{{birthDate|}}}{{{birthPlace|}}}{{{deathDate|}}}{{{deathPlace|}}}{{{species|}}}{{{gender|}}}{{{height|}}}{{{weight|}}}{{{eyes|}}}|<table class="infobox">
<title source="name"/>
{{#if:{{{name|}}}|<caption class="infobox-title">{{{name|}}}</caption>|}}
<image source="image">
{{#if:{{{image|}}}|<tr>
    <caption source="imagecaption" />
<td class="infobox-image" colspan="2">{{#ifeq:{{#sub:{{{image|}}}|0|1}}|[|{{{image|}}}|[[{{#ifeq:{{lc:{{#sub:{{{image|}}}|0|5}}}}|file:||{{#ifeq:{{lc:{{#sub:{{{image|}}}|0|6}}}}|image:||File:}}}}{{{image|}}}|frameless|220px]]}}{{#if:{{{imagecaption|}}}|<div class="infobox-caption">{{{imagecaption|}}}</div>|}}</td>
</image>
</tr>|}}
<group>
{{#if:{{{aliases|}}}{{{relatives|}}}{{{affiliation|}}}|{{#if:{{{aliases|}}}|<tr>
    <data source="aliases"><label>Aliases</label></data>
<th class="infobox-label" scope="row">Aliases</th>
    <data source="relatives"><label>Relatives</label></data>
<td class="infobox-data">{{{aliases|}}}</td>
    <data source="affiliation"><label>Affiliation</label></data>
</tr>|}}
    </group>
{{#if:{{{relatives|}}}|<tr>
    <group>
<th class="infobox-label" scope="row">Relatives</th>
        <header>Biographical information</header>
<td class="infobox-data">{{{relatives|}}}</td>
        <data source="marital"><label>Marital status</label></data>
</tr>|}}
    <data source="birthDate"><label>Date of birth</label></data>
{{#if:{{{affiliation|}}}|<tr>
        <data source="birthPlace"><label>Place of birth</label></data>
<th class="infobox-label" scope="row">Affiliation</th>
        <data source="deathDate"><label>Date of death</label></data>
<td class="infobox-data">{{{affiliation|}}}</td>
        <data source="deathPlace"><label>Place of death</label></data>
</tr>|}}|}}
    </group>
{{#if:{{{marital|}}}{{{birthDate|}}}{{{birthPlace|}}}{{{deathDate|}}}{{{deathPlace|}}}|<tr>
    <group>
<th class="infobox-header" colspan="2">Biographical information</th>
        <header>Physical description</header>
</tr>
        <data source="species"><label>Species</label></data>
{{#if:{{{marital|}}}|<tr>
        <data source="gender"><label>Gender</label></data>
<th class="infobox-label" scope="row">Marital status</th>
        <data source="height"><label>Height</label></data>
<td class="infobox-data">{{{marital|}}}</td>
        <data source="weight"><label>Weight</label></data>
</tr>|}}
        <data source="eyes"><label>Eye color</label></data>
{{#if:{{{birthDate|}}}|<tr>
</group>
<th class="infobox-label" scope="row">Date of birth</th>
</infobox><includeonly>[[Category:Characters]]</includeonly><noinclude>{{Documentation}}</noinclude>
<td class="infobox-data">{{{birthDate|}}}</td>
</tr>|}}
{{#if:{{{birthPlace|}}}|<tr>
<th class="infobox-label" scope="row">Place of birth</th>
<td class="infobox-data">{{{birthPlace|}}}</td>
</tr>|}}
{{#if:{{{deathDate|}}}|<tr>
<th class="infobox-label" scope="row">Date of death</th>
<td class="infobox-data">{{{deathDate|}}}</td>
</tr>|}}
{{#if:{{{deathPlace|}}}|<tr>
<th class="infobox-label" scope="row">Place of death</th>
<td class="infobox-data">{{{deathPlace|}}}</td>
</tr>|}}|}}
{{#if:{{{species|}}}{{{gender|}}}{{{height|}}}{{{weight|}}}{{{eyes|}}}|<tr>
<th class="infobox-header" colspan="2">Physical description</th>
</tr>
{{#if:{{{species|}}}|<tr>
<th class="infobox-label" scope="row">Species</th>
<td class="infobox-data">{{{species|}}}</td>
</tr>|}}
{{#if:{{{gender|}}}|<tr>
<th class="infobox-label" scope="row">Gender</th>
<td class="infobox-data">{{{gender|}}}</td>
</tr>|}}
{{#if:{{{height|}}}|<tr>
<th class="infobox-label" scope="row">Height</th>
<td class="infobox-data">{{{height|}}}</td>
</tr>|}}
{{#if:{{{weight|}}}|<tr>
<th class="infobox-label" scope="row">Weight</th>
<td class="infobox-data">{{{weight|}}}</td>
</tr>|}}
{{#if:{{{eyes|}}}|<tr>
<th class="infobox-label" scope="row">Eye color</th>
<td class="infobox-data">{{{eyes|}}}</td>
</tr>|}}|}}
</table>|}}<includeonly>[[Category:Characters]]</includeonly><noinclude>
Native MediaWiki infobox using locally mirrored Wikipedia styles. Image fields accept a bare filename, a <code>File:</code>-prefixed name, or complete <code><nowiki>[[File:…]]</nowiki></code> markup. Fields, defaults, and categories retain the imported template API.
 
{{Documentation}}</noinclude>

Latest revision as of 18:52, 11 November 2026

Native MediaWiki infobox using locally mirrored Wikipedia styles. Image fields accept a bare filename, a File:-prefixed name, or complete [[File:…]] markup. Fields, defaults, and categories retain the imported template API.