Template:Bar-voted: Difference between revisions

From PoliticalSG
No edit summary
No edit summary
Line 7: Line 7:
| #default={{{party1}}}
| #default={{{party1}}}
}}<span style="font-variant:big-caps;"> &nbsp; '''{{{party1}}}''': {{formatnum:{{{party1votes}}} }}</span>
}}<span style="font-variant:big-caps;"> &nbsp; '''{{{party1}}}''': {{formatnum:{{{party1votes}}} }}</span>
| style="height:20px; align:right; vertical-align:bottom; padding:0; width:120px;" |<div style="background-color: {{#switch:{{{party1}}}
| style="height:20px; align:right; padding:0; width:120px;" |<div style="background-color:{{#switch:{{{party1}}}
| PAP=#e5e7e9
| PAP=#e5e7e9
| WP=#aed6f1
| WP=#aed6f1
Line 19: Line 19:
| PSP= &nbsp; [[file:Psp-logo.png| 30px]]
| PSP= &nbsp; [[file:Psp-logo.png| 30px]]
| #default={{{party2}}}
| #default={{{party2}}}
}}<span style="font-variant:big-caps;"> &nbsp; <span style="font-variant:big-caps;">'''{{{party2}}}''': {{formatnum:{{#expr:{{{totalvotes}}}-{{{party1votes}}} }} }}</span>
}}<span style="font-variant:big-caps;"> &nbsp; '''{{{party2}}}''': {{formatnum:{{{party2votes}}} }}</span>
| style="height:20px; align:right; vertical-align:top; padding:0; width:120px;" |<div style="background-color: {{#switch:{{{party2}}}
| style="height:20px; align:right; padding:0; width:120px;" |<div style="background-color:{{#switch:{{{party2}}}
| PAP=#e5e7e9
| PAP=#e5e7e9
| WP=#aed6f1
| WP=#aed6f1
Line 26: Line 26:
| #566573
| #566573
}}; width:{{#expr:{{{party2votes}}}/{{{totalvotes}}}*100 round 0}}px;">&nbsp;{{#expr:{{{party2votes}}}/{{{totalvotes}}}*100 round 0}}%</div>
}}; width:{{#expr:{{{party2votes}}}/{{{totalvotes}}}*100 round 0}}px;">&nbsp;{{#expr:{{{party2votes}}}/{{{totalvotes}}}*100 round 0}}%</div>
|-
{{#if:{{{party3}}}|
| style="height:20px; align:right; text-align:justify; padding:0; width:150px;" | {{#switch:{{{party3}}}
| PAP= &nbsp; [[file:PAP logo.png| 30px]]
| WP= &nbsp; [[file:WP logo.png| 30px]]
| PSP= &nbsp; [[file:Psp-logo.png| 30px]]
| #default={{{party3}}}
}}<span style="font-variant:big-caps;"> &nbsp; <span style="font-variant:big-caps;">'''{{{party3}}}''': {{formatnum:{{{party3votes}}} }}</span>
| style="height:20px; align:right; padding:0; width:120px;" |<div style="background-color:{{#switch:{{{party2}}}
| PAP=#e5e7e9
| WP=#aed6f1
| PSP=#d98880
| #566573
}}; width:{{#expr:{{{party3votes}}}/{{{totalvotes}}}*100 round 0}}px;">&nbsp;{{#expr:{{{party3votes}}}/{{{totalvotes}}}*100 round 0}}%</div>
}}
|}
|}

Revision as of 15:20, 9 March 2025

{{{party1}}}   {{{party1}}}: {{{party1votes}}} <div style="background-color:
  1. 566573; width:Expression error: Unrecognized punctuation character "{".px;"> Expression error: Unrecognized punctuation character "{".%
{{{party2}}}   {{{party2}}}: {{{party2votes}}} <div style="background-color:
  1. 566573; width:Expression error: Unrecognized punctuation character "{".px;"> Expression error: Unrecognized punctuation character "{".%