Difference between revisions of "Template:Progress bar"

From Yabause
Jump to: navigation, search
m (Updating template to check function.)
(fixed and removed some things.)
 
Line 1: Line 1:
{| style="border: 1px solid gray" cellspacing=1 width={{{width|75%}}} {{#ifeq: {{{header|yes}}} | yes | no | align=center
+
{| style="border: 1px solid black" cellspacing=1 width={{{width|75%}}} height=15x align=center
  |+ '''{{{1|50}}}%''' {{{Text| completed <small>(estimate)</small>}}}
+
  |+ <big>'''{{{1|0}}}% '''</big>{{{Text| completed <small>(estimate)</small>}}}
|- }}
+
  |- style="height:{{{height|1}}}px"
  |- style="height:{{{height|2}}}px"
+
 
  | width={{{1|00.00}}}%; style=background:#7fff00|
 
  | width={{{1|00.00}}}%; style=background:#7fff00|
 
  | width={{#expr: 100 - {{{1|<noinclude>2</noinclude>0}}} / {{{total|100}}} * 100}}%; style=background:#ff7f50|
 
  | width={{#expr: 100 - {{{1|<noinclude>2</noinclude>0}}} / {{{total|100}}} * 100}}%; style=background:#ff7f50|
|}<noinclude>
+
|}
  
{{Progress bar|100|header=no}}
+
<noinclude>
 +
 
 +
{{Progress bar|100|Text=translated|}}
  
 
== Usage ==
 
== Usage ==
Line 19: Line 20:
 
*<tt>text</tt>  = message to display after %; defaults to: completed <small>(estimate)</small>
 
*<tt>text</tt>  = message to display after %; defaults to: completed <small>(estimate)</small>
 
*<tt>total</tt> = amount to use as the denominator (instead of 100), allows the template to compute the percentage on the fly
 
*<tt>total</tt> = amount to use as the denominator (instead of 100), allows the template to compute the percentage on the fly
*<tt>header</tt> = no (or any value other than "yes", which is the default) suppresses the display of the percentage on the top line
 
 
</noinclude>
 
</noinclude>

Latest revision as of 13:47, 5 August 2015

0% completed (estimate)


100% translated


Usage

{{Progress bar|<value>}}

This template draws a progress bar. The value to supply as the parameter is the percent, from 0 to 0.01 or 0.99 to 1 or 1.01 to 99.99 or 100. 14 would mean 14%, .14 would be 0.14%. If you don't specify a value, it returns 0%.

Optional parameters

  • height =
  • width = defaults to 75%
  • text = message to display after %; defaults to: completed (estimate)
  • total = amount to use as the denominator (instead of 100), allows the template to compute the percentage on the fly