Template:Progress bar: Difference between revisions

From Shifti
Jump to navigation Jump to search
No edit summary
also add a border color parameter
 
Line 1: Line 1:
<div style="height: 18px; width: {{{width|100%}}}; background: {{{background|#fff}}}; border: 1px solid silver; margin: auto; padding: 0;">
<div style="height: 18px; width: {{{width|100%}}}; background: {{{background|#fff}}}; border: 1px solid {{{border|silver}}}; margin: auto; padding: 0;">
{{#if:{{{from|}}}|<div style="float:left;">{{{from}}}</div>}}{{#if:{{{to|}}}|<div style="float:right;">{{{to}}}</div>}}
{{#if:{{{from|}}}|<div style="float:left;">{{{from}}}</div>}}{{#if:{{{to|}}}|<div style="float:right;">{{{to}}}</div>}}
<div style="height: 14px; margin: 2px; padding: 0; background: {{{color|#C9DDEC}}}; width:{{{progress|0%}}};">
<div style="height: 14px; margin: 2px; padding: 0; background: {{{color|#C9DDEC}}}; width:{{{progress|0%}}};">
Line 13: Line 13:
|color= optional, sets the color of the progress bar (defaults to a light blue)
|color= optional, sets the color of the progress bar (defaults to a light blue)
|background = optional, sets the color of the background behind the bar (defaults to white)
|background = optional, sets the color of the background behind the bar (defaults to white)
|border = optional, sets the color of the border (defaults to silver)
|progress = optional, defaults to 0%. Use a percentage to ensure maximum flexibility.
|progress = optional, defaults to 0%. Use a percentage to ensure maximum flexibility.
}}
}}

Latest revision as of 01:50, 4 January 2008

{{#if:|
{{{from}}}
}}{{#if:|
{{{to}}}
}}

A simple progress bar.

{{Progress bar
|width = optional, defaults to 100%. Use percentage or pixels, as desired.
|from = optional, text to put at the left edge of the bar
|to = optional, text to put at the right edge of the bar
|color= optional, sets the color of the progress bar (defaults to a light blue)
|background = optional, sets the color of the background behind the bar (defaults to white)
|border = optional, sets the color of the border (defaults to silver)
|progress = optional, defaults to 0%. Use a percentage to ensure maximum flexibility.
}}

Obviously, one will want to put some sort of percentage figure into the progress parameter.