From d68399e4b2c33abb6e8bec61c708696712e9d709 Mon Sep 17 00:00:00 2001 From: Colin Rotherham Date: Tue, 3 May 2022 13:30:08 +0100 Subject: [PATCH] Move `cookieBanner` block to `bodyStart` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follows the guidance to position “before the ’skip to main content‘ link” https://design-system.service.gov.uk/components/cookie-banner/#how-it-works --- components/hmpo-template.njk | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/components/hmpo-template.njk b/components/hmpo-template.njk index b2be061..9bc30b3 100644 --- a/components/hmpo-template.njk +++ b/components/hmpo-template.njk @@ -14,6 +14,15 @@ {{ (translate("govuk.error", { default: "Error" }) + ": ") if errorlist.length }}{{ hmpoTitle | safe }} {{ "– " + govukServiceName | safe if govukServiceName }} – GOV.UK {% endblock %} +{% block bodyStart %} + {% block cookieBanner %} + {% from "hmpo-cookie-banner/macro.njk" import hmpoCookieBanner %} + {{ hmpoCookieBanner({ + html: translate("govuk.cookieBanner") + }) }} + {% endblock %} +{% endblock %} + {% from "govuk/components/skip-link/macro.njk" import govukSkipLink %} {% block skipLink %} {{ govukSkipLink({ @@ -23,12 +32,6 @@ {% endblock %} {% block header %} - {% block cookieBanner %} - {% from "hmpo-cookie-banner/macro.njk" import hmpoCookieBanner %} - {{ hmpoCookieBanner({ - html: translate("govuk.cookieBanner") - }) }} - {% endblock %} {% block govukHeader %} {{ govukHeader({ assetsPath: assetPath + '/images',