Difference between revisions of "Template:ProgressBarBlock"
From A Wiki in the Desert
Line 1: | Line 1: | ||
<templatestyles src="ProgressBarBlock/main.css" /> | <templatestyles src="ProgressBarBlock/main.css" /> | ||
− | + | {{#vardefine:count|{{#expr:{{{1|5}}} + {{{2|10}}}}}}}{{#vardefine: w|{{#expr:(100.0 / {{#var:count}})-(({{#var:count}}/800) * {{#var:count}})}}}} | |
− | <div class="bar" style="width: | + | <div class="bar" style="width:50%;"> |
{{#loop: i | 0 | {{{1|5}}} |<nowiki/><div class="bar-block" style="background-color: green; width:{{#var:w}}%;"></div>}}{{#loop: i | 0 | {{{2|10}}} |<div class="bar-block" style="width:{{#var:w}}%;"></div>}} | {{#loop: i | 0 | {{{1|5}}} |<nowiki/><div class="bar-block" style="background-color: green; width:{{#var:w}}%;"></div>}}{{#loop: i | 0 | {{{2|10}}} |<div class="bar-block" style="width:{{#var:w}}%;"></div>}} | ||
</div> | </div> |