Template:Progression: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
Dat Hack3r (talk | contribs) Moved documentation to /doc. This isn't the MediaWiki Wiki. |
||
| Line 1: | Line 1: | ||
<table width={{#if:{{{width|}}}|{{{width|}}}|50%}} align=center style="background:transparent"> | |||
<tr> | <tr> | ||
<td align=center>{{#if:{{{task|}}}|{{{task|}}}: }}<big>'''{{formatnum:{{#if:{{{1|}}}|{{#expr:100*{{{1}}}/{{{2|100}}}round 1}}|0}}}}%'''</big> complete</td> | <td align=center>{{#if:{{{task|}}}|{{{task|}}}: }}<big>'''{{formatnum:{{#if:{{{1|}}}|{{#expr:100*{{{1}}}/{{{2|100}}}round 1}}|0}}}}%'''</big> complete</td> | ||
| Line 16: | Line 13: | ||
</tr> | </tr> | ||
</table> | </table> | ||
<noinclude> | |||
{{ | {{Documentation}} | ||
</noinclude> | </noinclude> | ||
Latest revision as of 16:44, 19 November 2024
| 0% complete | |
|
|
{{Progression}} generates a progress bar based on the inputted values.
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 | ||
|
|