Template:InfoBox: Difference between revisions
From MiiWiki
Jump to navigationJump to search
PinkYoshiFan (talk | contribs) mNo edit summary |
m (added support for 9th parameter) |
||
Line 40: | Line 40: | ||
<th style="background: {{{thbackground|{{{border|red}}}}}}; color: {{{thtext|#fff}}}">{{{Info8name|}}}</th> | <th style="background: {{{thbackground|{{{border|red}}}}}}; color: {{{thtext|#fff}}}">{{{Info8name|}}}</th> | ||
<td style="background: {{{tdbackground|rgba(0,0,0,.1)}}}; padding-left: 5px">{{{Info8details|}}}</td> | <td style="background: {{{tdbackground|rgba(0,0,0,.1)}}}; padding-left: 5px">{{{Info8details|}}}</td> | ||
</tr>|}} | |||
{{#if:{{{Info9details|}}}|<tr> | |||
<th style="background: {{{thbackground|{{{border|red}}}}}}; color: {{{thtext|#fff}}}">{{{Info9name|}}}</th> | |||
<td style="background: {{{tdbackground|rgba(0,0,0,.1)}}}; padding-left: 5px">{{{Info9details|}}}</td> | |||
</tr>|}}<!-- | </tr>|}}<!-- | ||
-->{{#if:{{{Infomore|}}}|{{{Infomore|}}}|}} | -->{{#if:{{{Infomore|}}}|{{{Infomore|}}}|}} |
Latest revision as of 02:16, 20 September 2023
This is the base Infobox template, used by other templates to create other infoboxes more easily. It's not recommended to use this template on an article; use a template like Infobox-Game instead.
Parameter | Description | Default |
---|---|---|
title
|
Title of the subject | {{PAGENAME}}
|
image
|
Image of the infobox | If not set, it will default to Needed.png |
caption
|
Caption of the image (Filled values will not appear if image is unset) | None if image is set, link to upload page if image is unset |
Info*name
|
Name of the field. The asterisk represents a number from 1-9 | None |
Info*details
|
Information related to Info*name . The asterisk represents a number from 1-9
|
If not set, the entire row (with Info*name ) will not be displayed
|
Infomore
|
A space that allows the creation of more rows. This is useful for content that will appear on a specific template and nowhere else | None |
template
|
Name of the template (to show on "This bow: view, talk, edit") | InfoBox
|
gradient
|
The background gradient. It's recommended to use lighter colors (or just don't change this at all) | #fff,#d2e4ea
|
border
|
Color of the borders | red
|
shadow
|
The shadow around the infobox | Same value as border
|
headergradient
|
Gradient on the small panel with the title | #fff + same value as border
|
headercolor
|
Text color of the title | #000
|
thbackground
|
Background of the header-cells on the table. | Same value as border
|
thtext
|
Text color of the header-cells on the table. | #fff
|
tdbackground
|
Background of the normal cells on the table. | rgba(0,0,0,.1)
|
style
|
Additional CSS styling for the infobox panel (specifically, the major-parent div )
|
None |
style2
|
Additional CSS styling for the panel with the title | None |
Heads up!
For easier reading and better maintainability of the template, the table uses the default HTML syntax (<table><tr><td>...
) instead of the MediaWiki markup, so when using the parameter Infomore
, do it like this:
{{InfoBox |Infomore = <tr> <th style="background: ...">Something 1</th> <td style="background: ...">Else 1</th> </tr> <tr> <th style="background: ...">Something 2</th> <td style="background: ...">Else 2</th> </tr> ... }}