Template:Progress bar: Difference between revisions
Jump to navigation
Jump to search
create a progress bar template, might be useful for fundraising |
add color parameters |
||
| Line 1: | Line 1: | ||
<div style="height: 18px; width: {{{width|100%}}}; background: #fff; border: 1px solid silver; margin: auto; padding: 0;"> | <div style="height: 18px; width: {{{width|100%}}}; background: {{{background|#fff}}}; border: 1px solid 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: #C9DDEC; width:{{{progress|0%}}};"> | <div style="height: 14px; margin: 2px; padding: 0; background: {{{color|#C9DDEC}}}; width:{{{progress|0%}}};"> | ||
</div></div><noinclude> | </div></div><noinclude> | ||
| Line 11: | Line 11: | ||
|from = (optional, text to put at the left edge of the bar) | |from = (optional, text to put at the left edge of the bar) | ||
|to = (optional, text to put at the right 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) | |||
|background = optional, sets the color of the background behind the bar | |||
|progress = (optional, defaults to 0%) | |progress = (optional, defaults to 0%) | ||
}} | }} | ||
Revision as of 01:41, 4 January 2008
{{#if:|
{{{from}}}
}}{{#if:|{{{to}}}
}}
A simple progress bar.
{{Progress bar
|width = (optional, defaults to 100%)
|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)
|background = optional, sets the color of the background behind the bar
|progress = (optional, defaults to 0%)
}}
Obviously, one will want to put some sort of percentage figure into the progress parameter.