Template:Unit bar: Difference between revisions

From PZwiki
(Make bar go down from 100)
(Docu, small updates, rm underconstruction)
Line 1: Line 1:
<noinclude>
<noinclude>
{{Underconstruction}}
{{Documentation/sandbox|doc=
{{Documentation/sandbox|doc=
This template should only be used in other templates. For general progress bar usage please use [[Template:Percentage bar]].
This template should only be used in other templates. For a general progress bar, please use [[Template:Percentage bar]].
 
This template will create a percentage bar based on units given, and use delta. The first parameter given is the total units used, and the second parameter is the use delta. This should be a decimal between 0 and 1. The template will automatically calculate the percentage used, and take that away from 100, displaying the bar and units used above.


==Usage==
==Usage==
{{tll|Unit bar|Units used|Use delta}}<br>
{{tll|Unit bar|Units used|Use delta}}


==Example==
{{tll|Unit bar|2|0.1}}
{{tll|Unit bar|2|0.1}}
{{Unit bar|2|0.1}}
{{Unit bar|2|0.1}}
Line 13: Line 15:
[https://wiki.teamfortress.com/wiki/Template:Percentage_bar Team fortress 2 wiki]
[https://wiki.teamfortress.com/wiki/Template:Percentage_bar Team fortress 2 wiki]
}}
}}
 
</noinclude><includeonly><div style="text-align:center; display:block;">
</noinclude><includeonly>
<div style="text-align:center; display:block;">
   <div style="font-size:85%; text-align:center;">{{formatnum:{{{1|0}}}}} unit(s)</div>
   <div style="font-size:85%; text-align:center;">{{formatnum:{{{1|0}}}}} unit(s)</div>
   <div class="percentage-bar" style="border:{{{border|1px solid #68191b}}}; padding:{{{padding|1px}}}; overflow:hidden; width:{{{width|80%}}}; display:inline-block; font-size:small; text-align:center; {{{style|}}}"><!--  
   <div class="percentage-bar" style="border:{{{border|1px solid #68191b}}}; padding:{{{padding|1px}}}; overflow:hidden; width:{{{width|80%}}}; display:inline-block; font-size:small; text-align:center; {{{style|}}}"><!--  
Line 35: Line 35:
       {{{style2|}}}
       {{{style2|}}}
       ">&nbsp;</span><!--  
       ">&nbsp;</span><!--  
     --></div>
     --></div></div></includeonly>
</div></includeonly>

Revision as of 03:56, 28 March 2024

Notebook.pngTemplate Documentation

This template should only be used in other templates. For a general progress bar, please use Template:Percentage bar.

This template will create a percentage bar based on units given, and use delta. The first parameter given is the total units used, and the second parameter is the use delta. This should be a decimal between 0 and 1. The template will automatically calculate the percentage used, and take that away from 100, displaying the bar and units used above.

Usage

{{Unit bar|Units used|Use delta}}

Example

{{Unit bar|2|0.1}}

2 unit(s)
  

Attribution

Team fortress 2 wiki

Editors can experiment in this template's sandbox.