Template:Percentage bar

From Team Fortress Wiki
Revision as of 20:54, 22 October 2023 by Wookipan (talk | contribs) (Add class attributes for class selector targeting)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
0
30%  

Template documentation [view] [edit] [history] [purge]

This template creates a simple status bar representing the completion percent of anything. By default, this template assumes that the bar goes from 0% to 100%, therefore in use:

{{Percentage bar|25}}

generates:

0.25
25%  

However, the top end can be overridden by specifying the total argument (case-sensitive), therefore in this case:

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

generates:

0.125
12%  

as 25 of 200 is 12%, rounding to the nearest whole number.