Skip to content
This repository has been archived by the owner on Feb 14, 2023. It is now read-only.

Commit

Permalink
Merge pull request #11 from LandRegistry/govuk-frontend-420
Browse files Browse the repository at this point in the history
GOV.UK Frontend v4.2.0
  • Loading branch information
matthew-shaw authored Jul 22, 2022
2 parents 9e7c750 + 47e176f commit 9295d96
Show file tree
Hide file tree
Showing 10 changed files with 56 additions and 33 deletions.
8 changes: 7 additions & 1 deletion CHANGEOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased](https://github.com/LandRegistry/govuk-frontend-jinja-demo/compare/2.2.0...main)
## [Unreleased](https://github.com/LandRegistry/govuk-frontend-jinja-demo/compare/2.3.0...main)

## [2.3.0](https://github.com/LandRegistry/govuk-frontend-jinja-demo/releases/tag/2.3.0) - 22/07/2022

### Added

- [GOV.UK Frontend v4.2.0](https://github.com/alphagov/govuk-frontend/releases/tag/v4.2.0) support

## [2.2.0](https://github.com/LandRegistry/govuk-frontend-jinja-demo/releases/tag/2.2.0) - 18/05/2022

Expand Down
14 changes: 7 additions & 7 deletions app/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<meta name="description" content="GOV.UK Frontend Jinja Demo">
<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, demo, example">
<meta name="author" content="HM Land Registry">
<!--[if gt IE 8]><!--><link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='govuk-frontend-4.1.0.min.css') }}" /><!--<![endif]-->
<!--[if IE 8]><link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='govuk-frontend-ie8-4.1.0.min.css') }}" /><![endif]-->
<!--[if gt IE 8]><!--><link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='govuk-frontend-4.2.0.min.css') }}" /><!--<![endif]-->
<!--[if IE 8]><link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='govuk-frontend-ie8-4.2.0.min.css') }}" /><![endif]-->
{% endblock %}

{% block header %}
Expand All @@ -28,12 +28,12 @@
'columns': 1,
'items': [
{
'href': 'https://github.com/alphagov/govuk-frontend/releases/tag/v4.1.0',
'text': 'GOV.UK Frontend v4.1.0'
'href': 'https://github.com/alphagov/govuk-frontend/releases/tag/v4.2.0',
'text': 'GOV.UK Frontend v4.2.0'
},
{
'href': 'https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/2.2.0',
'text': 'GOV.UK Frontend Jinja v2.2.0'
'href': 'https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/2.3.0',
'text': 'GOV.UK Frontend Jinja v2.3.0'
}
]
},
Expand Down Expand Up @@ -68,7 +68,7 @@

{% block bodyEnd %}
<!--[if gt IE 8]><!-->
<script src="{{ url_for('static', filename='govuk-frontend-4.1.0.min.js') }}"> </script>
<script src="{{ url_for('static', filename='govuk-frontend-4.2.0.min.js') }}"> </script>
<script>window.GOVUKFrontend.initAll()</script>
<!--<![endif]-->
{% endblock %}
3 changes: 3 additions & 0 deletions app/templates/component.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
{%- from 'govuk_frontend_jinja/components/inset-text/macro.html' import govukInsetText -%}
{%- from 'govuk_frontend_jinja/components/label/macro.html' import govukLabel -%}
{%- 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/phase-banner/macro.html' import govukPhaseBanner -%}
{%- from 'govuk_frontend_jinja/components/radios/macro.html' import govukRadios -%}
Expand Down Expand Up @@ -102,6 +103,8 @@ <h2 id="{{fixture.name | replace(' ', '-')}}" class="govuk-heading-l">{{fixture.
{{ govukLabel(fixture.options)}}
{% elif fixtures.component == 'notification-banner' %}
{{ govukNotificationBanner(fixture.options)}}
{% elif fixtures.component == 'pagination' %}
{{ govukPagination(fixture.options)}}
{% elif fixtures.component == 'panel' %}
{{ govukPanel(fixture.options)}}
{% elif fixtures.component == 'phase-banner' %}
Expand Down
2 changes: 1 addition & 1 deletion app/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<h1 class="govuk-heading-xl">GOV.UK Frontend Jinja</h1>
<p class="govuk-body-l">This is a simple <a href="https://www.python.org/" class="govuk-link">Python</a> application using the <a href="https://flask.palletsprojects.com/en/1.1.x/" class="govuk-link">Flask</a> framework that demonstrates the <a href="https://jinja.palletsprojects.com/en/2.11.x/" class="govuk-link">Jinja</a> port of <a href="https://frontend.design-system.service.gov.uk/" class="govuk-link">GOV.UK Frontend</a>.</p>
<p class="govuk-body"><a href="https://github.com/LandRegistry/govuk-frontend-jinja" class="govuk-link">GOV.UK Frontend Jinja</a> provides a complete set of reusable component Jinja macros, directly ported from the GOV.UK Frontend Nunjucks macros.</p>
<p class="govuk-body">An automated test suite makes use of the GOV.UK Frontend <a href="https://frontend.design-system.service.gov.uk/testing-your-html/#test-if-your-html-matches-gov-uk-frontend" class="govuk-link">test fixtures</a> to ensure 100% compliant HTML is output. This currently covers a total of 526 test scenarios against every component, which you can see in the <a href="https://github.com/LandRegistry/govuk-frontend-jinja/actions" class="govuk-link">build status</a>.</p>
<p class="govuk-body">An automated test suite makes use of the GOV.UK Frontend <a href="https://frontend.design-system.service.gov.uk/testing-your-html/#test-if-your-html-matches-gov-uk-frontend" class="govuk-link">test fixtures</a> to ensure 100% compliant HTML is output. This currently covers a total of 564 test scenarios against every component, which you can see in the <a href="https://github.com/LandRegistry/govuk-frontend-jinja/actions" class="govuk-link">build status</a>.</p>
<p class="govuk-body">Every visual test fixture is rendered in the pages linked below, along with the Jinja macro options and HTML used to create them. These can be used as examples, or for visual regression testing.</p>
{{ govukInsetText({'html': 'If you also need to generate forms in your Python project, check out <a href="https://govuk-frontend-wtforms.herokuapp.com/" class="govuk-link">GOV.UK Frontend WTForms</a> which makes use of these Jinja macros.'} )}}

Expand Down
6 changes: 3 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
curl -L https://github.com/alphagov/govuk-frontend/releases/download/v4.1.0/release-v4.1.0.zip > govuk_frontend.zip
curl -L https://github.com/alphagov/govuk-frontend/releases/download/v4.2.0/release-v4.2.0.zip > govuk_frontend.zip
rm -rf app/static
unzip -o govuk_frontend.zip -d app/static
mv app/static/assets/* app/static
rm -rf app/static/assets
rm -rf govuk_frontend.zip

curl -L https://github.com/alphagov/govuk-frontend/archive/v4.1.0.zip > govuk_frontend_source.zip
curl -L https://github.com/alphagov/govuk-frontend/archive/v4.2.0.zip > govuk_frontend_source.zip
unzip -o govuk_frontend_source.zip -d govuk_frontend_source
rm -rf govuk_components
mkdir govuk_components
mv govuk_frontend_source/govuk-frontend-4.1.0/package/govuk/components/** govuk_components
mv govuk_frontend_source/govuk-frontend-4.2.0/package/govuk/components/** govuk_components
find govuk_components -type f ! -name 'fixtures.json' -delete
rm -rf govuk_frontend_source
rm -rf govuk_frontend_source.zip
4 changes: 2 additions & 2 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
flask-compress==1.12
flask-talisman==1.0.0
flask==2.1.2
govuk-frontend-jinja==2.2.0
flask==2.1.3
govuk-frontend-jinja==2.3.0
gunicorn==20.1.0
python-dotenv==0.20.0
10 changes: 7 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with python 3.10
# This file is autogenerated by pip-compile with python 3.9
# To update, run:
#
# pip-compile requirements.in
Expand All @@ -8,18 +8,20 @@ brotli==1.0.9
# via flask-compress
click==8.1.3
# via flask
flask==2.1.2
flask==2.1.3
# via
# -r requirements.in
# flask-compress
flask-compress==1.12
# via -r requirements.in
flask-talisman==1.0.0
# via -r requirements.in
govuk-frontend-jinja==2.2.0
govuk-frontend-jinja==2.3.0
# via -r requirements.in
gunicorn==20.1.0
# via -r requirements.in
importlib-metadata==4.12.0
# via flask
itsdangerous==2.1.2
# via flask
jinja2==3.1.2
Expand All @@ -32,6 +34,8 @@ python-dotenv==0.20.0
# via -r requirements.in
werkzeug==2.1.2
# via flask
zipp==3.8.1
# via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
# setuptools
8 changes: 4 additions & 4 deletions requirements_dev.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
bandit==1.7.4
black==22.3.0
flake8-bugbear==22.4.25
black==22.6.0
flake8-bugbear==22.7.1
hacking==4.1.0
isort==5.10.1
pep8-naming<0.12.0
pip-tools==6.6.1
pip-tools==6.8.0
piprot==0.9.11
safety==1.10.3
safety==2.1.1
32 changes: 21 additions & 11 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with python 3.10
# This file is autogenerated by pip-compile with python 3.9
# To update, run:
#
# pip-compile requirements_dev.in
Expand All @@ -8,11 +8,13 @@ attrs==21.4.0
# via flake8-bugbear
bandit==1.7.4
# via -r requirements_dev.in
black==22.3.0
black==22.6.0
# via -r requirements_dev.in
certifi==2022.5.18
build==0.8.0
# via pip-tools
certifi==2022.6.15
# via requests
charset-normalizer==2.0.12
charset-normalizer==2.1.0
# via requests
click==8.1.3
# via
Expand All @@ -26,7 +28,7 @@ flake8==3.8.4
# flake8-bugbear
# flake8-polyfill
# hacking
flake8-bugbear==22.4.25
flake8-bugbear==22.7.1
# via -r requirements_dev.in
flake8-polyfill==1.0.2
# via pep8-naming
Expand All @@ -46,17 +48,18 @@ mypy-extensions==0.4.3
# via black
packaging==21.3
# via
# build
# dparse
# safety
pathspec==0.9.0
# via black
pbr==5.9.0
# via stevedore
pep517==0.12.0
# via pip-tools
# via build
pep8-naming==0.11.1
# via -r requirements_dev.in
pip-tools==6.6.1
pip-tools==6.8.0
# via -r requirements_dev.in
piprot==0.9.11
# via -r requirements_dev.in
Expand All @@ -72,28 +75,35 @@ pyyaml==6.0
# via
# bandit
# dparse
requests==2.27.1
requests==2.28.1
# via
# piprot
# requests-futures
# safety
requests-futures==1.0.0
# via piprot
safety==1.10.3
ruamel-yaml==0.17.21
# via safety
ruamel-yaml-clib==0.2.6
# via ruamel-yaml
safety==2.1.1
# via -r requirements_dev.in
six==1.16.0
# via piprot
smmap==5.0.0
# via gitdb
stevedore==3.5.0
stevedore==4.0.0
# via bandit
toml==0.10.2
# via dparse
tomli==2.0.1
# via
# black
# build
# pep517
urllib3==1.26.9
typing-extensions==4.3.0
# via black
urllib3==1.26.10
# via requests
wheel==0.37.1
# via pip-tools
Expand Down
2 changes: 1 addition & 1 deletion runtime.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python-3.10.4
python-3.10.5

0 comments on commit 9295d96

Please sign in to comment.