Vorlage:Fortschrittsbalken: Unterschied zwischen den Versionen

Aus FabLab Region Nürnberg
(Benutzung kopiert)
(Parameter 1 auf "value" umgestellt)
Zeile 7: Zeile 7:
| <p>
| <p>
   <big>
   <big>
   '''{{#expr: ( {{{1|<noinclude>2</noinclude>0}}} / {{{total|100}}}) * 100 round 1}}%'''
   '''{{#expr: ( {{{value|<noinclude>2</noinclude>0}}} / {{{total|100}}}) * 100 round 1}}%'''
   </big>
   </big>
   {{{text|completed <small>(estimate)</small>}}}
   {{{text|completed <small>(estimate)</small>}}}
Zeile 14: Zeile 14:
<p style="border:{{{border|1px solid gray}}}; padding:{{{padding|1px}}}; overflow:hidden;">
<p style="border:{{{border|1px solid gray}}}; padding:{{{padding|1px}}}; overflow:hidden;">
   <span style="
   <span style="
     width: {{#expr: {{{1|<noinclude>2</noinclude>0}}} / {{{total|100}}} * 100}}%;
     width: {{#expr: {{{value|<noinclude>2</noinclude>0}}} / {{{total|100}}} * 100}}%;
     height: {{{height|2}}}px;
     height: {{{height|2}}}px;
     background:{{{color1|#5FDB00}}};
     background:{{{color1|#5FDB00}}};
Zeile 20: Zeile 20:
     ">&nbsp;</span>
     ">&nbsp;</span>
   <span style="
   <span style="
     width:{{#expr: 100 - {{{1|<noinclude>2</noinclude>0}}} / {{{total|100}}} * 100}}%;
     width:{{#expr: 100 - {{{value|<noinclude>2</noinclude>0}}} / {{{total|100}}} * 100}}%;
     height:{{{height|2}}}px;
     height:{{{height|2}}}px;
     background:{{{color2|#efefef}}};
     background:{{{color2|#efefef}}};

Version vom 22. März 2013, 12:15 Uhr

20% completed (estimate)

   

Usage

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
header = no (or any value other than "yes", which is the default) suppresses the display of the percentage on the top line