Skip to content

Commit

Permalink
Merge pull request #369 from dinukadesilva/letter-template-styling
Browse files Browse the repository at this point in the history
Update the all island report styles
  • Loading branch information
dinukadesilva authored Nov 15, 2019
2 parents 1c48459 + 7ccfe09 commit 72231b1
Show file tree
Hide file tree
Showing 2 changed files with 192 additions and 85 deletions.
245 changes: 176 additions & 69 deletions templates/PRE_ALL_ISLAND_RESULTS.html
Original file line number Diff line number Diff line change
@@ -1,130 +1,237 @@
{% extends 'base.html' %}

{% block container %}
<style>
.table td, .table th {
padding: 3px;
font-size: 15px;
color: black;
font-weight: 400;
border-color: black;
}

.table th {
font-weight: 800;
}

table.table.table-borderless.signatures {
margin-bottom: 15px;
}


.pre-all-island {
padding-left: 50px;
padding-right: 50px;
}
</style>
<div class="pre-all-island">
<table class="table table-borderless">
<table style="border: none;width: 100%">
<tbody>
<tr>
<td style="width:15%; font-size:12px; font-weight:bold;">OFFICIAL RESULTS</td>
<td style="text-align:center; vertical-align:middle; width:70%;" rowspan="2" class="report-header">
<span style="font-size:12px;">DEPARTMENT OF ELECTIONS</span>
<span style="font-weight:bold;">
<span style="font-size: 11px;font-weight: 600;">DEPARTMENT OF ELECTIONS</span>
<span style="/* font-weight:bold; */font-weight: 700;font-weight: 600;font-size: 23px;">
{{content.election.electionName}}
</span>
<span style="font-weight:bold;">ALL ISLAND RESULT</span>
<span style="font-size:12px;">VOTES RECEIVED BY EACH CANDIDATE</span>
<span style="font-weight:bold;font-size: 15px;">ALL ISLAND RESULT</span>
<span style="font-size:12px;font-weight: 900;">VOTES RECEIVED BY EACH CANDIDATE</span>
</td>
<td style="text-align:right; width:15%; font-size:12px; font-weight:bold;" rowspan="2"></td>
</tr>
<tr>
<td style="width:15%; text-align:center;" class="no-padding-bottom no-padding-top">
<img src="data:image/png;base64, {{content.logo}}" width="72" height="75"/>
<img src="data:image/png;base64, {{content.logo}}" class="gov-logo" height="75px"/>
</td>
</tr>
</tbody>
</table>


<table class="table table-borderless">
<table class="table table-sm">
<tbody>
<tr>
<td><u><i>Name of the Candidate</i></u></td>
<td style="text-align:center;"><u><i>Party Abbreviation</i></u></td>
<td style="text-align:center;"><u><i>Votes Recieved</i></u></td>
<td style="text-align:center;"><u><i>Percentage</i></u></td>
<th scope="col">#</th>
<th scope="col">Name of the Candidate</th>
<th scope="col">Party Abbreviation</th>
<th scope="col" style="text-align:right;">Votes Recieved</th>
<th scope="col" style="text-align:right;">Percentage</th>
</tr>

{% for row in content.data %}
<tr>
<td class="all {%if row[0]=="" %}missing-value{% endif %}">{{row[0]}}</td>
<td class="all" style="text-align:center;">{{row[1]}}</td>
<td class="all {%if row[2]=="" %}missing-value{% endif %}" style="text-align:right;"><b>{{row[2]}}</b></td>
<td class="all {%if row[3]=="" %}missing-value{% endif %}" style="text-align:right;">{{row[3]}}</td>
<td>{{loop.index}}</td>
<td class="{%if row[0]=='' %}missing-value{% endif %}">{{row[0]}}</td>
<td class="{%if row[0]=='' %}missing-value{% endif %}">{{row[1]}}</td>
<td class="{%if row[0]=='' %}missing-value{% endif %}" style="text-align:right;">{{row[2]}}</td>
<td class="{%if row[0]=='' %}missing-value{% endif %}" style="text-align:right;">{{row[3]}}</td>
</tr>
{% endfor %}
<!-- </tbody>-->
<!-- </table>-->

<!-- <table class="table table-sm" style="margin-top: 15px">-->
<!-- <tbody>-->

<tr>
<td colspan="4"></td>
<td colspan="5" style="height: 40px;"></td>
</tr>

<tr>
<td></td>
<td></td>
<td><b>Total Valid Votes</b></td>
<td class="{%if content.validVoteCounts[0]=="" %}missing-value{% endif %}" style="text-align:right;"><b>{{content.validVoteCounts[0]}}</b></td>
<td class="{%if content.validVoteCounts[1]=="" %}missing-value{% endif %}" style="text-align:right;">{{content.validVoteCounts[1]}}</td>
<td class="{%if content.validVoteCounts[0]=='' %}missing-value{% endif %}" style="text-align:right;">
<b>{{content.validVoteCounts[0]}}</b>
</td>
<td class="{%if content.validVoteCounts[1]=='' %}missing-value{% endif %}" style="text-align:right;">
{{content.validVoteCounts[1]}}
</td>
</tr>
<tr>
<td></td>
<td></td>
<td><b>Rejected Votes</b></td>
<td class="{%if content.rejectedVoteCounts[0]=="" %}missing-value{% endif %}" style="text-align:right;"><b>{{content.rejectedVoteCounts[0]}}</b></td>
<td class="{%if content.rejectedVoteCounts[1]=="" %}missing-value{% endif %}" style="text-align:right;">{{content.rejectedVoteCounts[1]}}</td>
<td class="{%if content.rejectedVoteCounts[0]=='' %}missing-value{% endif %}" style="text-align:right;">
<b>{{content.rejectedVoteCounts[0]}}</b>
</td>
<td class="{%if content.rejectedVoteCounts[1]=='' %}missing-value{% endif %}" style="text-align:right;">
{{content.rejectedVoteCounts[1]}}
</td>
</tr>
<tr>
<td></td>
<td></td>
<td><b>Total Polled</b></td>
<td class="{%if content.totalVoteCounts[0]=="" %}missing-value{% endif %}" style="text-align:right;"><b>{{content.totalVoteCounts[0]}}</b></td>
<td class="{%if content.totalVoteCounts[1]=="" %}missing-value{% endif %}" style="text-align:right;">{{content.totalVoteCounts[1]}}</td>
<td class="{%if content.totalVoteCounts[0]=='' %}missing-value{% endif %}" style="text-align:right;">
<b>{{content.totalVoteCounts[0]}}</b>
</td>
<td class="{%if content.totalVoteCounts[1]=='' %}missing-value{% endif %}" style="text-align:right;">
{{content.totalVoteCounts[1]}}
</td>
</tr>
<tr>
<td></td>
<td></td>
<td><b>Registered No. of Electors</b></td>
<td style="text-align:right"><b>{{content.registeredVoters[0]}}</b></td>
<td style="text-align:right"></td>
</tr>
<tr>
<td colspan="4"></td>
</tr>
<tr>
<td></td>
<td><b>Time: {{content.time}}</b></td>
<td colspan="2" style="text-align:center;"></td>
<td></td>
<td><b>Time</b></td>
<td colspan="2" style="text-align:center;">{{content.time}}</td>
</tr>
<tr>
<td></td>
<td><b>Date: {{content.date}}</b></td>
<td colspan="2" style="text-align:center;"></td>
<td></td>
<td><b>Date</b></td>
<td colspan="2" style="text-align:center;">{{content.date}}</td>
</tr>
</tbody>
</table>

<tr>
<td colspan="4" rowspan="4"></td>
</tr>
<tr></tr>
<tr></tr>
<tr></tr>

<!-- <table class="table table-borderless">-->
<!-- <tbody>-->
<!-- <tr>-->
<!-- <td><u><i>Name of the Candidate</i></u></td>-->
<!-- <td style="text-align:center;"><u><i>Party Abbreviation</i></u></td>-->
<!-- <td style="text-align:center;"><u><i>Votes Recieved</i></u></td>-->
<!-- <td style="text-align:center;"><u><i>Percentage</i></u></td>-->
<!-- </tr>-->

</tbody>
</table>
<table class="table table-borderless signatures">
<tr style="text-align:center;">
<td>
....................................</br>
MAHINDA DESHAPRIYA</br>
Chairman</br>
Election Commission
</td>
<td>
....................................</br>
N. J. ABEYESEKERE</br>
Member</br>
Election Commission
</td>
<td>
....................................</br>
S. RATNAJEEVAN H. HOOLE</br>
Member</br>
Election Commission
</td>
</tr>
</table>
<table class="table table-borderless signatures">
<tr>
<td style="vertical-align:middle; font-size: 11px; font-weight: bold;">
Election Secretariat, Sarana Mawatha, Rajagiriya.
</td>
<td></td>
</tr>
<!-- {% for row in content.data %}-->
<!-- <tr>-->
<!-- <td class="all {%if row[0]=="-->
<!-- " %}missing-value{% endif %}">{{row[0]}}</td>-->
<!-- <td class="all" style="text-align:center;">{{row[1]}}</td>-->
<!-- <td class="all {%if row[2]=="-->
<!-- " %}missing-value{% endif %}" style="text-align:right;"><b>{{row[2]}}</b></td>-->
<!-- <td class="all {%if row[3]=="-->
<!-- " %}missing-value{% endif %}" style="text-align:right;">{{row[3]}}</td>-->
<!-- </tr>-->
<!-- {% endfor %}-->

<!-- <tr>-->
<!-- <td colspan="4"></td>-->
<!-- </tr>-->

<!-- <tr>-->
<!-- <td></td>-->
<!-- <td><b>Total Valid Votes</b></td>-->
<!-- <td class="{%if content.validVoteCounts[0]=="-->
<!-- " %}missing-value{% endif %}" style="text-align:right;"><b>{{content.validVoteCounts[0]}}</b></td>-->
<!-- <td class="{%if content.validVoteCounts[1]=="-->
<!-- " %}missing-value{% endif %}" style="text-align:right;">{{content.validVoteCounts[1]}}</td>-->
<!-- </tr>-->
<!-- <tr>-->
<!-- <td></td>-->
<!-- <td><b>Rejected Votes</b></td>-->
<!-- <td class="{%if content.rejectedVoteCounts[0]=="-->
<!-- " %}missing-value{% endif %}" style="text-align:right;"><b>{{content.rejectedVoteCounts[0]}}</b></td>-->
<!-- <td class="{%if content.rejectedVoteCounts[1]=="-->
<!-- " %}missing-value{% endif %}" style="text-align:right;">{{content.rejectedVoteCounts[1]}}</td>-->
<!-- </tr>-->
<!-- <tr>-->
<!-- <td></td>-->
<!-- <td><b>Total Polled</b></td>-->
<!-- <td class="{%if content.totalVoteCounts[0]=="-->
<!-- " %}missing-value{% endif %}" style="text-align:right;"><b>{{content.totalVoteCounts[0]}}</b></td>-->
<!-- <td class="{%if content.totalVoteCounts[1]=="-->
<!-- " %}missing-value{% endif %}" style="text-align:right;">{{content.totalVoteCounts[1]}}</td>-->
<!-- </tr>-->
<!-- <tr>-->
<!-- <td></td>-->
<!-- <td><b>Registered No. of Electors</b></td>-->
<!-- <td style="text-align:right"><b>{{content.registeredVoters[0]}}</b></td>-->
<!-- <td style="text-align:right"></td>-->
<!-- </tr>-->
<!-- <tr>-->
<!-- <td colspan="4"></td>-->
<!-- </tr>-->
<!-- <tr>-->
<!-- <td></td>-->
<!-- <td><b>Time: {{content.time}}</b></td>-->
<!-- <td colspan="2" style="text-align:center;"></td>-->
<!-- </tr>-->
<!-- <tr>-->
<!-- <td></td>-->
<!-- <td><b>Date: {{content.date}}</b></td>-->
<!-- <td colspan="2" style="text-align:center;"></td>-->
<!-- </tr>-->

<!-- <tr>-->
<!-- <td colspan="4" rowspan="4"></td>-->
<!-- </tr>-->
<!-- <tr></tr>-->
<!-- <tr></tr>-->
<!-- <tr></tr>-->


<!-- </tbody>-->
<!-- </table>-->
<table class="table table-borderless signatures" style="margin-top: 30px;margin-bottom: 20px;">
<tr style="text-align:center;">
<td>
....................................</br>
MAHINDA DESHAPRIYA</br>
Chairman</br>
Election Commission
</td>
<td>
....................................</br>
N. J. ABEYESEKERE</br>
Member</br>
Election Commission
</td>
<td>
....................................</br>
S. RATNAJEEVAN H. HOOLE</br>
Member</br>
Election Commission
</td>
</tr>
</table>
<strong>Election Secretariat, Sarana Mawatha, Rajagiriya.</strong>

</div>
{% endblock %}
32 changes: 16 additions & 16 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -221,34 +221,34 @@
/* PRE-30-ed*/
.pre-30-ed .ed th {
text-align: center;
height:222px;
height: 222px;

}

.pre-30-ed .ed th div {
-moz-transform: rotate(-90.0deg); /* FF3.5+ */
-o-transform: rotate(-90.0deg); /* Opera 10.5 */
-webkit-transform: rotate(-90.0deg); /* Saf3.1+, Chrome */
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0.083); /* IE6,IE7 */
-moz-transform: rotate(-90.0deg); /* FF3.5+ */
-o-transform: rotate(-90.0deg); /* Opera 10.5 */
-webkit-transform: rotate(-90.0deg); /* Saf3.1+, Chrome */
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0.083); /* IE6,IE7 */
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0.083)"; /* IE8 */
margin-top:124px;
margin-top: 124px;
white-space: nowrap;
}

/* PRE-all-ed*/
.pre-all-ed .ed th {
text-align: center;
height:194px;
height: 194px;

}

.pre-all-ed .ed th div {
-moz-transform: rotate(-90.0deg); /* FF3.5+ */
-o-transform: rotate(-90.0deg); /* Opera 10.5 */
-webkit-transform: rotate(-90.0deg); /* Saf3.1+, Chrome */
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0.083); /* IE6,IE7 */
-moz-transform: rotate(-90.0deg); /* FF3.5+ */
-o-transform: rotate(-90.0deg); /* Opera 10.5 */
-webkit-transform: rotate(-90.0deg); /* Saf3.1+, Chrome */
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0.083); /* IE6,IE7 */
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0.083)"; /* IE8 */
margin-top:124px;
margin-top: 124px;
white-space: nowrap;
}

Expand All @@ -257,9 +257,9 @@
<body>

{% if not isProdEnv %}
<div class="watermark">
Test Only
</div>
<div class="watermark">
Test Only
</div>
{% endif %}

<div class="printer-only printer-only-footer">
Expand Down Expand Up @@ -287,7 +287,7 @@
</script>
</div>

<table>
<table style="width: 100%; border: none;">
<thead>
<tr>
<td>
Expand Down

0 comments on commit 72231b1

Please sign in to comment.