Difference between revisions of "InfoFighter"
From Sega Retro
m |
(image scaling) |
||
Line 1: | Line 1: | ||
<includeonly>{{#vardefine:cellwidth | {{#if:{{#var:tableimagewidth}} | {{#var:tableimagewidth}}px | {{#if:{{{imagewidth|}}} | {{{imagewidth|}}}px | fit-content}} }} }} | <includeonly>{{#vardefine:cellwidth | {{#if:{{#var:tableimagewidth}} | {{#var:tableimagewidth}}px | {{#if:{{{imagewidth|}}} | {{{imagewidth|}}}px | fit-content}} }} }} | ||
|- | |- | ||
− | | rowspan="2" style="background: #eee; color: inherit; padding: 0; position: relative; vertical-align: top;" | {{#if:{{{portrait|}}} | <div style="position: relative; margin: auto; width: {{#var:cellwidth}}; z-index: 1;"><div style="background: linear-gradient(transparent 50%, #eee 100%); position: absolute; left: 50%; top: 0; transform: translateX(-50%); height: 100%; width: 100%; z-index: 2;"></div>{{{portrait|}}}</div> }} | + | | rowspan="2" style="background: #eee; color: inherit; padding: 0; position: relative; vertical-align: top;" | {{#if:{{{image|}}}{{{portrait|}}} | <div style="position: relative; margin: auto; width: {{#var:cellwidth}}; z-index: 1;"><div style="background: linear-gradient(transparent 50%, #eee 100%); position: absolute; left: 50%; top: 0; transform: translateX(-50%); height: 100%; width: 100%; z-index: 2;"></div>{{#if: {{{image|}}} | [[File:{{{image|}}}|{{#var:cellwidth}}px]] }}{{#if: {{{portrait|}}} | {{{portrait|}}} }}</div> }} |
{{#if:{{{sprite|}}} | <div style="display: flex; align-items: end; justify-content: space-evenly;">{{#if:{{{sprite|}}} | {{{sprite|}}} }}{{#if:{{{sprite2|}}} | {{{sprite2|}}} }}</div>}} | {{#if:{{{sprite|}}} | <div style="display: flex; align-items: end; justify-content: space-evenly;">{{#if:{{{sprite|}}} | {{{sprite|}}} }}{{#if:{{{sprite2|}}} | {{{sprite2|}}} }}</div>}} | ||
{{#if:{{{info1|}}} | <div style="border-color: #ccc; border-style: solid; border-width: 0 0 2px 4px; font-size: 0.75rem; font-weight: bold; margin: 1em 0 0 1em; padding-left: 0.5em;">{{{info1name|}}}:</div><div style="padding-left: 1em;">{{{info1|}}}</div> }} | {{#if:{{{info1|}}} | <div style="border-color: #ccc; border-style: solid; border-width: 0 0 2px 4px; font-size: 0.75rem; font-weight: bold; margin: 1em 0 0 1em; padding-left: 0.5em;">{{{info1name|}}}:</div><div style="padding-left: 1em;">{{{info1|}}}</div> }} | ||
Line 74: | Line 74: | ||
<pre> | <pre> | ||
+ | | image= | ||
| imagewidth= | | imagewidth= | ||
</pre> | </pre> | ||
[[Category:Templates]]</noinclude> | [[Category:Templates]]</noinclude> |
Latest revision as of 04:16, 30 June 2024
Shows a fancier version of the InfoRow template for fighting game characters, for use with the InfoTable template.
Usage
The most common named arguments are:
| name= | portrait= | sprite= | desc=
It also supports "info" pairs, similar to the InfoRow template:
| info1name= | info1= | info2name= | info2= | info3name= | info3= | info4name= | info4= | info5name= | info5= | info6name= | info6=
Less common arguments:
| image= | imagewidth=