A Wiki in the Desert
Log in

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|8}}}}}}}{{#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}}}}}}
 
<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><unesc>\n</unesc>}}{{#loop: i | 0 | {{{2|10}}} |<div class="bar-block" style="width:{{#var:w}}%;"></div><unesc>\n</unesc>}}
+
{{#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>

Revision as of 17:02, 3 June 2021