More actions
(Created page with "<includeonly>{{#switch: | = <table width={{#if:{{{width|}}}|{{{width|}}}|50%}} align=center style="background:transparent"> <tr> <td align=center>{{#if:{{{task|}}}|{{{task|}}}...") |
m (fix progress bar on mobile) Tags: mobile edit mobile web edit |
||
Line 7: | Line 7: | ||
<tr> | <tr> | ||
<td> | <td> | ||
<table style="border:1px solid gray" cellspacing=1 width=100% height=15x> | <table style="border:1px solid gray; display:table;" cellspacing=1 width=100% height=15x> | ||
<tr> | <tr> | ||
{{#ifeq:{{#if:{{{1|}}}|{{{1}}}|0}}|0| | <td style="background:#5FDB00; width:{{#ifexpr:({{#if:{{{1|}}}|{{#expr:100*{{{1}}}/{{{2|100}}}}}|0}}<1)|1%|{{#if:{{{1|}}}|{{#expr:100*{{{1}}}/{{{2|100}}}round 1}}|0}}%}}"> </td> }} | {{#ifeq:{{#if:{{{1|}}}|{{{1}}}|0}}|0| | <td style="background:#5FDB00; width:{{#ifexpr:({{#if:{{{1|}}}|{{#expr:100*{{{1}}}/{{{2|100}}}}}|0}}<1)|1%|{{#if:{{{1|}}}|{{#expr:100*{{{1}}}/{{{2|100}}}round 1}}|0}}%}}"> </td> }} |
Latest revision as of 20:56, 28 April 2019
Template documentation
Syntax
- {{Progression|percent}}
The percent is a number between 0 and 100, without the trailing %.
- {{Progression|param1|param2}}
Calculates the progression as a function of param1/param2
- {{Progression|param1|param2|task=param3}}
Calculates the progression as a function of param1/param2, and displays a task label on the bar.
Examples
1 parameter (percent)
{{Progression|0}} :
0% complete | |
|
{{Progression|0.5}} :
0.5% complete | ||
|
{{Progression|1}} :
1% complete | ||
|
{{Progression|36.7}} :
36.7% complete | ||
|
{{Progression|100}} :
100% complete | |
|
2 parameters
{{Progression|0|250}} :
0% complete | |
|
{{Progression|100|250}} :
40% complete | ||
|
{{Progression|200|300}} :
66.7% complete | ||
|
{{Progression|300|300}} :
100% complete | |
|
3 parameters
{{Progression|0|250|task=Sorting articles}} :
Sorting articles: 0% complete | |
|
{{Progression|100|250|task=Sorting articles}} :
Sorting articles: 40% complete | ||
|
See also
- {{Backlog progress bar}}
- {{Percentage bar}}
- {{Percent-done}}
- {{Progress}}
- {{Progress bar}}
- {{Progress box}}
- {{Progress meter}}
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Subpages of this template. |