Template:Percentage bar: Difference between revisions
(Create template) |
m (rm {{underconstruction}}) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
{{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 9: | ||
{{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 32: | ||
{{{style2|}}} | {{{style2|}}} | ||
"> </span><!-- | "> </span><!-- | ||
--></div> | --></div></includeonly> | ||
</includeonly> |
Revision as of 03:53, 28 March 2024
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}}
{{Percentage bar|50|total=200}}
Attribution
Editors can experiment in this template's sandbox.