A Wiki in the Desert
Log in

Difference between revisions of "Template:ProgressBarBlock"

From A Wiki in the Desert
Line 2: Line 2:
 
{{#vardefine:current|{{{1|0}}}}}{{#vardefine:count|{{{2|7}}}}}{{#vardefine: w|{{#expr:(100.0 / {{#var:count}})-0.25}}}}
 
{{#vardefine:current|{{{1|0}}}}}{{#vardefine:count|{{{2|7}}}}}{{#vardefine: w|{{#expr:(100.0 / {{#var:count}})-0.25}}}}
 
<div class="bar">
 
<div class="bar">
{{#loop: i | 0 | {{#var:current}} |<nowiki/><div class="bar-block" style="background-color: green; width:{{#var:w}}%;"></div>}}{{#loop: i | 0 | {{#expr:{{#var:count}}-{{#var:current}}}}|<div class="bar-block" style="width:{{#var:w}}%;"></div>}}
+
{{#loop: i | 0 | {{#var:current}} |<nowiki/><div class="bar-block" style="background-color: green;"></div>}}{{#loop: i | 0 | {{#expr:{{#var:count}}-{{#var:current}}}}|<div class="bar-block"></div>}}
 
</div>
 
</div>

Revision as of 20:23, 4 June 2021