From 1414cd24de7b7c9c65fd7285dc0bfa83f3a09831 Mon Sep 17 00:00:00 2001 From: Colin Rotherham Date: Thu, 20 Jul 2023 07:36:03 +0100 Subject: [PATCH 1/3] Use GOV.UK Frontend ES modules snippet in Nunjucks previews --- src/styles/page-template/custom/code.njk | 6 +++++- src/styles/page-template/default/code.njk | 7 +++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/styles/page-template/custom/code.njk b/src/styles/page-template/custom/code.njk index 22975b38c1..a0b27187f6 100644 --- a/src/styles/page-template/custom/code.njk +++ b/src/styles/page-template/custom/code.njk @@ -147,5 +147,9 @@ ignoreInSitemap: true {% endblock %} {% block bodyEnd %} - + + {% endblock %} diff --git a/src/styles/page-template/default/code.njk b/src/styles/page-template/default/code.njk index 76095337eb..2ce7fe282f 100644 --- a/src/styles/page-template/default/code.njk +++ b/src/styles/page-template/default/code.njk @@ -15,6 +15,9 @@ ignoreInSitemap: true {% block bodyEnd %} {# Run JavaScript at end of the , to avoid blocking the initial render. #} - - + + {% endblock %} From e3b41029fca0454b334eb3c08fcfa00688172a48 Mon Sep 17 00:00:00 2001 From: Colin Rotherham Date: Thu, 20 Jul 2023 07:35:44 +0100 Subject: [PATCH 2/3] Update website to use ` - + + {%- endblock %} diff --git a/src/styles/page-template/custom/index.njk b/src/styles/page-template/custom/index.njk index d1540c91c9..a09d28010c 100644 --- a/src/styles/page-template/custom/index.njk +++ b/src/styles/page-template/custom/index.njk @@ -149,6 +149,6 @@ ignoreInSitemap: true {% endblock %} {% block bodyEnd %} - - + + {% endblock %} diff --git a/src/styles/page-template/default/index.njk b/src/styles/page-template/default/index.njk index 9b3ef57fc3..3c1d368a88 100644 --- a/src/styles/page-template/default/index.njk +++ b/src/styles/page-template/default/index.njk @@ -14,6 +14,6 @@ layout: false {% endblock %} {% block bodyEnd %} - - + + {% endblock %} diff --git a/views/layouts/_generic.njk b/views/layouts/_generic.njk index 50506c3011..8ee2364403 100644 --- a/views/layouts/_generic.njk +++ b/views/layouts/_generic.njk @@ -37,6 +37,6 @@ {% block footer %}{% endblock %} {% block bodyEnd %} - - + + {% endblock %} diff --git a/views/layouts/layout-example-full-page-govuk.njk b/views/layouts/layout-example-full-page-govuk.njk index f7cfe9b2ea..d4f7db98b2 100644 --- a/views/layouts/layout-example-full-page-govuk.njk +++ b/views/layouts/layout-example-full-page-govuk.njk @@ -22,7 +22,7 @@ {{ contents | safe }} {% endblock %} {% block bodyEnd %} - - - + + + {% endblock %} diff --git a/views/layouts/layout-example-full-page.njk b/views/layouts/layout-example-full-page.njk index c039ebe140..6939e8df09 100644 --- a/views/layouts/layout-example-full-page.njk +++ b/views/layouts/layout-example-full-page.njk @@ -24,7 +24,7 @@ {{ contents | safe }} {% endblock %} {% block bodyEnd %} - - - + + + {% endblock %} diff --git a/views/layouts/layout-example.njk b/views/layouts/layout-example.njk index 73dd013f5b..5676b7ebe6 100644 --- a/views/layouts/layout-example.njk +++ b/views/layouts/layout-example.njk @@ -35,9 +35,9 @@ {% endblock %} {% block bodyEnd %} - - - + + + {% endblock %} {# Example pages shouldn't have a footer, so blank the one provided by the template #} diff --git a/views/partials/_cookie-banner.njk b/views/partials/_cookie-banner.njk index 0a51c356ae..8a65cc469f 100644 --- a/views/partials/_cookie-banner.njk +++ b/views/partials/_cookie-banner.njk @@ -72,25 +72,31 @@ to avoid a high cumulative layout shift (CLS) score https://web.dev/cls/ #} + {%- endblock %} diff --git a/src/styles/page-template/custom/index.njk b/src/styles/page-template/custom/index.njk index a09d28010c..81076eb2e7 100644 --- a/src/styles/page-template/custom/index.njk +++ b/src/styles/page-template/custom/index.njk @@ -149,6 +149,6 @@ ignoreInSitemap: true {% endblock %} {% block bodyEnd %} - + {% endblock %} diff --git a/src/styles/page-template/default/index.njk b/src/styles/page-template/default/index.njk index 3c1d368a88..ab54fc22f2 100644 --- a/src/styles/page-template/default/index.njk +++ b/src/styles/page-template/default/index.njk @@ -14,6 +14,6 @@ layout: false {% endblock %} {% block bodyEnd %} - + {% endblock %} diff --git a/views/layouts/_generic.njk b/views/layouts/_generic.njk index 8ee2364403..7420ad854d 100644 --- a/views/layouts/_generic.njk +++ b/views/layouts/_generic.njk @@ -37,6 +37,5 @@ {% block footer %}{% endblock %} {% block bodyEnd %} - {% endblock %} diff --git a/views/layouts/layout-example-full-page-govuk.njk b/views/layouts/layout-example-full-page-govuk.njk index d4f7db98b2..74bafa4534 100644 --- a/views/layouts/layout-example-full-page-govuk.njk +++ b/views/layouts/layout-example-full-page-govuk.njk @@ -22,7 +22,6 @@ {{ contents | safe }} {% endblock %} {% block bodyEnd %} - - + {% endblock %} diff --git a/views/layouts/layout-example-full-page.njk b/views/layouts/layout-example-full-page.njk index 6939e8df09..440cce9093 100644 --- a/views/layouts/layout-example-full-page.njk +++ b/views/layouts/layout-example-full-page.njk @@ -24,7 +24,6 @@ {{ contents | safe }} {% endblock %} {% block bodyEnd %} - - + {% endblock %} diff --git a/views/layouts/layout-example.njk b/views/layouts/layout-example.njk index 5676b7ebe6..440bbf6ada 100644 --- a/views/layouts/layout-example.njk +++ b/views/layouts/layout-example.njk @@ -35,8 +35,7 @@ {% endblock %} {% block bodyEnd %} - - + {% endblock %}