Skip to content

Commit

Permalink
Clean up formatting on voting system pages
Browse files Browse the repository at this point in the history
- Add page titles
- Fix breadcrumbs
- Separate sections with more spacing
  • Loading branch information
VirginiaDooley committed May 2, 2024
1 parent d9e26c3 commit 0589644
Show file tree
Hide file tree
Showing 9 changed files with 184 additions and 110 deletions.
8 changes: 7 additions & 1 deletion wcivf/apps/elections/templates/elections/ams.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@
{% load markdown_filter %}
{% load humanize %}
{% load i18n %}
{% block page_title %}The Additional Member System{% endblock page_title %}
{% block og_title_content %}The Additional Member System{% endblock og_title_content %}
{% block og_description_content %}
The Additional Member System{% endblock og_description_content %}
{% block twitter_title_content %}The Additional Member System{% endblock twitter_title_content %}
{% block twitter_description_content %}The Additional Member System{% endblock twitter_description_content %}

{% block content %}

{% include "elections/includes/_voting_system_breadcrumbs.html" %}
{% include "elections/includes/_voting_system_breadcrumbs.html" with voting_system="The Additional Member System" %}

<div class="ds-page">
<div class="ds-stack">
Expand Down
199 changes: 108 additions & 91 deletions wcivf/apps/elections/templates/elections/ams_cy.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
{% extends "base.html" %}{% load markdown_filter %}{% load humanize %}{% load i18n %}{% block content %} {% include "elections/includes/_voting_system_breadcrumbs.html" %}
{% extends "base.html" %}
{% load markdown_filter %}
{% load humanize %}
{% load i18n %}

{% block page_title %}Y System Aelodau Ychwanegol{% endblock page_title %}
{% block og_title_content %}Y System Aelodau Ychwanegol{% endblock og_title_content %}
{% block og_description_content %}Y System Aelodau Ychwanegol{% endblock og_description_content %}
{% block twitter_title_content %}Y System Aelodau Ychwanegol{% endblock twitter_title_content %}
{% block twitter_description_content %}Y System Aelodau Ychwanegol{% endblock twitter_description_content %}

{% block content %}
{% include "elections/includes/_voting_system_breadcrumbs.html" with voting_system="Y System Aelodau Ychwanegol" %}

<div class="ds-page">
<div class="ds-stack">
Expand All @@ -12,7 +24,8 @@ <h2>Y System Aelodau Ychwanegol</h2>

Er enghraifft, bydd pleidleisiwr yn Paisley yn yr Alban yn derbyn papur pleidleisio sy'n rhestru'r holl ymgeiswyr sydd am gynrychioli Paisley yn Senedd yr Alban. Byddan nhw hefyd yn cael papur pleidleisio sy'n rhestru'r pleidiau a/neu ymgeiswyr annibynnol sy'n sefyll am y saith sedd ar gyfer Gorllewin yr Alban. Mae'r ymgeiswyr ar y papur pleidleisio rhanbarthol yn cael eu rhestru yn y drefn y mae eu pleidiau gwleidyddol am iddyn nhw gael eu hethol, ac nid yw pleidleiswyr yn cael unrhyw ddewis dros y drefn hon (gelwir hyn yn 'restr gaeedig').
</p>

</div>
<div class="ds-padded">
<h3>Dyrannu seddau</h3>
<p>Bydd nifer cyffredinol y seddi etholaethol y mae plaid yn eu hennill yn cael effaith ar faint o gynrychiolwyr rhanbarthol a ddyrennir i’r blaid honno.
Bwriad hyn yw dod â nifer y seddi a enillir gan blaid yn nes at y ganran o’r bleidlais gyffredinol a dderbyniwyd ganddyn nhw yn y rhanbarth.
Expand All @@ -24,100 +37,104 @@ <h3>Dyrannu seddau</h3>
Dyrennir seddi ar ôl rowndiau cyfrif. Y pleidiau sydd â’r nifer uchaf o bleidleisiau ar ôl cymhwyso’r fformiwla uchod sy’n ennill y seddau rhanbarthol.
</p>
</p>
</div>
<div class="ds-padded">
<h3>Enghraifft o etholiad</h3>
<p>
Yn rhanbarth Gorllewin yr Alban 2016, roedd canlyniadau’r prif bleidiau oedd fel a ganlyn (gyda chyfanswm y cwota pleidleisio ar gyfer rowndiau dilynol mewn cromfachau):
</p>
<div class="ds-table ds-padded">
<table>
<caption>
<h2>
Rhanbarth Gorllewin yr Alban, etholiadau Senedd yr Alban 2016
</h2>
</caption>
<tbody>
<tr>
<th>Plaid</th>
<th>Seddi etholaethol a enillwyd (cyfanswm o 10)</th>
<th>Pleidleisiau a enillwyd</th>
<th>Cwota rownd gyntaf</th>
<th>Cwota'r ail rownd</th>
<th>Cwota'r drydedd rownd</th>
<th>Cwota'r bedwaredd rownd</th>
<th>Cwota'r bumed rownd</th>
<th>Cwota'r chweched rownd</th>
<th>Cwota'r seithfed rownd</th>
<th>Seddi Rhanbarthol a Enillwyd</th>
</tr>
<tr>
<td>SNP</td>
<td>8</td>
<td>135,827</td>
<td>15,091</td>
<td>Dim newid</td>
<td>Dim newid</td>
<td>Dim newid</td>
<td>Dim newid</td>
<td>Dim newid</td>
<td>Dim newid</td>
<td>0</td>
</tr>
<tr>
<td>Llafur</td>
<td>1</td>
<td>72,544</td>
<td>36,272 (etholwyd)</td>
<td>24,181</td>
<td>18,136</td>
<td>Dim newid (etholwyd)</td>
<td>Dim newid</td>
<td>Dim newid (etholwyd)</td>
<td>Dim newi</td>
<td>3</td>
</tr>
<tr>
<td>Ceidwadwyr</td>
<td>1</td>
<td>71,528</td>
<td>35,764</td>
<td>Dim newid (etholwyd)</td>
<td>23,842 (etholwyd)</td>
<td>17,882</td>
<td>Dim newid (etholwyd)</td>
<td>3,576</td>
<td>Dim newid</td>
<td>3</td>
</tr>
<tr>
<td>Y Blaid Werdd</td>
<td>0</td>
<td>17,218</td>
<td>Dim newid</td>
<td>Dim newid</td>
<td>Dim newid</td>
<td>Dim newid</td>
<td>Dim newid</td>
<td>Dim newid</td>
<td>Dim newid (etholwyd)</td>
<td>1</td>
</tr>
<tr>
<td>Dem. Rhydd.</td>
<td>0</td>
<td>12,097</td>
<td>Dim newid</td>
<td>Dim newid</td>
<td>Dim newid</td>
<td>Dim newid</td>
<td>Dim newid</td>
<td>Dim newid</td>
<td>Dim newid</td>
<td>0</td>
</tr>
</div>
<div class="ds-table ds-padded">
<table>
<caption>
<h2>
Rhanbarth Gorllewin yr Alban, etholiadau Senedd yr Alban 2016
</h2>
</caption>
<tbody>
<tr>
<th>Plaid</th>
<th>Seddi etholaethol a enillwyd (cyfanswm o 10)</th>
<th>Pleidleisiau a enillwyd</th>
<th>Cwota rownd gyntaf</th>
<th>Cwota'r ail rownd</th>
<th>Cwota'r drydedd rownd</th>
<th>Cwota'r bedwaredd rownd</th>
<th>Cwota'r bumed rownd</th>
<th>Cwota'r chweched rownd</th>
<th>Cwota'r seithfed rownd</th>
<th>Seddi Rhanbarthol a Enillwyd</th>
</tr>
<tr>
<td>SNP</td>
<td>8</td>
<td>135,827</td>
<td>15,091</td>
<td>Dim newid</td>
<td>Dim newid</td>
<td>Dim newid</td>
<td>Dim newid</td>
<td>Dim newid</td>
<td>Dim newid</td>
<td>0</td>
</tr>
<tr>
<td>Llafur</td>
<td>1</td>
<td>72,544</td>
<td>36,272 (etholwyd)</td>
<td>24,181</td>
<td>18,136</td>
<td>Dim newid (etholwyd)</td>
<td>Dim newid</td>
<td>Dim newid (etholwyd)</td>
<td>Dim newi</td>
<td>3</td>
</tr>
<tr>
<td>Ceidwadwyr</td>
<td>1</td>
<td>71,528</td>
<td>35,764</td>
<td>Dim newid (etholwyd)</td>
<td>23,842 (etholwyd)</td>
<td>17,882</td>
<td>Dim newid (etholwyd)</td>
<td>3,576</td>
<td>Dim newid</td>
<td>3</td>
</tr>
<tr>
<td>Y Blaid Werdd</td>
<td>0</td>
<td>17,218</td>
<td>Dim newid</td>
<td>Dim newid</td>
<td>Dim newid</td>
<td>Dim newid</td>
<td>Dim newid</td>
<td>Dim newid</td>
<td>Dim newid (etholwyd)</td>
<td>1</td>
</tr>
<tr>
<td>Dem. Rhydd.</td>
<td>0</td>
<td>12,097</td>
<td>Dim newid</td>
<td>Dim newid</td>
<td>Dim newid</td>
<td>Dim newid</td>
<td>Dim newid</td>
<td>Dim newid</td>
<td>Dim newid</td>
<td>0</td>
</tr>

</tbody>
</table>
</div>
</tbody>
</table>
</div>
<div class="ds-padded">
<p>
Er mai'r SNP enillodd y nifer fwyaf o bleidleisiau, gan eu bod wedi ennill wyth allan o'r deg sedd etholaethol, roedd eu cwota o 15,092, yn is na bron pob un o'r pleidiau eraill.
O ganlyniad, ni chawson nhw unrhyw seddi rhanbarthol.
Expand Down
8 changes: 7 additions & 1 deletion wcivf/apps/elections/templates/elections/fptp.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@
{% load humanize %}
{% load i18n %}

{% block page_title %}First-past-the-post (FPTP){% endblock page_title %}
{% block og_title_content %}YFirst-past-the-post (FPTP){% endblock og_title_content %}
{% block og_description_content %}YFirst-past-the-post (FPTP){% endblock og_description_content %}
{% block twitter_title_content %}YFirst-past-the-post (FPTP){% endblock twitter_title_content %}
{% block twitter_description_content %}YFirst-past-the-post (FPTP){% endblock twitter_description_content %}

{% block content %}

{% include "elections/includes/_voting_system_breadcrumbs.html" %}
{% include "elections/includes/_voting_system_breadcrumbs.html" with voting_system="First-past-the-post (FPTP)"%}

<div class="ds-page">
<div class="ds-stack">
Expand Down
14 changes: 13 additions & 1 deletion wcivf/apps/elections/templates/elections/fptp_cy.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
{% extends "base.html" %}{% load markdown_filter %}{% load humanize %}{% load i18n %}{% block content %} {% include "elections/includes/_voting_system_breadcrumbs.html" %}
{% extends "base.html" %}
{% load markdown_filter %}
{% load humanize %}
{% load i18n %}

{% block page_title %}Cyntaf i'r felin (FPTP){% endblock page_title %}
{% block og_title_content %}Cyntaf i'r felin (FPTP){% endblock og_title_content %}
{% block og_description_content %}Cyntaf i'r felin (FPTP){% endblock og_description_content %}
{% block twitter_title_content %}Cyntaf i'r felin (FPTP){% endblock twitter_title_content %}
{% block twitter_description_content %}Cyntaf i'r felin (FPTP){% endblock twitter_description_content %}

{% block content %}
{% include "elections/includes/_voting_system_breadcrumbs.html" with voting_system="Cyntaf i'r felin (FPTP)"%}

<div class="ds-page">
<div class="ds-stack">
Expand Down
7 changes: 7 additions & 0 deletions wcivf/apps/elections/templates/elections/stv.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
{% load humanize %}
{% load i18n %}

{% block page_title %}Single Transferable Vote (STV){% endblock page_title %}
{% block og_title_content %}Single Transferable Vote (STV){% endblock og_title_content %}
{% block og_description_content %}Single Transferable Vote (STV){% endblock og_description_content %}
{% block twitter_title_content %}Single Transferable Vote (STV){% endblock twitter_title_content %}
{% block twitter_description_content %}Single Transferable Vote (STV){% endblock twitter_description_content %}


{% block content %}
{% include "elections/includes/_voting_system_breadcrumbs.html" %}

Expand Down
8 changes: 7 additions & 1 deletion wcivf/apps/elections/templates/elections/stv_cy.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@
{% load humanize %}
{% load i18n %}

{% block page_title %}Pleidlais Sengl Drosglwyddadwy (PSD){% endblock page_title %}
{% block og_title_content %}Pleidlais Sengl Drosglwyddadwy (PSD){% endblock og_title_content %}
{% block og_description_content %}Pleidlais Sengl Drosglwyddadwy (PSD){% endblock og_description_content %}
{% block twitter_title_content %}Pleidlais Sengl Drosglwyddadwy (PSD){% endblock twitter_title_content %}
{% block twitter_description_content %}Pleidlais Sengl Drosglwyddadwy (PSD){% endblock twitter_description_content %}

{% block content %}
{% include "elections/includes/_voting_system_breadcrumbs.html" %}
{% include "elections/includes/_voting_system_breadcrumbs.html" with voting_system="Pleidlais Sengl Drosglwyddadwy (PSD)"%}

<div class="ds-page">
<div class="ds-stack">
Expand Down
8 changes: 7 additions & 1 deletion wcivf/apps/elections/templates/elections/sv.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@
{% load humanize %}
{% load i18n %}

{% block page_title %}Supplementary Vote{% endblock page_title %}
{% block og_title_content %}Supplementary Vote{% endblock og_title_content %}
{% block og_description_content %}Supplementary Vote{% endblock og_description_content %}
{% block twitter_title_content %}Supplementary Vote{% endblock twitter_title_content %}
{% block twitter_description_content %}Supplementary Vote{% endblock twitter_description_content %}

{% block content %}

{% include "elections/includes/_voting_system_breadcrumbs.html" %}
{% include "elections/includes/_voting_system_breadcrumbs.html" with voting_system="Supplementary Vote" %}

<div class="ds-page">
<div class="ds-stack">
Expand Down
15 changes: 14 additions & 1 deletion wcivf/apps/elections/templates/elections/sv_cy.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
{% extends "base.html" %}{% load markdown_filter %}{% load humanize %}{% load i18n %}{% block content %} {% include "elections/includes/_voting_system_breadcrumbs.html" %}
{% extends "base.html" %}
{% load markdown_filter %}
{% load humanize %}
{% load i18n %}

{% block page_title %}Pleidlais Atodol{% endblock page_title %}
{% block og_title_content %}Pleidlais Atodol{% endblock og_title_content %}
{% block og_description_content %}Pleidlais Atodol{% endblock og_description_content %}
{% block twitter_title_content %}Pleidlais Atodol{% endblock twitter_title_content %}
{% block twitter_description_content %}Pleidlais Atodol{% endblock twitter_description_content %}


{% block content %}
{% include "elections/includes/_voting_system_breadcrumbs.html" with voting_system="Pleidlais Atodol" %}

<div class="ds-page">
<div class="ds-stack">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,19 @@
<td>
{% if person_post.votes_cast %}
{{ person_post.get_results_rank }}
{% elif person_post.election.voting_system == "SV"|"STV" %}
{% blocktrans trimmed with voting_system=person_post.election.voting_system %}
We do not collect voting data for {{voting_system}} elections
{% endblocktrans %}
{% else %}
{% trans "Position not available" %}
{% endif %}
</td>
</tr>
{% endfor %}
</table>
<small>Please note our local elections database only goes back to 2016.</small>
{% if person_post.election.voting_system == "sv" %}
{% trans "We do not collect voting data for Supplementary Vote elections." %}
{% if person_post.election.voting_system == "stv" %}
{% trans "We do not collect voting data for Single Transferable Vote election" %}
{% else %}
{% trans "Position not available" %}
{% endif %}
</td>
</tr>
{% endfor %}
</table>
<small>Please note our local elections database only goes back to 2016.</small>

</div>
{% endif %}
</div>
{% endif %}

0 comments on commit 0589644

Please sign in to comment.