Template:ProgressBar: Difference between revisions

Template page
No edit summary
No edit summary
Line 1: Line 1:
<includeonly>{| style="width:{{#if:{{{width|}}}|{{{width|}}}|50%}}; margin: 0 auto; background: transparent; display: table;"
<includeonly>{| style="width:{{#if:{{{width|}}}|{{{width|}}}|50%}}; margin: 0 auto; background: transparent;
| style="text-align:center;" |{{#if:{{{task|}}}|{{{task|}}}:&nbsp;}}{{big|'''{{formatnum:{{#if:{{{1|}}}|{{#expr:100*{{{1}}}/{{{2|{{{total|100}}}}}}round 1}}|0}}}}%'''}} complete
| style="text-align:center;" |{{#if:{{{task|}}}|{{{task|}}}:&nbsp;}}{{big|'''{{formatnum:{{#if:{{{1|}}}|{{#expr:100*{{{1}}}/{{{2|{{{total|100}}}}}}round 1}}|0}}}}%'''}} complete
|-
|-
|
|
{|style="border:1px solid grey; height:10px; width:100%; border-spacing: 1px;"
{|style="border:1px solid grey; height:10px; width:100%; border-spacing: 1px; display: table;"
{{#ifeq:{{#if:{{{1|}}}|{{{1}}}|0}}|0| | {{!}}style="background: #5FDB00; width: {{#ifexpr:({{#if:{{{1|}}}|{{#expr:100*{{{1}}}/{{{2|{{{total|100}}}}}}}}|0}}<1)|1%|{{#if:{{{1|}}}|{{#expr:100*{{{1}}}/{{{2|{{{total|100}}}}}}round 1}}|0}}%}}"{{!}} }}
{{#ifeq:{{#if:{{{1|}}}|{{{1}}}|0}}|0| | {{!}}style="background: #5FDB00; width: {{#ifexpr:({{#if:{{{1|}}}|{{#expr:100*{{{1}}}/{{{2|{{{total|100}}}}}}}}|0}}<1)|1%|{{#if:{{{1|}}}|{{#expr:100*{{{1}}}/{{{2|{{{total|100}}}}}}round 1}}|0}}%}}"{{!}} }}
{{#ifeq:{{#if:{{{1|}}}|{{#expr:100*{{{1}}}/{{{2|{{{total|100}}}}}}}}|0}}|100|| {{!}}style="background: #E2E2E2;" {{!}} }}
{{#ifeq:{{#if:{{{1|}}}|{{#expr:100*{{{1}}}/{{{2|{{{total|100}}}}}}}}|0}}|100|| {{!}}style="background: #E2E2E2;" {{!}} }}

Revision as of 17:15, 7 April 2021


Usage

{{ProgressBar|50}}

50% complete


{{ProgressBar|4|9}}

44.4% complete


{{ProgressBar|400|400}}

100% complete


Explained on MediaWiki.