Skip to content

Commit

Permalink
Merge pull request #134 from LandRegistry/govuk-frontend-54
Browse files Browse the repository at this point in the history
GOV.UK Frontend v5.4.0
  • Loading branch information
matthew-shaw authored May 31, 2024
2 parents c860fc0 + 2d3d011 commit 1fa4820
Show file tree
Hide file tree
Showing 8 changed files with 75 additions and 66 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GOV.UK Frontend Flask

![govuk-frontend 5.1.0](https://img.shields.io/badge/govuk--frontend%20version-5.1.0-005EA5?logo=gov.uk&style=flat)
![govuk-frontend 5.4.0](https://img.shields.io/badge/govuk--frontend%20version-5.4.0-005EA5?logo=gov.uk&style=flat)

**GOV.UK Frontend Flask is a [community tool](https://design-system.service.gov.uk/community/resources-and-tools/) of the [GOV.UK Design System](https://design-system.service.gov.uk/). The Design System team is not responsible for it and cannot support you with using it. Contact the [maintainers](#contributors) directly if you need [help](#support) or you want to request a feature.**

Expand Down
2 changes: 1 addition & 1 deletion app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def create_app(config_class=Config):
"script-src": [
"'self'",
"'sha256-GUQ5ad8JK5KmEWmROf3LZd9ge94daqNvd8xy9YS1iDw='",
"'sha256-EOlYC7YurunqHZxQoZ/zL5TKc/rPajg45h85KVyb5So='",
"'sha256-xvC5hOpINthj2xzP7qkRGmqR3SpU8ZVw1sEMKbsOS/4='",
],
}

Expand Down
6 changes: 3 additions & 3 deletions app/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<meta name="description" content="{{config['SERVICE_NAME']}}">
<meta name="keywords" content="GOV.UK, govuk, gov, government, uk, frontend, ui, user interface, jinja, python, flask, port, template, templating, macro, component, design system, html, forms, wtf, wtforms, widget, widgets, demo, example">
<meta name="author" content="{{config['DEPARTMENT_NAME']}}">
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='govuk-frontend-5.1.0.min.css') }}" />
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='govuk-frontend-5.4.0.min.css') }}" />
{% assets "css" %}<link href="{{ ASSET_URL }}" rel="stylesheet">{% endassets %}
{% endblock %}

Expand Down Expand Up @@ -161,9 +161,9 @@
{% endblock %}

{% block bodyEnd %}
<script type="module" src="{{ url_for('static', filename='govuk-frontend-5.1.0.min.js') }}"></script>
<script type="module" src="{{ url_for('static', filename='govuk-frontend-5.4.0.min.js') }}"></script>
<script type="module">
import { initAll } from "{{ url_for('static', filename='govuk-frontend-5.1.0.min.js') }}"
import { initAll } from "{{ url_for('static', filename='govuk-frontend-5.4.0.min.js') }}"
initAll()
</script>
{% assets "js" %}<script type="text/javascript" src="{{ ASSET_URL }}"></script>{% endassets %}
Expand Down
3 changes: 3 additions & 0 deletions app/templates/demos/component.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
{%- from 'govuk_frontend_jinja/components/notification-banner/macro.html' import govukNotificationBanner -%}
{%- from 'govuk_frontend_jinja/components/pagination/macro.html' import govukPagination -%}
{%- from 'govuk_frontend_jinja/components/panel/macro.html' import govukPanel -%}
{%- from 'govuk_frontend_jinja/components/password-input/macro.html' import govukPasswordInput -%}
{%- from 'govuk_frontend_jinja/components/phase-banner/macro.html' import govukPhaseBanner -%}
{%- from 'govuk_frontend_jinja/components/radios/macro.html' import govukRadios -%}
{%- from 'govuk_frontend_jinja/components/select/macro.html' import govukSelect -%}
Expand Down Expand Up @@ -124,6 +125,8 @@ <h2 id="{{fixture.name | replace(' ', '-')}}" class="govuk-heading-l">{{fixture.
{{ govukPagination(fixture.options)}}
{% elif component == 'panel' %}
{{ govukPanel(fixture.options)}}
{% elif component == 'password-input' %}
{{ govukPasswordInput(fixture.options)}}
{% elif component == 'phase-banner' %}
{{ govukPhaseBanner(fixture.options)}}
{% elif component == 'radios' %}
Expand Down
8 changes: 2 additions & 6 deletions app/templates/demos/create_account.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,9 @@ <h1 class="govuk-heading-xl">Create an account</h1>
'autocomplete': 'tel'
}) }}

{{ form.password(params={
'spellcheck': false
}) }}
{{ form.password }}

{{ form.confirm_password(params={
'spellcheck': false
}) }}
{{ form.confirm_password }}

{{ form.terms_and_conditions }}

Expand Down
6 changes: 3 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ rm -rf app/static/images
rm -rf app/static/govuk-frontend*

# Get new release distribution assets and move to static directory
curl -L https://github.com/alphagov/govuk-frontend/releases/download/v5.1.0/release-v5.1.0.zip > govuk_frontend.zip
curl -L https://github.com/alphagov/govuk-frontend/releases/download/v5.4.0/release-v5.4.0.zip > govuk_frontend.zip
unzip -o govuk_frontend.zip -d app/static
mv app/static/assets/* app/static

Expand All @@ -21,10 +21,10 @@ rm -rf govuk_frontend.zip
rm -rf govuk_components

# Get new release source code and move to a directory
curl -L https://github.com/alphagov/govuk-frontend/archive/refs/tags/v5.1.0.zip > govuk_frontend_source.zip
curl -L https://github.com/alphagov/govuk-frontend/archive/refs/tags/v5.4.0.zip > govuk_frontend_source.zip
unzip -o govuk_frontend_source.zip -d govuk_frontend_source
mkdir govuk_components
mv govuk_frontend_source/govuk-frontend-5.1.0/packages/govuk-frontend/src/govuk/components/** govuk_components
mv govuk_frontend_source/govuk-frontend-5.4.0/packages/govuk-frontend/src/govuk/components/** govuk_components

# Remove all files apart from test fixtures
find govuk_components -type f ! -name '*.yaml' -delete
Expand Down
42 changes: 22 additions & 20 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# pip-compile requirements.in
#
blinker==1.7.0
blinker==1.8.2
# via flask
brotli==1.1.0
# via flask-compress
Expand All @@ -16,11 +16,11 @@ deepmerge==1.1.1
# via govuk-frontend-wtf
deprecated==1.2.14
# via limits
dnspython==2.5.0
dnspython==2.6.1
# via email-validator
email-validator==2.1.0.post1
email-validator==2.1.1
# via -r requirements.in
flask==3.0.2
flask==3.0.3
# via
# -r requirements.in
# flask-assets
Expand All @@ -30,38 +30,38 @@ flask==3.0.2
# govuk-frontend-wtf
flask-assets==2.1.0
# via -r requirements.in
flask-compress==1.14
flask-compress==1.15
# via -r requirements.in
flask-limiter[redis]==3.5.1
flask-limiter[redis]==3.7.0
# via -r requirements.in
flask-talisman==1.1.0
# via -r requirements.in
flask-wtf==1.2.1
# via govuk-frontend-wtf
govuk-frontend-jinja==3.0.0
govuk-frontend-jinja==3.1.0
# via
# -r requirements.in
# govuk-frontend-wtf
govuk-frontend-wtf==3.0.0
govuk-frontend-wtf==3.1.0
# via -r requirements.in
gunicorn==21.2.0
gunicorn==22.0.0
# via -r requirements.in
idna==3.6
idna==3.7
# via email-validator
importlib-resources==6.1.1
importlib-resources==6.4.0
# via limits
itsdangerous==2.1.2
itsdangerous==2.2.0
# via
# flask
# flask-wtf
jinja2==3.1.3
jinja2==3.1.4
# via
# flask
# govuk-frontend-jinja
# govuk-frontend-wtf
jsmin==3.0.1
# via -r requirements.in
limits[redis]==3.7.0
limits[redis]==3.12.0
# via flask-limiter
markdown-it-py==3.0.0
# via rich
Expand All @@ -74,29 +74,31 @@ mdurl==0.1.2
# via markdown-it-py
ordered-set==4.1.0
# via flask-limiter
packaging==23.2
packaging==24.0
# via
# gunicorn
# limits
pygments==2.17.2
pygments==2.18.0
# via rich
pyyaml==6.0.1
# via -r requirements.in
redis==5.0.1
redis==5.0.4
# via limits
rich==13.7.0
rich==13.7.1
# via flask-limiter
typing-extensions==4.9.0
typing-extensions==4.12.0
# via
# flask-limiter
# limits
webassets==2.0
# via flask-assets
werkzeug==3.0.1
werkzeug==3.0.3
# via flask
wrapt==1.16.0
# via deprecated
wtforms==3.1.2
# via
# flask-wtf
# govuk-frontend-wtf
zstandard==0.22.0
# via flask-compress
72 changes: 40 additions & 32 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@
#
# pip-compile requirements_dev.in
#
annotated-types==0.7.0
# via pydantic
attrs==23.2.0
# via flake8-bugbear
authlib==1.3.0
# via safety
bandit==1.7.7
bandit==1.7.8
# via -r requirements_dev.in
black==24.2.0
black==24.4.2
# via -r requirements_dev.in
build==1.0.3
build==1.2.1
# via pip-tools
certifi==2024.2.2
# via requests
Expand All @@ -27,11 +29,9 @@ click==8.1.7
# pur
# safety
# typer
coverage[toml]==7.4.1
# via
# coverage
# pytest-cov
cryptography==42.0.2
coverage[toml]==7.5.3
# via pytest-cov
cryptography==42.0.7
# via authlib
dparse==0.6.4b0
# via
Expand All @@ -41,29 +41,29 @@ flake8==7.0.0
# via
# flake8-bugbear
# pep8-naming
flake8-bugbear==24.2.6
flake8-bugbear==24.4.26
# via -r requirements_dev.in
idna==3.6
idna==3.7
# via requests
iniconfig==2.0.0
# via pytest
isort==5.13.2
# via -r requirements_dev.in
jinja2==3.1.3
jinja2==3.1.4
# via safety
markdown-it-py==3.0.0
# via rich
markupsafe==2.1.5
# via jinja2
marshmallow==3.20.2
marshmallow==3.21.2
# via safety
mccabe==0.7.0
# via flake8
mdurl==0.1.2
# via markdown-it-py
mypy-extensions==1.0.0
# via black
packaging==23.2
packaging==24.0
# via
# black
# build
Expand All @@ -76,67 +76,75 @@ pathspec==0.12.1
# via black
pbr==6.0.0
# via stevedore
pep8-naming==0.13.3
pep8-naming==0.14.1
# via -r requirements_dev.in
pip-tools==7.3.0
pip-tools==7.4.1
# via -r requirements_dev.in
platformdirs==4.2.0
platformdirs==4.2.2
# via black
pluggy==1.4.0
pluggy==1.5.0
# via pytest
pur==7.3.1
# via -r requirements_dev.in
pycodestyle==2.11.1
# via flake8
pycparser==2.21
pycparser==2.22
# via cffi
pydantic==1.10.14
pydantic==2.7.2
# via
# safety
# safety-schemas
pydantic-core==2.18.3
# via pydantic
pyflakes==3.2.0
# via flake8
pygments==2.17.2
pygments==2.18.0
# via rich
pyproject-hooks==1.0.0
# via build
pytest==8.0.0
pyproject-hooks==1.1.0
# via
# build
# pip-tools
pytest==8.2.1
# via pytest-cov
pytest-cov==4.1.0
pytest-cov==5.0.0
# via -r requirements_dev.in
pyyaml==6.0.1
# via bandit
requests==2.31.0
requests==2.32.3
# via safety
rich==13.7.0
rich==13.7.1
# via
# bandit
# safety
# typer
ruamel-yaml==0.18.6
# via
# safety
# safety-schemas
ruamel-yaml-clib==0.2.8
# via ruamel-yaml
safety==3.0.1
safety==3.2.0
# via -r requirements_dev.in
safety-schemas==0.0.2
# via safety
stevedore==5.1.0
shellingham==1.5.4
# via typer
stevedore==5.2.0
# via bandit
typer==0.9.0
typer==0.12.3
# via safety
typing-extensions==4.9.0
typing-extensions==4.12.0
# via
# pydantic
# pydantic-core
# safety
# safety-schemas
# typer
urllib3==2.2.0
urllib3==2.2.1
# via
# requests
# safety
wheel==0.42.0
wheel==0.43.0
# via pip-tools

# The following packages are considered to be unsafe in a requirements file:
Expand Down

0 comments on commit 1fa4820

Please sign in to comment.