Template:Progression: Difference between revisions
From Portals of Phereon Wiki
Content added Content deleted
portalsofphereon>Olaroll (Created page with "<includeonly>{{#switch:<translate></translate> | = <table width={{#if:{{{width|}}}|{{{width|}}}|50%}} align=center style="background:transparent"> <tr> <td align=center>{{#if:...") |
portalsofphereon>Olaroll No edit summary |
||
Line 1: | Line 1: | ||
⚫ | |||
<includeonly>{{#switch:<translate></translate> |
|||
| = |
|||
⚫ | |||
<tr> |
<tr> |
||
<td align=center>{{#if:{{{task|}}}|{{{task|}}}: }} |
<td align=center>{{#if:{{{task|}}}|{{{task|}}}: }}<!--T:1--> <big>'''<tvar|1>{{formatnum:{{#if:{{{1|}}}|{{#expr:100*{{{1}}}/{{{2|100}}}round 1}}|0}}}}</>%'''</big> complete</td> |
||
</tr> |
</tr> |
||
<tr> |
<tr> |
||
Line 15: | Line 13: | ||
</tr> |
</tr> |
||
</table> |
</table> |
||
| #default= |
|||
{{#invoke:Template translation|renderTranslatedTemplate|template=Template:Progression|noshift=1}} |
|||
}}</includeonly><noinclude>{{Documentation}} |
}}</includeonly><noinclude>{{Documentation}} |
||
</noinclude> |
</noinclude> |
Revision as of 04:43, 21 November 2019
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}} :
<tvar|1>0</>% complete | |
|
}}
{{Progression|0.5}} :
<tvar|1>0.5</>% complete | ||
|
}}
{{Progression|1}} :
<tvar|1>1</>% complete | ||
|
}}
{{Progression|36.7}} :
<tvar|1>36.7</>% complete | ||
|
}}
{{Progression|100}} :
<tvar|1>100</>% complete | |
|
}}
2 parameters
{{Progression|0|250}} :
<tvar|1>0</>% complete | |
|
}}
{{Progression|100|250}} :
<tvar|1>40</>% complete | ||
|
}}
{{Progression|200|300}} :
<tvar|1>66.7</>% complete | ||
|
}}
{{Progression|300|300}} :
<tvar|1>100</>% complete | |
|
}}
3 parameters
{{Progression|0|250|task=Sorting articles}} :
Sorting articles: <tvar|1>0</>% complete | |
|
}}
{{Progression|100|250|task=Sorting articles}} :
Sorting articles: <tvar|1>40</>% complete | ||
|
}}
[view | edit | purge]The above documentation is transcluded fromTemplate:Progression/doc.