Template:Percentage bar: Difference between revisions

From PZwiki
(Create template)
 
(Docu, small updates)
Line 2: Line 2:
{{Underconstruction}}
{{Underconstruction}}
{{Documentation/sandbox|doc=
{{Documentation/sandbox|doc=
This template is used to show a percentage as a bar. By default the parameter given is a percentage out of 100, but the total can be changed by giving the parameter <code>total=X</code> where X is the total number.


==Usage==
==Usage==
Line 9: Line 10:
{{tll|Percentage bar|50|total{{=}}200}}
{{tll|Percentage bar|50|total{{=}}200}}
{{Percentage bar|50|total=200}}
{{Percentage bar|50|total=200}}
==Attribution==
==Attribution==
[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="display:none">{{#expr: {{formatnum:{{{1|0}}}|R}} / {{formatnum:{{{total|100}}}|R}}}}</div><!-- Sort key
</noinclude><includeonly>
<div style="display:none">{{#expr: {{formatnum:{{{1|0}}}|R}} / {{formatnum:{{{total|100}}}|R}}}}</div><!-- Sort key
--><div class="percentage-bar" style="border:{{{border|1px solid #68191b}}}; padding:{{{padding|1px}}}; overflow:hidden; width:{{{width|50%}}}; margin: none; font-size:xx-small; text-align:right; {{{style|}}}"><!--  
--><div class="percentage-bar" style="border:{{{border|1px solid #68191b}}}; padding:{{{padding|1px}}}; overflow:hidden; width:{{{width|50%}}}; margin: none; font-size:xx-small; text-align:right; {{{style|}}}"><!--  
   --><span class="percentage-bar--progress" style="
   --><span class="percentage-bar--progress" style="
Line 38: Line 33:
     {{{style2|}}}
     {{{style2|}}}
     ">&nbsp;</span><!--  
     ">&nbsp;</span><!--  
   --></div>
   --></div></includeonly>
</includeonly>

Revision as of 03:52, 28 March 2024

Hammer.png
This template is currently under construction.
It is in the process of an expansion or major restructuring. You are welcome to assist in its construction by editing it as well.
If this page has not been updated in a while, please replace this notice with {{Improve}}. Last edit was 28/03/2024.
Notebook.pngTemplate Documentation

This template is used to show a percentage as a bar. By default the parameter given is a percentage out of 100, but the total can be changed by giving the parameter total=X where X is the total number.

Usage

{{Percentage bar|50}}

0.5
50%  

{{Percentage bar|50|total=200}}

0.25
25%  

Attribution

Team fortress 2 wiki

Editors can experiment in this template's sandbox.