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" /> | ||
− | <div class="bar"> | + | {{#vardefine:barwidth|50.0}}{{#vardefine: w|{{#expr:100.0 / ({{{1|5}}} + {{{2|10}}}+2)}}}} |
− | {{#loop: i | 0 | {{{1|5}}} |<div class="bar-block" style="background-color: green;"></div><unesc>\n</unesc>}} | + | <div class="bar" style="width:{{#var:barwidth}}%;"> |
− | {{#loop: i | 0 | {{{2|10}}} |<div class="bar-block"></div><unesc>\n</unesc>}} | + | {{#loop: i | 0 | {{{1|5}}} |<nowiki/><div class="bar-block" style="background-color: green; width:{{#var:w}}%;"></div><unesc>\n</unesc>}}{{#loop: i | 0 | {{{2|10}}} |<div class="bar-block" style="width:{{#var:w}}%;"></div><unesc>\n</unesc>}} |
</div> | </div> |