Template:Progression/doc: Difference between revisions

From Our World of Text Wiki
Jump to navigation Jump to search
(Created template documentation.)
 
(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''|3=task=''param3''}}
:{{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}}
{{Progression|0}}
 
* {{tlx|Progression|0.5}} →
* {{tlx|Progression|0.5}} →
*: {{Progression|0.5}}
{{Progression|0.5}}
 
* {{tlx|Progression|1}} →
* {{tlx|Progression|1}} →
*: {{Progression|1}}
{{Progression|1}}
 
* {{tlx|Progression|36.7}} →
* {{tlx|Progression|36.7}} →
*: {{Progression|36.7}}
{{Progression|36.7}}
 
* {{tlx|Progression|100}} →
* {{tlx|Progression|100}} →
*: {{Progression|100}}
{{Progression|100}}


==== 2 parameters ====
==== 2 parameters ====
* {{tlx|Progression|0|250}} →
* {{tlx|Progression|0|250}} →
*: {{Progression|0|250}}
{{Progression|0|250}}
 
* {{tlx|Progression|100|250}} →
* {{tlx|Progression|100|250}} →
*: {{Progression|100|250}}
{{Progression|100|250}}
 
* {{tlx|Progression|200|300}} →
* {{tlx|Progression|200|300}} →
*: {{Progression|200|300}}
{{Progression|200|300}}
 
* {{tlx|Progression|300|300}} →
* {{tlx|Progression|300|300}} →
*: {{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}}
{{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}}
{{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)

0% complete
 


0.5% complete
   


1% complete
   


36.7% complete
   


100% complete
 


2 parameters

0% complete
 


40% complete
   


66.7% complete
   


100% complete
 


3 parameters

Sorting articles: 0% complete
 


Sorting articles: 40% complete