Skip to content

Commit 3e9c839

Browse files
Merge pull request #776 from sm1990/gh-775
Gh 775-Fix alignment issues in reports and letters
2 parents 3f7be0f + 1a2f229 commit 3e9c839

15 files changed

+297
-54
lines changed

results-tabulation-api/templates/PE-CE-RO-V1.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
@media print {
1010
@page {
11-
size: 1050mm 742.5mm;
11+
size: 1100mm 777.8mm;
1212
}
1313
.print-heading {
1414
font-size: 25px;
@@ -60,7 +60,7 @@
6060

6161
<table class="table table-borderless" style="table-layout:fixed;">
6262
<tr style="text-align:center;">
63-
<td rowspan="2" class="right" style="border-right: 1px solid #000 !important; width:20px;"></td>
63+
<td rowspan="2" class="right" style="border-right: 1px solid #000 !important; width:40px;"></td>
6464
<th class="left right top bottom no-padding-top no-padding-bottom no-padding-left print-party-width" rowspan="2" style="vertical-align: middle;">
6565
Political Party/ Independent Group
6666
</th>

results-tabulation-api/templates/PE-CE-RO-V2.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747

4848
<table class="table table-borderless" style="table-layout:fixed;">
4949
<tr style="text-align:center;">
50-
<td rowspan="2" class="right" style="border-right: 1px solid #000 !important; width:20px;"></td>
50+
<td rowspan="2" class="right" style="border-right: 1px solid #000 !important; width:40px;"></td>
5151
<th class="left right top bottom no-padding-top no-padding-bottom no-padding-left print-party-width" rowspan="2" style="vertical-align: middle;">
5252
Political Party/ Independent Group
5353
</th>

results-tabulation-api/templates/ParliamentaryElection2020/AI-LETTER.html

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,41 @@
2525
font-weight: 800;
2626
}
2727

28+
.group div {
29+
display: table-cell;
30+
vertical-align: middle;
31+
text-align: center;
32+
}
33+
34+
.group div span {
35+
text-align: center;
36+
}
37+
2838
</style>
2939

3040
<div style="padding-left: 50px;padding-right: 50px;">
31-
<table style="border: none;width: 100%;">
41+
42+
<div class="group" style="width:100% !important; text-align:center;">
43+
<div style="width:20% !important;">
44+
<img src="data:image/png;base64, {{ content.logo }}" width="65px"
45+
style="display: inline-block"/><br/>
46+
<span style="font-size:12px; font-weight:bold;">OFFICIAL RESULTS</span>
47+
</div>
48+
<div style="width:80% !important; text-align:center;">
49+
<span style="font-size: 11px;font-weight: 600;">DEPARTMENT OF ELECTIONS</span><br/>
50+
<span style="font-weight: 700;font-weight: 600;font-size: 23px;">
51+
{{ content.election.electionName }}
52+
</span><br/>
53+
<span style="font-weight:bold;font-size: 17px;">Votes Received by Party</span><br/>
54+
<span style="font-size:14px;font-weight: 500;">
55+
<strong>All Island </strong> - Sri Lanka
56+
</span>
57+
</div>
58+
<div style="width:20% !important; text-align:center;">&nbsp;</div>
59+
</div>
60+
61+
62+
<!-- <table style="border: 1px solid #000;width: 100%;">
3263
<tbody>
3364
<tr>
3465
<td style="width:15%; text-align:center;" class="no-padding-bottom no-padding-top">
@@ -49,7 +80,7 @@
4980
<td style="text-align:right; width:15%; font-size:12px; font-weight:bold;"></td>
5081
</tr>
5182
</tbody>
52-
</table>
83+
</table> -->
5384

5485
<div style="width: 100%; padding-bottom: 50px;"></div>
5586

results-tabulation-api/templates/ParliamentaryElection2020/PE-AI-1-LETTER.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@
5353

5454
<div style="width: 100%; padding-bottom: 50px;"></div>
5555

56-
<table class="table table-sm">
56+
<table class="table table-sm" style="width:100%;">
5757
<tbody>
5858
<tr>
5959
<th scope="col">#</th>
60-
<th scope="col">Name of the Party</th>
60+
<th scope="col" style="width:40%;">Name of the Party</th>
6161
<th scope="col">Party Abbreviation</th>
6262
<th scope="col" style="text-align:right;">Votes Received</th>
6363
<th scope="col" style="text-align:right;">Percentage</th>

results-tabulation-api/templates/ParliamentaryElection2020/PE-AI-1.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@
5353

5454
<div style="width: 100%; padding-bottom: 50px;"></div>
5555

56-
<table class="table table-sm">
56+
<table class="table table-sm" style="width:100%;">
5757
<tbody>
5858
<tr>
5959
<th scope="col">#</th>
60-
<th scope="col">Name of the Party</th>
60+
<th scope="col" style="width:40%;">Name of the Party</th>
6161
<th scope="col">Party Abbreviation</th>
6262
<th scope="col" style="text-align:right;">Votes Received</th>
6363
<th scope="col" style="text-align:right;">Percentage</th>

results-tabulation-api/templates/ParliamentaryElection2020/PE-AI-2-LETTER.html

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,38 @@
2525
font-weight: 800;
2626
}
2727

28+
.group div {
29+
display: table-cell;
30+
vertical-align: middle;
31+
text-align: center;
32+
}
33+
34+
.group div span {
35+
text-align: center;
36+
}
37+
2838
</style>
2939

3040
<div style="padding-left: 50px;padding-right: 50px;">
31-
<table style="border: none;width: 100%;">
41+
<div class="group" style="width:100% !important; text-align:center;">
42+
<div style="width:20% !important;">
43+
<img src="data:image/png;base64, {{ content.logo }}" width="65px"
44+
style="display: inline-block"/><br/>
45+
<span style="font-size:12px; font-weight:bold;">OFFICIAL RESULTS</span>
46+
</div>
47+
<div style="width:80% !important; text-align:center;">
48+
<span style="font-size: 11px;font-weight: 600;">DEPARTMENT OF ELECTIONS</span><br/>
49+
<span style="font-weight: 700;font-weight: 600;font-size: 23px;">
50+
{{ content.election.electionName }}
51+
</span><br/>
52+
<span style="font-weight:bold;font-size: 17px;">Elected Parliament Members</span><br/>
53+
<span style="font-size:14px;font-weight: 500;">
54+
<strong>All Island</strong>
55+
</span>
56+
</div>
57+
<div style="width:20% !important; text-align:center;">&nbsp;</div>
58+
</div>
59+
<!-- <table style="border: none;width: 100%;">
3260
<tbody>
3361
<tr>
3462
<td style="width:15%; text-align:center;" class="no-padding-bottom no-padding-top">
@@ -49,19 +77,19 @@
4977
<td style="text-align:right; width:15%; font-size:12px; font-weight:bold;"></td>
5078
</tr>
5179
</tbody>
52-
</table>
80+
</table> -->
5381

5482
<div style="width: 100%; padding-bottom: 50px;"></div>
5583

56-
<table class="table table-sm">
84+
<table class="table table-sm" style="width:100%;">
5785
<tbody>
5886
<tr>
59-
<th scope="col">#</th>
60-
<th scope="col">Name of the Party</th>
61-
<th scope="col">Party Abbreviation</th>
62-
<th scope="col" style="text-align:center;">Elected From</th>
63-
<th scope="col" style="text-align:right;">Candidate Number</th>
64-
<th scope="col" style="text-align:right;">Candidate Name</th>
87+
<th scope="col">#</th>
88+
<th scope="col" style="width:40%;">Name of the Party</th>
89+
<th scope="col">Party Abbreviation</th>
90+
<th scope="col" style="text-align:center;">Elected From</th>
91+
<th scope="col" style="text-align:right;">Candidate Number</th>
92+
<th scope="col" style="text-align:right;width:40%;">Candidate Name</th>
6593
</tr>
6694
{% for row in content.data %}
6795
<tr>

results-tabulation-api/templates/ParliamentaryElection2020/PE-AI-2.html

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,39 @@
2525
font-weight: 800;
2626
}
2727

28+
.group div {
29+
display: table-cell;
30+
vertical-align: middle;
31+
text-align: center;
32+
}
33+
34+
.group div span {
35+
text-align: center;
36+
}
37+
2838
</style>
2939

3040
<div style="padding-left: 50px;padding-right: 50px;">
31-
<table style="border: none;width: 100%;">
41+
<div class="group" style="width:100% !important; text-align:center;">
42+
<div style="width:20% !important;">
43+
<img src="data:image/png;base64, {{ content.logo }}" width="65px"
44+
style="display: inline-block"/><br/>
45+
<span style="font-size:12px; font-weight:bold;">OFFICIAL RESULTS</span>
46+
</div>
47+
<div style="width:80% !important; text-align:center;">
48+
<span style="font-size: 11px;font-weight: 600;">DEPARTMENT OF ELECTIONS</span><br/>
49+
<span style="font-weight: 700;font-weight: 600;font-size: 23px;">
50+
{{ content.election.electionName }}
51+
</span><br/>
52+
<span style="font-weight:bold;font-size: 17px;">Elected Parliament Members</span><br/>
53+
<span style="font-size:14px;font-weight: 500;">
54+
<strong>All Island</strong>
55+
</span>
56+
</div>
57+
<div style="width:20% !important; text-align:center;">&nbsp;</div>
58+
</div>
59+
60+
<!-- <table style="border: none;width: 100%;">
3261
<tbody>
3362
<tr>
3463
<td style="width:15%; text-align:center;" class="no-padding-bottom no-padding-top">
@@ -49,19 +78,19 @@
4978
<td style="text-align:right; width:15%; font-size:12px; font-weight:bold;"></td>
5079
</tr>
5180
</tbody>
52-
</table>
81+
</table> -->
5382

5483
<div style="width: 100%; padding-bottom: 50px;"></div>
5584

56-
<table class="table table-sm">
85+
<table class="table table-sm" style="width:100%;">
5786
<tbody>
5887
<tr>
5988
<th scope="col">#</th>
60-
<th scope="col">Name of the Party</th>
89+
<th scope="col" style="width:40%;">Name of the Party</th>
6190
<th scope="col">Party Abbreviation</th>
6291
<th scope="col" style="text-align:center;">Elected From</th>
6392
<th scope="col" style="text-align:right;">Candidate Number</th>
64-
<th scope="col" style="text-align:right;">Candidate Name</th>
93+
<th scope="col" style="text-align:right;width:40%;">Candidate Name</th>
6594
</tr>
6695
{% for row in content.data %}
6796
<tr>

results-tabulation-api/templates/ParliamentaryElection2020/PE-AI-NL-1-LETTER.html

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,40 @@
2525
font-weight: 800;
2626
}
2727

28+
.group div {
29+
display: table-cell;
30+
vertical-align: middle;
31+
text-align: center;
32+
}
33+
34+
.group div span {
35+
text-align: center;
36+
}
37+
2838
</style>
2939

3040
<div style="padding-left: 50px;padding-right: 50px;">
31-
<table style="border: none;width: 100%;">
41+
42+
<div class="group" style="width:100% !important; text-align:center;">
43+
<div style="width:20% !important;">
44+
<img src="data:image/png;base64, {{ content.logo }}" width="65px"
45+
style="display: inline-block"/><br/>
46+
<span style="font-size:12px; font-weight:bold;">OFFICIAL RESULTS</span>
47+
</div>
48+
<div style="width:80% !important; text-align:center;">
49+
<span style="font-size: 11px;font-weight: 600;">DEPARTMENT OF ELECTIONS</span><br/>
50+
<span style="font-weight: 700;font-weight: 600;font-size: 23px;">
51+
{{ content.election.electionName }}
52+
</span><br/>
53+
<span style="font-weight:bold;font-size: 17px;">National List Seats by Party</span><br/>
54+
<span style="font-size:14px;font-weight: 500;">
55+
<strong>All Island</strong>
56+
</span>
57+
</div>
58+
<div style="width:20% !important; text-align:center;">&nbsp;</div>
59+
</div>
60+
61+
<!-- <table style="border: none;width: 100%;">
3262
<tbody>
3363
<tr>
3464
<td style="width:15%; text-align:center;" class="no-padding-bottom no-padding-top">
@@ -49,15 +79,15 @@
4979
<td style="text-align:right; width:15%; font-size:12px; font-weight:bold;"></td>
5080
</tr>
5181
</tbody>
52-
</table>
82+
</table> -->
5383

5484
<div style="width: 100%; padding-bottom: 50px;"></div>
5585

56-
<table class="table table-sm">
86+
<table class="table table-sm" style="width: 100%;">
5787
<tbody>
5888
<tr>
5989
<th scope="col">#</th>
60-
<th scope="col">Name of the Party</th>
90+
<th scope="col" style="width:40%;">Name of the Party</th>
6191
<th scope="col">Party Abbreviation</th>
6292
<th scope="col" style="text-align:right;">Votes Received</th>
6393
<th scope="col" style="text-align:right;">Votes Percentage</th>

results-tabulation-api/templates/ParliamentaryElection2020/PE-AI-NL-1.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@
5353

5454
<div style="width: 100%; padding-bottom: 50px;"></div>
5555

56-
<table class="table table-sm">
56+
<table class="table table-sm" style="width: 100%;">
5757
<tbody>
5858
<tr>
5959
<th scope="col">#</th>
60-
<th scope="col">Name of the Party</th>
60+
<th scope="col" style="width:40%;">Name of the Party</th>
6161
<th scope="col">Party Abbreviation</th>
6262
<th scope="col" style="text-align:right;">Votes Received</th>
6363
<th scope="col" style="text-align:right;">Votes Percentage</th>

results-tabulation-api/templates/ParliamentaryElection2020/PE-AI-NL-2-LETTER.html

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,39 @@
2525
font-weight: 800;
2626
}
2727

28+
.group div {
29+
display: table-cell;
30+
vertical-align: middle;
31+
text-align: center;
32+
}
33+
34+
.group div span {
35+
text-align: center;
36+
}
37+
2838
</style>
2939

3040
<div style="padding-left: 50px;padding-right: 50px;">
31-
<table style="border: none;width: 100%;">
41+
<div class="group" style="width:100% !important; text-align:center;">
42+
<div style="width:20% !important;">
43+
<img src="data:image/png;base64, {{ content.logo }}" width="65px"
44+
style="display: inline-block"/><br/>
45+
<span style="font-size:12px; font-weight:bold;">OFFICIAL RESULTS</span>
46+
</div>
47+
<div style="width:80% !important; text-align:center;">
48+
<span style="font-size: 11px;font-weight: 600;">DEPARTMENT OF ELECTIONS</span><br/>
49+
<span style="font-weight: 700;font-weight: 600;font-size: 23px;">
50+
{{ content.election.electionName }}
51+
</span><br/>
52+
<span style="font-weight:bold;font-size: 17px;">National List</span><br/>
53+
<span style="font-size:14px;font-weight: 500;">
54+
<strong>All Island</strong>
55+
</span>
56+
</div>
57+
<div style="width:20% !important; text-align:center;">&nbsp;</div>
58+
</div>
59+
60+
<!-- <table style="border: none;width: 100%;">
3261
<tbody>
3362
<tr>
3463
<td style="width:15%; text-align:center;" class="no-padding-bottom no-padding-top">
@@ -49,18 +78,18 @@
4978
<td style="text-align:right; width:15%; font-size:12px; font-weight:bold;"></td>
5079
</tr>
5180
</tbody>
52-
</table>
81+
</table> -->
5382

5483
<div style="width: 100%; padding-bottom: 50px;"></div>
5584

56-
<table class="table table-sm">
85+
<table class="table table-sm" style="width:100%;">
5786
<tbody>
5887
<tr>
5988
<th scope="col">#</th>
60-
<th scope="col">Name of the Party</th>
89+
<th scope="col" style="width:40%;">Name of the Party</th>
6190
<th scope="col">Party Abbreviation</th>
6291
<th scope="col" style="text-align:left;">Candidate Number</th>
63-
<th scope="col" style="text-align:left;">Candidate Name</th>
92+
<th scope="col" style="text-align:left;width:40%;">Candidate Name</th>
6493
</tr>
6594
{% for row in content.data %}
6695
<tr>

results-tabulation-api/templates/ParliamentaryElection2020/PE-AI-NL-2.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@
5353

5454
<div style="width: 100%; padding-bottom: 50px;"></div>
5555

56-
<table class="table table-sm">
56+
<table class="table table-sm" style="width:100%;">
5757
<tbody>
5858
<tr>
59-
<th scope="col">#</th>
60-
<th scope="col">Name of the Party</th>
61-
<th scope="col">Party Abbreviation</th>
62-
<th scope="col" style="text-align:left;">Candidate Number</th>
63-
<th scope="col" style="text-align:left;">Candidate Name</th>
59+
<th scope="col">#</th>
60+
<th scope="col" style="width:40%;">Name of the Party</th>
61+
<th scope="col">Party Abbreviation</th>
62+
<th scope="col" style="text-align:left;">Candidate Number</th>
63+
<th scope="col" style="text-align:left;width:40%;">Candidate Name</th>
6464
</tr>
6565
{% for row in content.data %}
6666
<tr>

0 commit comments

Comments
 (0)