Vorlage:Fortschrittsbalken: Unterschied zwischen den Versionen

Aus Wiki - FabLab Lübeck e.V.
Zeile 1: Zeile 1:
<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|}}}
onlyinclude>
| title="{{{title|}}}"
  <div class="infobox float-right" id="vorlage-infobox-Name" summary="Infobox Name" style="border:1px solid lightsteelblue; padding:5px; width:25em; margin:0 0 0.5em 1em; font-size:85%; background:#F9F9F9;">
}}><!--
    <div style="background:lightsteelblue; margin-bottom:2px; text-align:center; font-size:118%; font-weight:bold; width:100%;"> {{#if: {{{Name|}}}|{{{Name}}}|{{PAGENAME}} }} </div>
--><div style="background:{{{box-background|#FFF}}};color:{{{text-color|#252525}}};border:{{{box-border|1px solid #AAA}}};padding:{{{box-padding|1px}}};"><!--
--><div style="position:relative"><!--
{| style="width:100%; margin:0; text-align:left;"
--><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}}})
!colspan="2"| {{#if:{{{Vorname-Param|}}} | Vorname {{!!}} {{{Vorname-Param}}} }}
  | background:#AAA;
  | {{#ifexpr: ({{{current|0}}}) >= ({{{max|100}}})
|-
    | background:#0F0;
!colspan="2"| {{#if:{{{Nachname-Param|}}} | Nachname {{!!}} {{{Nachname-Param}}} }}
    | background:rgb({{#expr: (
        (({{{current|0}}}) - ({{{min|0}}})) / (({{{max|100}}}) - ({{{min|0}}})) * (160 - 255)+255
|-
      ) round 0}},{{#expr: (
!colspan="2"| {{#if:{{{Geburtsort-Param|}}} | Geburtsort {{!!}} {{{Geburtsort-Param}}} }}
        (({{{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
!colspan="2"| {{#if:{{{Geburtsdatum-Param|}}} | Geburtstag {{!!}} {{{Geburtsdatum-Param}}} }}
      ) round 0}});
    }}
|-  
  }}
}}color:transparent;text-align:left;{{#if: {{{progression|}}}
|}
| width:{{{progression|}}};
  </div>
| width:{{#ifexpr: ({{{min|0}}}) >= ({{{max|100}}}) or ({{{current|0}}}) <= ({{{min|0}}})
</onlyinclude>
  | 0
  | {{#ifexpr: ({{{current|0}}}) >= ({{{max|100}}})
    | 100%
    | {{#expr: (({{{current|0}}}) - ({{{min|0}}})) / (({{{max|100}}}) - ({{{min|0}}})) * 100 round 6}}%
    }}
  }};
}}">&nbsp;</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:35 Uhr

onlyinclude>

Fortschrittsbalken