Menú alternativo
Menú alternativo personal
No has accedido
Tu dirección IP será visible si haces alguna edición

Diferencia entre revisiones de «Plantilla:Barra de progreso»

De Wikimedia Small Projects
obra derivada, basada en https://en.wikipedia.org/w/index.php?title=Template:Progress_bar
 
de https://en.wikipedia.org/w/index.php?title=Template:Progression&oldid=903576581
Línea 1: Línea 1:
<div style="
{| style="width:{{#if:{{{width|}}}|{{{width|}}}|50%}}; margin: 0 auto; background: transparent"
  width:{{{width|75%}}};
| style="text-align:center;" |{{#if:{{{task|}}}|{{{task|}}}:&nbsp;}}<big>'''{{formatnum:{{#if:{{{1|}}}|{{#expr:100*{{{1}}}/{{{2|{{{total|100}}}}}}round 1}}|0}}}}&nbsp;%'''</big> complete
{{#ifeq: {{{center|yes}}} | yes |
|-
  margin:auto;
|
  text-align:center;}}">
{|style="border:1px solid #c8ccd1; height:10px; width:100%; border-spacing: 1px;"
{{#ifeq: {{{header|yes}}} | yes
{{#ifeq:{{#if:{{{1|}}}|{{{1}}}|0}}|0| | {{!}}style="background: #00af32; width: {{#ifexpr:({{#if:{{{1|}}}|{{#expr:100*{{{1}}}/{{{2|{{{total|100}}}}}}}}|0}}<1)|1%|{{#if:{{{1|}}}|{{#expr:100*{{{1}}}/{{{2|{{{total|100}}}}}}round 1}}|0}}%}}"{{!}} }}
| <p>
{{#ifeq:{{#if:{{{1|}}}|{{#expr:100*{{{1}}}/{{{2|{{{total|100}}}}}}}}|0}}|100|| {{!}}style="background: #eaecf0;" {{!}} }}
  <big>
|}
  '''{{#expr: ( {{{1|<noinclude>2</noinclude>0}}} / {{{total|100}}}) * 100 round 1}}&nbsp;%'''
|}
  }}
  </big>
  </p>
<p style="border:{{{border|1px solid #a2a9b1}}}; border-radius: 2px; padding:{{{padding|1px}}}; overflow:hidden;">
  <span style=" <!-- if percentage is higher than 100%, show all green bar -->
    width: {{#ifexpr: {{#expr:{{{1|0}}}/{{{total|100}}}}}>1 | 100 | {{#expr: {{{1|<noinclude>2</noinclude>0}}} / {{{total|100}}} * 100}}}}%;
    height: {{{height|15}}}px;
    background:{{{color1|#36c}}};
    float:left;
    ">&nbsp;</span>
  <span style=" <!-- if percentage is higher than 100%, show no grey bar -->
    width: {{#ifexpr: {{#expr:{{{1|0}}}/{{{total|100}}}}}>1 | 0 | {{#expr: 100 - {{{1|<noinclude>2</noinclude>0}}} / {{{total|100}}} * 100}}}}%;
    height: {{{height|2}}}px;
    background:{{{color2|#eaecf0}}};
    float:left;
    ">&nbsp;</span>
</p>
</div>

Revisión del 17:17 10 ene 2022

0 % complete