Diferencia entre revisiones de «Plantilla:Infobox/Meter»

De Inkipedia
m (Adjusting opacity of stripes)
mSin resumen de edición
Línea 1: Línea 1:
<includeonly><div style="display: inline-block; width: 100%; height: 20px; border: 1px solid rgba({{#if:{{{color|}}}|{{{color}}}|{{SiteColor|Generic}}}}, 0.5); background-color: rgba(0, 0, 0, 0.25); border-radius: 5px; overflow: hidden; position: relative; {{{style|}}}"><div style="display: table-cell; width: {{#if:{{{1|}}}|{{{1}}}|75}}%; height: 100%; background-color: rgb({{#if:{{{color|}}}|{{{color}}}|{{SiteColor|Generic}}}}); background-repeat: repeat-x; position: absolute;"><div class="infoboxmeter20" style="position: absolute; width: 100%; height: 100%; opacity: 0.25;"></div></div><div style="position: absolute; width: 100%; height: 100%; text-align: center; line-height: 20px;">{{{2|'''{{#if:{{{1|}}}|{{{1}}}|75}} / 100}}}</div></div></includeonly><noinclude>__NOTOC__
<includeonly>{{Infobox/MeterEx
|color    = {{{color|}}}
|style   = {{{style|}}}
|contents = {{#if:{{{contents|}}}|{{{contents}}}|'''{{trim|{{{1}}}}} / {{#if:{{{2|}}}|{{{2}}}|100}}'''}}
|{{#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. -->
<div style="display: none;">
<div style="display: none;">
Línea 6: Línea 10:
[[File:InfoboxMeter.svg|x24px]]
[[File:InfoboxMeter.svg|x24px]]
</div>
</div>
Displays a "progress bar" style meter for an infobox.
Displays a "progress bar" style meter for an infobox. This template is a proxy that pre-calculates parameters for [[Template:Infobox/MeterEx|Infobox/MeterEx]].


== Parameters ==
== Parameters ==
{|
{|
|- style="vertical-align: top;"
|- style="vertical-align: top;"
|<code>percent</code>||Unnamed.||The percentage, from 0 to 100, of the meter to be filled up.
|<code>value</code>||Unnamed.||The numeric value of the meter.
|- style="vertical-align: top;"
|- style="vertical-align: top;"
|<code>contents</code>||Unnamed,&nbsp;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>max</code>||Unnamed,&nbsp;optional.||The numeric maximum value of the meter. The default value is 100.
|- 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.
|- 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".
Línea 34: Línea 40:
|55
|55
}}
}}
<br /><br />{{Infobox/MeterEx|style = width: 250px;|color = {{SiteColor|Splatoon 2}}|55}}
</noinclude>
</noinclude>

Revisión del 18:42 26 ago 2017

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 "percent / 100" will be used.
color Optional. An RGB triplet for the base color to use for formatting. The default value is 192, 192, 192, 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}}
|55
}}

Output

55 / 100



55 / 100