diff --git a/src/server/views/components/tag-env/macro.njk b/src/server/views/components/tag-env/macro.njk index 138731b21..4d6176a87 100644 --- a/src/server/views/components/tag-env/macro.njk +++ b/src/server/views/components/tag-env/macro.njk @@ -1,3 +1,3 @@ -{% macro appTagEnv(env) %} +{% macro appTagEnv(params) %} {%- include "./template.njk" -%} {% endmacro %} diff --git a/src/server/views/components/tag-env/template.njk b/src/server/views/components/tag-env/template.njk index e8abf3b68..615c819c1 100644 --- a/src/server/views/components/tag-env/template.njk +++ b/src/server/views/components/tag-env/template.njk @@ -1,6 +1,6 @@ {%- from "govuk/components/tag/macro.njk" import govukTag -%} -{%- switch env %} +{%- switch params.env %} {% case "local" %} {% case "dev" %} {% set text = "Development" %} diff --git a/src/server/views/layout.html b/src/server/views/layout.html index c0dfd84b0..bda5dd6b6 100644 --- a/src/server/views/layout.html +++ b/src/server/views/layout.html @@ -9,6 +9,14 @@ {% from "components/service-banner/macro.njk" import appServiceBanner -%} {% from "components/tag-env/macro.njk" import appTagEnv -%} +{% set envTag %} + {% if cdpEnvironment !== "prod" %} + {{ appTagEnv({ + env: cdpEnvironment + }) }} + {% endif %} +{% endset %} + {% block head %} -
- - -
- - {{ name if name else serviceName }} - -
-
- + {{ govukHeader({ + homepageUrl: "https://www.gov.uk", + containerClasses: "govuk-width-container", + productName: envTag | safe | trim, + serviceName: name if name else serviceName, + serviceUrl: serviceUrl + }) }} {% endblock %} {% block beforeContent %}