Vorlage:Fortschrittsbalken: Unterschied zwischen den Versionen
Aus Wiki - FabLab Lübeck e.V.
Dennis (Diskussion | Beiträge) |
Dennis (Diskussion | Beiträge) |
||
Zeile 1: | Zeile 1: | ||
<div style=" | <div style="position:relative;display:inline-block;font-size:{{{text-size|small}}};line-height:1.5;margin:{{{box-margin|1px}}};margin-left:0;margin-right:0;width:{{{box-width|100%}}};font-weight:{{{text-weight|bold}}};" {{#if: {{{title|}}} | ||
| title="{{{title|}}}" | |||
{{# | }}><!-- | ||
--><div style="background:{{{box-background|#FFF}}};color:{{{text-color|#252525}}};border:{{{box-border|1px solid #AAA}}};padding:{{{box-padding|1px}}};"><!-- | |||
--><div style="position:relative"><!-- | |||
{{# | --><div style="position:relative;z-index:1;top:0;{{#if: {{{bar-background|}}} | ||
| < | | background:{{{bar-background|}}}; | ||
| {{#ifexpr: ({{{min|0}}}) >= ({{{max|100}}}) or ({{{current|0}}}) < ({{{min|0}}}) | |||
| background:#AAA; | |||
| {{#ifexpr: ({{{current|0}}}) >= ({{{max|100}}}) | |||
| background:#0F0; | |||
| background:rgb({{#expr: ( | |||
}} | (({{{current|0}}}) - ({{{min|0}}})) / (({{{max|100}}}) - ({{{min|0}}})) * (160 - 255)+255 | ||
) round 0}},{{#expr: ( | |||
(({{{current|0}}}) - ({{{min|0}}})) / (({{{max|100}}}) - ({{{min|0}}})) * (240 - 128)+128 | |||
) round 0}},{{#expr: ( | |||
(({{{current|0}}}) - ({{{min|0}}})) / (({{{max|100}}}) - ({{{min|0}}})) * ( 0 - 128)+128 | |||
) round 0}}); | |||
}} | |||
}} | |||
}}color:transparent;text-align:left;{{#if: {{{progression|}}} | |||
| width:{{{progression|}}}; | |||
| width:{{#ifexpr: ({{{min|0}}}) >= ({{{max|100}}}) or ({{{current|0}}}) <= ({{{min|0}}}) | |||
| 0 | |||
| {{#ifexpr: ({{{current|0}}}) >= ({{{max|100}}}) | |||
| 100% | |||
</ | | {{#expr: (({{{current|0}}}) - ({{{min|0}}})) / (({{{max|100}}}) - ({{{min|0}}})) * 100 round 6}}% | ||
</div | }} | ||
}}; | |||
}}"> </div><!-- | |||
--><div style="position:absolute;z-index:2;top:0;width:100%;background:transparent;text-align:center;">{{#if: {{{progression|}}} | |||
| {{{progression|}}} | |||
| {{#ifeq: {{{mode|}}} | value | |||
| {{{current|0}}} | |||
| {{#ifexpr: ({{{min|0}}}) >= ({{{max|100}}}) | |||
| ? | |||
| {{#expr: (({{{current|0}}}) - ({{{min|0}}})) / (({{{max|100}}}) - ({{{min|0}}})) * 100 round 1}}% | |||
}} | |||
}} {{{desc|}}} | |||
}}</div><!-- | |||
--></div></div></div |
Version vom 2. November 2016, 10:02 Uhr
0%