summaryrefslogtreecommitdiff
path: root/skins/html/bloecke/percentbar.tmpl
blob: 16ebaab6dcb7621790bc5d17d21466d1f727f381 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?% barexp = barwidth / 100;
    IF color_switch;
        ground = "images/bar_green.png";
        over = "images/bar_red.png";
    ELSE;
        ground = "images/bar_red.png";
        over = "images/bar_green.png";
    END;
     %?>

<div align="center" style='position:absolute'>
    <img src="<?% ground %?>" width="<?% barwidth %?>" title='<?% percent div 1 | format "%02d" %?>%'>
    <div style='position:absolute; top:0px; left:0px; clip:rect(0px, <?% ( percent * barexp ) div 1 %?>px, <?% ( percent * barexp ) div 1 %?>px, 0px)'>
    <img src="<?% over %?>" width="<?% barwidth %?>" title='<?% percent div 1 | format "%02d" %?>%'>
    </div>
    <?% IF barwidth > 200 %?>
    <div style='position:absolute; top:10px; left:<?% barwidth - 70 %?>px; color:#FFFFFF;font-weight:bold'>
    <?% percent div 1 | format "%02d" %?>%
    </div>
    <?% END %?>
</div>