Skip to content

Commit

Permalink
Pull from new site, add new menu
Browse files Browse the repository at this point in the history
  • Loading branch information
symroe committed Dec 19, 2023
1 parent d321060 commit 6c5af91
Show file tree
Hide file tree
Showing 19 changed files with 979 additions and 1,249 deletions.
15 changes: 11 additions & 4 deletions lib/template_generator/generate_base_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

TEMPLATES = {
"base.html": {
"source_url": "https://www.electoralcommission.org.uk/i-am-a/voter/elections-your-area/elections-your-area-feedback"
"source_url": "https://www.electoralcommission.org.uk/voting-and-elections/who-can-vote"
},
"base_cy.html": {
"source_url": "https://www.electoralcommission.org.uk/cy/rwyf-yneg-pleidleisiwr/pleidleisiwr/gwybodaeth-etholiad/etholiadau-yn-eich-ardal-chi-adborth"
"source_url": "https://www.electoralcommission.org.uk/cy/pleidleisio-ac-etholiadau/pwy-syn-gallu-pleidleisio"
},
}

Expand Down Expand Up @@ -71,11 +71,18 @@ def _replace_content(el, content):


def remove_unwanted_content(soup: BeautifulSoup):
soup.select_one("#block-locationselector").replaceWith("")
location_selectors = soup.select("#block-locationselector")
if location_selectors:
for location_selector in location_selectors:
location_selector.replaceWith("")

_replace_content(
soup.main.select_one(".l-main-content").parent,
soup.main.select_one("#block-electoralcommission-mainpagecontent"),
"""
{% block content %}{% endblock content %}
{% block related_content %}
{% include "includes/related_content.html" %}
{% endblock related_content %}
""",
)

Expand Down
208 changes: 208 additions & 0 deletions postcode_lookup/static/css/all.01687d9399ef2a4d6ec0e67be77bacb7.css

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

208 changes: 207 additions & 1 deletion postcode_lookup/static/css/all.css

Large diffs are not rendered by default.

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion postcode_lookup/static/css/print.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 0 additions & 38 deletions postcode_lookup/static/css/screen.css

This file was deleted.

This file was deleted.

206 changes: 0 additions & 206 deletions postcode_lookup/static/js/scripts.4f1ae080871a325210756132eceaee95.js

This file was deleted.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

205 changes: 0 additions & 205 deletions postcode_lookup/static/js/scripts.a2556774bba5de29292bf1c3e6bbc9fe.js

This file was deleted.

212 changes: 11 additions & 201 deletions postcode_lookup/static/js/scripts.js

Large diffs are not rendered by default.

Loading

0 comments on commit 6c5af91

Please sign in to comment.