Template:Infobox election: Difference between revisions

From Chalo Chatu, Zambia online encyclopedia
Jump to navigationJump to search
No edit summary
No edit summary
Line 1: Line 1:
<includeonly>
<includeonly>
{| class="infobox vevent" style="width:22em; line-height:1.5em;"
{| class="infobox vevent" style="width: 280px; font-size: 90%; line-height: 1.4em; background: #f9f9f9;"
|+ {{#if:{{{election_name|}}}|{{{election_name}}}}}
|+ style="font-weight:bold; font-size:110%; text-align:center;" | {{{election_name|Election}}}
 
<!-- Meta -->
{{#if:{{{type|}}}|
|-
|-
! style="text-align:center;" | {{ucfirst:{{{type}}}}} election
! Type
}}
| {{{type|General}}} election
{{#if:{{{election_date|}}}|
|-
|-
| style="text-align:center;" | {{{election_date}}}
! Date
}}
| {{{election_date|}}}
{{#if:{{{country|}}}|
|-
|-
! Country
! Country
| {{{country}}}
| {{{country|Zambia}}}
}}
{{#if:{{{turnout|}}}|
|-
|-
! Turnout
{{#if:{{{turnout|}}}|! Turnout
| {{{turnout}}}
| {{{turnout}}}
}}
|-}}
{{#if:{{{registered|}}}|
{{#if:{{{registered|}}}|! Registered voters
|-
! Registered voters
| {{{registered}}}
| {{{registered}}}
}}
|-}}
{{#if:{{{previous_year|}}{{{previous_election|}}}|
{{#if:{{{previous_link|}}}|! Previous
|-
| [[{{{previous_link}}}|{{{previous_year}}}]]
! Previous
|-}}
| {{#if:{{{previous_election|}}}|[[{{{previous_election}}}|{{{previous_year|}}}]]|{{{previous_year|}}}}}
{{#if:{{{next_link|}}}|! Next
}}
| [[{{{next_link}}}|{{{next_year}}}]]
{{#if:{{{next_year|}}{{{next_election|}}}|
|-}}
|-
! Next
| {{#if:{{{next_election|}}}|[[{{{next_election}}}|{{{next_year|}}}]]|{{{next_year|}}}}}
}}


<!-- Candidates block header -->
! colspan="2" style="text-align:center; background:#ddd;" | Candidates
{{#if:{{{nominee1|}}{{{nominee2|}}{{{nominee3|}}{{{nominee4|}}}}}}|
|-
! colspan="2" style="text-align:center; background:#eee;" | Presidential election
}}


<!-- Candidate 1 -->
{{#if:{{{image1|}}}|
|-
| colspan="2" style="text-align:center;" | {{{image1}}}
}}
{{#if:{{{nominee1|}}}|
{{#if:{{{nominee1|}}}|
|-
|-
! Nominee
! Nominee 1
| {{{nominee1}}}
| {{{nominee1}}}<br/>{{{party1}}}<br/>Votes: {{{popular_vote1}}} ({{{percentage1}}}%)
}}
{{#if:{{{running_mate1|}}}|
|-
! Running mate
| {{{running_mate1}}}
}}
{{#if:{{{party1|}}}|
|-
! Party
| {{{party1}}}
}}
{{#if:{{{popular_vote1|}}}{{{percentage1|}}}|
|-
! Votes
| {{#if:{{{popular_vote1|}}}|{{{popular_vote1}}}}}{{#if:{{{percentage1|}}}| ({{{percentage1}}})}}
}}
}}


<!-- Candidate 2 -->
{{#if:{{{image2|}}}|
|-
| colspan="2" style="text-align:center;" | {{{image2}}}
}}
{{#if:{{{nominee2|}}}|
{{#if:{{{nominee2|}}}|
|-
|-
! Nominee
! Nominee 2
| {{{nominee2}}}
| {{{nominee2}}}<br/>{{{party2}}}<br/>Votes: {{{popular_vote2}}} ({{{percentage2}}}%)
}}
{{#if:{{{running_mate2|}}}|
|-
! Running mate
| {{{running_mate2}}}
}}
{{#if:{{{party2|}}}|
|-
! Party
| {{{party2}}}
}}
{{#if:{{{popular_vote2|}}}{{{percentage2|}}}|
|-
! Votes
| {{#if:{{{popular_vote2|}}}|{{{popular_vote2}}}}}{{#if:{{{percentage2|}}}| ({{{percentage2}}})}}
}}
}}


<!-- Candidate 3 -->
{{#if:{{{image3|}}}|
|-
| colspan="2" style="text-align:center;" | {{{image3}}}
}}
{{#if:{{{nominee3|}}}|
{{#if:{{{nominee3|}}}|
|-
|-
! Nominee
! Nominee 3
| {{{nominee3}}}
| {{{nominee3}}}<br/>{{{party3}}}<br/>Votes: {{{popular_vote3}}} ({{{percentage3}}}%)
}}
{{#if:{{{running_mate3|}}}|
|-
! Running mate
| {{{running_mate3}}}
}}
{{#if:{{{party3|}}}|
|-
! Party
| {{{party3}}}
}}
{{#if:{{{popular_vote3|}}}{{{percentage3|}}}|
|-
! Votes
| {{#if:{{{popular_vote3|}}}|{{{popular_vote3}}}}}{{#if:{{{percentage3|}}}| ({{{percentage3}}})}}
}}
 
<!-- Candidate 4 -->
{{#if:{{{image4|}}}|
|-
| colspan="2" style="text-align:center;" | {{{image4}}}
}}
{{#if:{{{nominee4|}}}|
|-
! Nominee
| {{{nominee4}}}
}}
{{#if:{{{running_mate4|}}}|
|-
! Running mate
| {{{running_mate4}}}
}}
{{#if:{{{party4|}}}|
|-
! Party
| {{{party4}}}
}}
{{#if:{{{popular_vote4|}}}{{{percentage4|}}}|
|-
! Votes
| {{#if:{{{popular_vote4|}}}|{{{popular_vote4}}}}}{{#if:{{{percentage4|}}}| ({{{percentage4}}})}}
}}
 
<!-- Map (pass full wikitext or leave blank) -->
{{#if:{{{map|}}}|
|-
| colspan="2" style="text-align:center;" | {{{map}}}
}}
{{#if:{{{map_caption|}}}|
|-
| colspan="2" style="text-align:center; font-size:90%;" | {{{map_caption}}}
}}
}}


<!-- Officeholders -->
{{#if:{{{map_image|}}}|
{{#if:{{{title|}}}|
|-
|-
! colspan="2" style="text-align:center; background:#eee;" | {{{title}}}
! colspan="2" | Map
}}
{{#if:{{{before_election|}}}|
|-
! Before election
| {{{before_election}}}{{#if:{{{before_party|}}}|<br /><span style="font-size:90%;">{{{before_party}}}</span>|}}
}}
{{#if:{{{after_election|}}}{{{ongoing|}}}|
|-
|-
! {{#if:{{{ongoing|}}}|Elected {{#if:{{{posttitle|}}}|{{{posttitle}}}|{{{title|}}}}}|After election}}
| colspan="2" style="text-align:center;" | [[File:{{{map_image}}}|250px]]
| {{#if:{{{after_election|}}}|{{{after_election}}}|TBD}}{{#if:{{{after_party|}}}|<br /><span style="font-size:90%;">{{{after_party}}}</span>|}}
}}
}}


Line 177: Line 55:
</includeonly>
</includeonly>
<noinclude>
<noinclude>
Simple, no-Lua election infobox for Chalo Chatu.
{{documentation}}
Images and maps must be passed as full wikitext (e.g., [[File:Name.png|130x130px]]).
</noinclude>
</noinclude>

Revision as of 10:50, 19 September 2025


<templatestyles src="Module:Documentation/styles.css"></templatestyles>