Template:Responsive Character Page: Difference between revisions
Alani Myrtel (talk | contribs) →Usage: removed clutter |
Alani Myrtel (talk | contribs) →Examples: revert to default infobox colors |
||
Line 69: | Line 69: | ||
This is the main content without any specified background color. | This is the main content without any specified background color. | ||
| character-infobox = | | character-infobox = | ||
{{Template:Responsive Character Infobox | {{Template:Responsive Character Infobox}} | ||
}} | |||
}} | }} | ||
===No background color specified and with filler content=== | ===No background color specified and with filler content=== | ||
Line 81: | Line 77: | ||
This is the main content with extra filler. | This is the main content with extra filler. | ||
| character-infobox = | | character-infobox = | ||
{{Template:Responsive Character Infobox | {{Template:Responsive Character Infobox}} | ||
}} | |||
| filler-content = This is some optional filler content. | | filler-content = This is some optional filler content. | ||
}} | }} | ||
Line 95: | Line 87: | ||
This is the main content with extra filler. The <code>background-color</code> parameter is set to <code>rgba(50, 0, 0, .5)</code>. | This is the main content with extra filler. The <code>background-color</code> parameter is set to <code>rgba(50, 0, 0, .5)</code>. | ||
| character-infobox = | | character-infobox = | ||
{{Template:Responsive Character Infobox | {{Template:Responsive Character Infobox}} | ||
}} | |||
| filler-content = This is some optional filler content. | | filler-content = This is some optional filler content. | ||
}} | }} | ||
Line 109: | Line 97: | ||
This is the main content with extra filler. The <code>backdrop-color</code> parameter is set to <code>rgba(0, 0, 0, .2)</code>. | This is the main content with extra filler. The <code>backdrop-color</code> parameter is set to <code>rgba(0, 0, 0, .2)</code>. | ||
| character-infobox = | | character-infobox = | ||
{{Template:Responsive Character Infobox | {{Template:Responsive Character Infobox}} | ||
}} | |||
| filler-content = This is some optional filler content. | | filler-content = This is some optional filler content. | ||
}} | }} |
Revision as of 20:27, 12 August 2023
Usage
This responsive character page template is best used together with the responsive character infobox template as its infobox template.
{{Template:Responsive Character Page | backdrop-color = This defaults to 'none'. | background-color = This defaults to 'rgba(#000000, .2)'. | character-infobox-width = required, preferably in pixels (character images are sized in pixels). | main-content = | character-infobox = required, works best with the responsive character infobox template. | filler-content = }}
Table of Contents Usage
It is recommended to place the __TOC__
magic word inside the main-content field to force the Table of Contents of the page to render inside the template. Otherwise, it will most likely render above the template. Use the __NOTOC__
magic word if you want to stop the Table of Contents from rendering altogether.
Known Issues
Wikitable Rendering
It is known that wikitables do not go well included with template parameters. Therefore, you need to escape the pipe |
characters of wikitables with {{!}}
. For more information, see the official MediaWiki documentation (archived on July 30th 2023).
A workaround would be to make a template of those tables, and using HTML table syntax instead of a wikitable.
Examples
Try and view these examples both on mobile and desktop view via the F12 menu. See here (archived on March 24th 2023) to see how to.
No background color specified
This is the main content without any specified background color.
{{{name}}} | |
{{{image}}} | |
Biographical Information | |
Race | {{{race}}} |
Physical Description | |
Gender | {{{gender}}} |
Political Information | |
Affiliation | {{{affiliation}}} |
No background color specified and with filler content
This is the main content with extra filler.
{{{name}}} | |
{{{image}}} | |
Biographical Information | |
Race | {{{race}}} |
Physical Description | |
Gender | {{{gender}}} |
Political Information | |
Affiliation | {{{affiliation}}} |
This is some optional filler content.
Background color specified
This is the main content with extra filler. The background-color
parameter is set to rgba(50, 0, 0, .5)
.
{{{name}}} | |
{{{image}}} | |
Biographical Information | |
Race | {{{race}}} |
Physical Description | |
Gender | {{{gender}}} |
Political Information | |
Affiliation | {{{affiliation}}} |
This is some optional filler content.
Backdrop color specified
This is the main content with extra filler. The backdrop-color
parameter is set to rgba(0, 0, 0, .2)
.
{{{name}}} | |
{{{image}}} | |
Biographical Information | |
Race | {{{race}}} |
Physical Description | |
Gender | {{{gender}}} |
Political Information | |
Affiliation | {{{affiliation}}} |
This is some optional filler content.