From 33e8577b8af79521b2ec32d2af9c38cc53385010 Mon Sep 17 00:00:00 2001 From: igloosi Date: Wed, 26 Sep 2018 14:10:25 +0100 Subject: [PATCH 1/3] Update GOV.UK Frontend dependency to 2.1.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index de8c7b45d4..7cae793bae 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "express-session": "^1.13.0", "express-writer": "0.0.4", "govuk-elements-sass": "^3.1.3", - "govuk-frontend": "^2.0.0", + "govuk-frontend": "^2.1.0", "govuk_frontend_toolkit": "^7.5.0", "govuk_template_jinja": "^0.24.1", "gulp": "^3.9.1", From 193c6898354fca4fbc4e1f29260df469cbbc33b3 Mon Sep 17 00:00:00 2001 From: igloosi Date: Wed, 26 Sep 2018 14:20:53 +0100 Subject: [PATCH 2/3] Use header macro instead of HTML We have done the work to allow attributes to be added to navigation items, which means we can now use the macro instead of plain HTML --- docs/views/layout.html | 70 ++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 43 deletions(-) diff --git a/docs/views/layout.html b/docs/views/layout.html index 8d43b0630a..8fb806011f 100644 --- a/docs/views/layout.html +++ b/docs/views/layout.html @@ -40,49 +40,33 @@ {% block header %} {% include "includes/cookie-banner.html" %} {# Set serviceName in config.js. #} -{# TODO: Use the macro when data attributes can be passed to individual items: #} -{# https://github.com/alphagov/govuk-frontend/issues/904 #} - + {{ govukHeader({ + serviceName: serviceName, + serviceUrl: "/", + navigation: [ + { + href: "/docs/install", + text: "Install", + attributes: { + "data-install": "Install" + } + }, + { + href: "/docs/tutorials-and-examples", + text: "Tutorials and examples", + attributes: { + "data-tutorials": "Tutorials and examples" + } + }, + { + href: "docs/about", + text: "About", + attributes: { + "data-about": "About" + } + } + ] + }) }} {% endblock %} {% block footer %} From c293f48daaf012e758e66931a16e9575c78dca40 Mon Sep 17 00:00:00 2001 From: igloosi Date: Wed, 26 Sep 2018 14:24:23 +0100 Subject: [PATCH 3/3] Document in CHANGELOG --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0336547782..89166e35d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# Unreleased + +New features: + +- [#600 Update GOV.UK Frontend to v2.1.0](https://github.com/alphagov/govuk-prototype-kit/pull/600) + # 8.0.0 Breaking changes: