Template:Progression/doc: Difference between revisions
Jump to navigation
Jump to search
Dat Hack3r (talk | contribs) Created template documentation. |
Dat Hack3r (talk | contribs) That was unintendedly ugly. |
||
| Line 1: | Line 1: | ||
{{tlx|Progression}} generates a progress bar based on the inputted values. | |||
=== Syntax === | === Syntax === | ||
:{{tlx|Progression|''percent''}} | :{{tlx|Progression|''percent''}} | ||
| Line 4: | Line 6: | ||
:{{tlx|Progression|''param1''|''param2''}} | :{{tlx|Progression|''param1''|''param2''}} | ||
Calculates the progression as a function of <code>param1/param2</code> | Calculates the progression as a function of <code>param1/param2</code>. | ||
:{{tlx|Progression|''param1''|''param2''| | :{{tlx|Progression|''param1''|''param2''|task{{=}}''param3''}} | ||
Calculates the progression as a function of <code>param1/param2</code>, and displays a task label on the bar. | Calculates the progression as a function of <code>param1/param2</code>, and displays a task label on the bar. | ||
| Line 13: | Line 15: | ||
==== 1 parameter (percent) ==== | ==== 1 parameter (percent) ==== | ||
* {{tlx|Progression|0}} → | * {{tlx|Progression|0}} → | ||
{{Progression|0}} | |||
* {{tlx|Progression|0.5}} → | * {{tlx|Progression|0.5}} → | ||
{{Progression|0.5}} | |||
* {{tlx|Progression|1}} → | * {{tlx|Progression|1}} → | ||
{{Progression|1}} | |||
* {{tlx|Progression|36.7}} → | * {{tlx|Progression|36.7}} → | ||
{{Progression|36.7}} | |||
* {{tlx|Progression|100}} → | * {{tlx|Progression|100}} → | ||
{{Progression|100}} | |||
==== 2 parameters ==== | ==== 2 parameters ==== | ||
* {{tlx|Progression|0|250}} → | * {{tlx|Progression|0|250}} → | ||
{{Progression|0|250}} | |||
* {{tlx|Progression|100|250}} → | * {{tlx|Progression|100|250}} → | ||
{{Progression|100|250}} | |||
* {{tlx|Progression|200|300}} → | * {{tlx|Progression|200|300}} → | ||
{{Progression|200|300}} | |||
* {{tlx|Progression|300|300}} → | * {{tlx|Progression|300|300}} → | ||
{{Progression|300|300}} | |||
==== 3 parameters ==== | ==== 3 parameters ==== | ||
* {{tlx|Progression|0|250|task{{=}}Sorting articles}} → | * {{tlx|Progression|0|250|task{{=}}Sorting articles}} → | ||
{{Progression|0|250|task=Sorting articles}} | |||
* {{tlx|Progression|100|250|task{{=}}Sorting articles}} → | * {{tlx|Progression|100|250|task{{=}}Sorting articles}} → | ||
{{Progression|100|250|task=Sorting articles}} | |||
[[Category:Utility templates]] | [[Category:Utility templates]] | ||
Latest revision as of 16:51, 19 November 2024
{{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 | ||
|
|