Add styles and Jinja for component

Most of these are cut-and-paste'd from the GOVUK
metadata component:

https://components.publishing.service.gov.uk/component-guide/metadata

...but stripped back to only include what we need
and a optional suffix paragraph added.

Links to styles and ERB template
https://github.com/alphagov/govuk_publishing_components/blob/master/app/assets/stylesheets/govuk_publishing_components/components/_metadata.scss
https://github.com/alphagov/govuk_publishing_components/blob/master/app/views/govuk_publishing_components/components/_metadata.html.erb

Also adds it to the accessibility statement as an
example and updates the test that checks any
updates bump the date.
This commit is contained in:
Tom Byers
2022-01-05 11:53:09 +00:00
parent 342fd35136
commit 4f10272b00
5 changed files with 67 additions and 6 deletions

View File

@@ -15,10 +15,9 @@ def test_last_review_date():
raw_diff = statement_diff.stdout.decode('utf-8')
today = datetime.now().strftime('%d %B %Y')
with open(statement_file_path, 'r') as statement_file:
current_review_date = re.search((r'This statement was prepared on 23 September 2020\. '
r'It was last reviewed on (\d{1,2} [A-Z]{1}[a-z]+ \d{4})'),
current_review_date = re.search((r'"Last updated": "(\d{1,2} [A-Z]{1}[a-z]+ \d{4})"'),
statement_file.read()).group(1)
# guard against changes that don't need to update the review date
if current_review_date != today:
assert 'This statement was prepared on 23 September 2020. It was last reviewed on' in raw_diff
assert '"Last updated": "' in raw_diff