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:barwidth|50.0}}{{#vardefine:count|{{#expr:{{{1|5}}} + {{{2|10}}}}}}}{{#vardefine: w|{{#expr:100.0 / {{#var:count}}}}}} | + | {{#vardefine:barwidth|50.0}}{{#vardefine:count|{{#expr:{{{1|5}}} + {{{2|10}}}}}}}{{#vardefine: w|{{#expr:(100.0 / {{#var:count}})-(0.0170 * {{#var:count}})}}}} |
<div class="bar" style="width:{{#var:barwidth}}%;"> | <div class="bar" style="width:{{#var:barwidth}}%;"> | ||
{{#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> |