Template:Responsive Character Infobox: Difference between revisions

From Holocron - Star Wars Combine
Jump to navigation Jump to search
Alani Myrtel (talk | contribs)
Usage: removed clutter
Alani Myrtel (talk | contribs)
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><table class="resp-character-infobox" style="background-color: {{#if:{{{background-color|}}}|{{{background-color}}}|#001f33}}; width: 100%; max-width: 100%; font-size: 11px; border-collapse: collapse; border: 1px solid {{#if:{{{border-color|}}}|{{{border-color}}}|grey}};">
<includeonly><table class="resp-character-infobox" style="background-color: {{#if:{{{background-color|}}}|{{{background-color}}}|#001f33}}; width: 100%; max-width: 100%; font-size: 11px; border-collapse: collapse; border: 1px solid {{#if:{{{border-color|}}}|{{{border-color}}}|grey}};">
<tr>
<tr>
<td width="100%" colspan="2" style="background-color: {{#if:{{{accent-color|}}}|{{{accent-color}}}|#21314c}}; font-size: 16px; text-align: center; ont-weight: bold; color: white;">{{{name}}}</td>
<td width="100%" colspan="2" style="background-color: {{#if:{{{accent-color|}}}|{{{accent-color}}}|#21314c}}; font-size: 16px; text-align: center; font-weight: bold; color: white;">{{{name}}}</td>
</tr>
</tr>
<tr>
<tr>
Line 123: Line 123:
<td width="31%" valign="top" style="padding-left: .25em;">Prior Affiliation</td>
<td width="31%" valign="top" style="padding-left: .25em;">Prior Affiliation</td>
<td width="69%"> {{{prior affiliation}}}</td>
<td width="69%"> {{{prior affiliation}}}</td>
</tr>}}
{{#if:{{{signature|}}}|<tr>
<td width="31%" valign="top" style="padding-left: .25em;">Signature</td>
<td width="69%"> {{{signature}}}</td>
</tr>}}
</tr>}}
{{#if:{{{awards|}}}|<tr>
{{#if:{{{awards|}}}|<tr>
<td width="31%" valign="top" style="padding-left: .25em;">Awards</td>
<td width="31%" valign="top" style="padding-left: .25em;">Awards</td>
<td width="69%"> {{{awards}}}</td>
<td width="69%"> {{{awards}}}</td>
</tr>}}
{{#if:{{{signature|}}}|<tr>
<td width="31%" valign="top" style="padding-left: .25em;">Signature</td>
<td width="69%"> {{{signature}}}</td>
</tr>}}
</tr>}}
<tr>
<tr>
Line 136: Line 136:
</tr>
</tr>
<tr>
<tr>
<!-- filler row --><td width="100%" colspan="2" style="background-color: {{#if:{{{accent-color|}}}|{{{accent-color}}}|#21314c}}; font-size: 6px;">&nbsp;</td>
<!-- filler row --><td width="100%" colspan="2" style="background-color: {{#if:{{{accent-color|}}}|{{{accent-color}}}|#21314c}}; font-size: 4px;">&nbsp;</td>
</tr>
</tr>
</table></includeonly><noinclude>
</table></includeonly><noinclude>
Line 145: Line 145:


Custom colors can be provided either in their HTML names (e.g. 'red'), in HEX-notation (e.g. '#FF0000'), via the <code>rgb(r, g, b)</code> function, or via the <code>rgba(r, g, b, a)</code> function.
Custom colors can be provided either in their HTML names (e.g. 'red'), in HEX-notation (e.g. '#FF0000'), via the <code>rgb(r, g, b)</code> function, or via the <code>rgba(r, g, b, a)</code> function.
The optional parameters can be omitted from the template. For example, if the character does not have a spouse, they can omit the <code><nowiki>| spouse =</nowiki></code> part.


<pre>
<pre>

Latest revision as of 21:47, 23 July 2024

Usage

This template is an customization of Template:Infobox Character, aimed to provide a responsive counterpart to the original infobox. This infobox is meant to be used with the Responsive Character Page template, but can also be used in standalone tables, flexboxes, or grids. Just be aware that this template takes on 100% of the width of the box you put it in!

Custom colors can be provided either in their HTML names (e.g. 'red'), in HEX-notation (e.g. '#FF0000'), via the rgb(r, g, b) function, or via the rgba(r, g, b, a) function.

The optional parameters can be omitted from the template. For example, if the character does not have a spouse, they can omit the | spouse = part.

{{Template:Responsive Character Infobox
| background-color = This defaults to '#001f33'. This is the color seen behind the data rows.
| border-color = This defaults to 'grey'. This is the color of the surrounding border of the infobox.
| accent-color = This defaults to '#21314c'. This is the color seen behind the header rows.
| name = required
| image = required
| race = required
| homeworld = 
| clan = 
| house = 
| mother = 
| father = 
| marital status = 
| spouse = 
| partner = 
| siblings = 
| children = 
| born = 
| died = 
| languages = 
| religion = 
| quote = 
| gender = required
| height = 
| weight = 
| coloring = 
| hair color = 
| eye color = 
| affiliation = required
| title = 
| rank = 
| positions = 
| prior affiliation = 
| awards = 
| signature = This field is for signature images. The image should ideally be no wider than 220 pixels. 
}}

Examples

Default

{{{name}}}
{{{image}}}
Biographical Information
Race {{{race}}}
Physical Description
Gender {{{gender}}}
Political Information
Affiliation {{{affiliation}}}
 
 
{{Template:Responsive Character Infobox}}


Custom colors A

{{{name}}}
{{{image}}}
Biographical Information
Race {{{race}}}
Physical Description
Gender {{{gender}}}
Political Information
Affiliation {{{affiliation}}}
 
 
{{Template:Responsive Character Infobox
| background-color = #101010
| border-color = #000000
| accent-color = #202020
}}


Custom colors B

{{{name}}}
{{{image}}}
Biographical Information
Race {{{race}}}
Physical Description
Gender {{{gender}}}
Political Information
Affiliation {{{affiliation}}}
 
 

By the Force, please do not use these colors.

{{Template:Responsive Character Infobox
| background-color = limegreen
| border-color = red
| accent-color = magenta
}}