Template:Infobox/Meter: Difference between revisions

From Inkipedia, the Splatoon wiki
mNo edit summary
mNo edit summary
 
(2 intermediate revisions by one other user not shown)
Line 2: Line 2:
|color    = {{{color|}}}
|color    = {{{color|}}}
|style    = {{{style|}}}
|style    = {{{style|}}}
|contents = {{#if:{{{contents|}}}|{{{contents}}}|'''{{trim|{{{1}}}}} / {{#if:{{{2|}}}|{{{2}}}|100}}'''}}
|contents = {{{contents|'''{{#if:{{{1|}}}|{{{1}}}|75}} / {{#if:{{{2|}}}|{{{2}}}|100}}'''}}}
|{{#expr:{{#if:{{{1|}}}|{{{1}}}|75}}*100/{{#if:{{{2|}}}|{{{2}}}|100}}}}}}</includeonly><noinclude>__NOTOC__
|{{#expr:{{#if:{{{1|}}}|{{{1}}}|75}}*100/{{#if:{{{2|}}}|{{{2}}}|100}}}}}}</includeonly><noinclude>__NOTOC__
<!-- Do not delete the following hidden elements. The resulting images are used by this template. -->
<!-- Do not delete the following hidden elements. The resulting images are used by this template. -->
Line 19: Line 19:
|<code>max</code>||Unnamed,&nbsp;optional.||The numeric maximum value of the meter. The default value is 100.
|<code>max</code>||Unnamed,&nbsp;optional.||The numeric maximum value of the meter. The default value is 100.
|- style="vertical-align: top;"
|- style="vertical-align: top;"
|<code>contents</code>||Optional.||Content to appear inside the meter. Belongs to the outermost element, overlapping the bar graphic. If absent, the text "<code>percent</code> / 100" will be used.
|<code>contents</code>||Optional.||Content to appear inside the meter. Belongs to the outermost element, overlapping the bar graphic. If absent, the text "<code>value</code> / <code>max</code>" will be used.
|- style="vertical-align: top;"
|- style="vertical-align: top;"
|<code>color</code>||Optional.||An RGB triplet for the base color to use for formatting. The default value is {{SiteColor|Generic}}, defined in [[Template:SiteColor|SiteColor]] as "Generic".
|<code>color</code>||Optional.||An RGB triplet for the base color to use for formatting. The default value is {{SiteColor|Generic}}, defined in [[Template:SiteColor|SiteColor]] as "Generic".
Line 31: Line 31:
|style = width: 250px;
|style = width: 250px;
|color = {{SiteColor|Splatoon 2}}
|color = {{SiteColor|Splatoon 2}}
|55
|123
|210
}}</nowiki>
}}</nowiki>


Line 38: Line 39:
|style = width: 250px;
|style = width: 250px;
|color = {{SiteColor|Splatoon 2}}
|color = {{SiteColor|Splatoon 2}}
|55
|123
|210
}}
}}
<br /><br />{{Infobox/MeterEx|style = width: 250px;|color = {{SiteColor|Splatoon 2}}|55}}
</noinclude>
</noinclude>

Latest revision as of 14:36, 28 July 2023

InfoboxMeter.svg InfoboxMeter.svg InfoboxMeter.svg

Displays a "progress bar" style meter for an infobox. This template is a proxy that pre-calculates parameters for Infobox/MeterEx.

Parameters

value Unnamed. The numeric value of the meter.
max Unnamed, optional. The numeric maximum value of the meter. The default value is 100.
contents Optional. Content to appear inside the meter. Belongs to the outermost element, overlapping the bar graphic. If absent, the text "value / max" will be used.
color Optional. An RGB triplet for the base color to use for formatting. The default value is 0, 153, 255, defined in SiteColor as "Generic".
style Optional. A list of CSS values to apply to the outermost container. By default, the meter takes up 100% of the width of its parent container.

Example

Markup

{{Infobox/Meter
|style = width: 250px;
|color = {{SiteColor|Splatoon 2}}
|123
|210
}}

Output

123 / 210