Skip to content

Commit

Permalink
Initial attempt at new menu design
Browse files Browse the repository at this point in the history
  • Loading branch information
symroe committed Dec 19, 2023
1 parent 4732714 commit d321060
Show file tree
Hide file tree
Showing 19 changed files with 2,164 additions and 1,822 deletions.
25 changes: 13 additions & 12 deletions lib/template_generator/generate_base_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,19 @@ def remove_unwanted_content(soup: BeautifulSoup):
)

_replace_content(
soup.select_one(".c-translate-block__items"),
soup.select_one(".c-language-switcher"),
"{% block language_picker %}{% endblock language_picker %}",
)
_replace_content(
soup.select_one(
"#block-electoralcommission-views-block-related-content-taxonomy-related-2"
),
"""
{% block related_content %}
{% include "includes/related_content.html" %}
{% endblock related_content %}
""",
)
# _replace_content(
# soup.select_one(
# "#block-electoralcommission-views-block-related-content-taxonomy-related-2"
# ),
# """
# {% block related_content %}
# {% include "includes/related_content.html" %}
# {% endblock related_content %}
# """,
# )

return soup

Expand Down Expand Up @@ -254,7 +254,8 @@ def add_head_meta_blocks(soup: BeautifulSoup):

for template, config in TEMPLATES.items():
template_path = project_path / "templates" / template
req = httpx.get(config["source_url"])
req = httpx.get(config["source_url"], timeout=300)
req.raise_for_status()
html_text = req.text
# The Welsh version of the site has a broken HTML tag that breaks Soup.
# Delete this before soup parsed it
Expand Down

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

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

This file was deleted.

7 changes: 1 addition & 6 deletions postcode_lookup/static/css/all.css

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

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

4 changes: 2 additions & 2 deletions postcode_lookup/static/css/print.css

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

Loading

0 comments on commit d321060

Please sign in to comment.