Template:PercentageMeter

From syn2cat - HackerSpace.lu
(Difference between revisions)
Jump to: navigation, search
m (test)
m
 
(One intermediate revision by one user not shown)
Line 2: Line 2:
 
<table border="0" style="border: 1px solid black; margin: auto; text-align:center;  padding:1px;" width="75%" cellspacing=2 cellpadding=3><tr>
 
<table border="0" style="border: 1px solid black; margin: auto; text-align:center;  padding:1px;" width="75%" cellspacing=2 cellpadding=3><tr>
 
<td bgcolor="lightgreen" width="{{#expr: ({{{1|<noinclude>2</noinclude>0}}}/{{{total|100}}}) * 100}}%">Pledged: € {{{1|<noinclude>2</noinclude>0}}} ({{#expr: ({{{1|<noinclude>2</noinclude>0}}}/{{{total|100}}}) * 100 round 1}}%)</td>
 
<td bgcolor="lightgreen" width="{{#expr: ({{{1|<noinclude>2</noinclude>0}}}/{{{total|100}}}) * 100}}%">Pledged: € {{{1|<noinclude>2</noinclude>0}}} ({{#expr: ({{{1|<noinclude>2</noinclude>0}}}/{{{total|100}}}) * 100 round 1}}%)</td>
<td bgcolor="#ff7f50" width="{{#expr: 100 - ({{{1|<noinclude>2</noinclude>0}}}/{{{total|100}}}) * 100}}%">Required: € {{#expr: {{{total|100}}} - {{{1|<noinclude>2</noinclude>0}}} }} ({{#expr: (100 - ({{{1|<noinclude>2</noinclude>0}}}/{{{total|100}}}) * 100) round 1}}%)</td>
+
<td bgcolor="#ff7f50" width="{{#expr: 100 - ({{{1|<noinclude>2</noinclude>0}}}/{{{total|100}}}) * 100}}%">Missing: € {{#expr: {{{total|100}}} - {{{1|<noinclude>2</noinclude>0}}} }} ({{#expr: (100 - ({{{1|<noinclude>2</noinclude>0}}}/{{{total|100}}}) * 100) round 1}}%)</td>
  
 
</tr></table>
 
</tr></table>

Latest revision as of 21:38, 19 June 2012


Percentage meter template as borrowed from labitat.dk (Thanks guys ;))

Should be used by a semantic inline query (see Template:RadioShowPodcast), but you may also use it manually:

{{PercentageMeter|<current amount>|total=<total amount>}}
Personal tools
Namespaces

Variants
Actions
Navigation
syn2cat
Hackerspace
Activities
Initiatives
Community
Tools
Tools