Difference between revisions of "Template:Progress bar"

From BlogNomic Wiki
Jump to navigation Jump to search
(add some options)
(fix nowrap on the text and remove line breaks from source)
Line 1: Line 1:
<includeonly><span>
+
<includeonly><span><div style="border:1px solid #000;"><div style="background:{{{color|#0f0}}}; text-align:right; white-space: nowrap; padding:0em; width:{{formatnum:{{#if:{{#if:{{{1|}}}|{{{1}}}|0}}|{{#expr:100*{{#if:{{{1|}}}|{{{1}}}|0}}/{{{2|{{{total|100}}}}}}round {{{decimal|1}}}}}}}}}%">&nbsp;&nbsp;{{{1}}}/{{{2}}}{{#if:{{{3|}}}|&nbsp;{{{3}}}}}&nbsp;&nbsp;</div></div></span></includeonly><noinclude>
<div style="border:1px solid #000;">
 
<div style="background:{{{color|#0f0}}}; text-align:right; padding:0em; width:{{formatnum:{{#if:{{#if:{{{1|}}}|{{{1}}}|0}}|{{#expr:100*{{#if:{{{1|}}}|{{{1}}}|0}}/{{{2|{{{total|100}}}}}}round {{{decimal|1}}}}}}}}}%">
 
&nbsp;&nbsp;{{{1}}}/{{{2}}}{{#if:{{{3|}}}|&nbsp;{{{3}}}}}&nbsp;&nbsp;
 
</div>
 
</div></includeonly><noinclude>
 
 
Template for displaying a progress bar, for use on a gamestate page.
 
Template for displaying a progress bar, for use on a gamestate page.
  

Revision as of 18:51, 23 July 2023

Template for displaying a progress bar, for use on a gamestate page.

Usage

Regular

{{progress bar|3|7}} produces:

  3/7  

Specify units

{{progress bar|3|7|players}} produces:

  3/7 players  

Colour

{{progress bar|3|7|color=#f90}} produces:

  3/7