Skip to content

Commit

Permalink
Fix header type conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrobertlloyd committed Dec 19, 2023
1 parent 7f9f116 commit 1829d18
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions components/header/template.njk
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{%- from "x-govuk/components/primary-navigation/macro.njk" import xGovukPrimaryNavigation -%}
{%- from "../site-search/macro.njk" import appSiteSearch -%}
{%- set headerType = "no-border" if
layout == "product" or
layout == "collection"
-%}
{%- set headerType = "full-width-border" if params.navigation -%}
{%- if params.navigation -%}
{%- set headerType = "full-width-border" -%}
{% elif layout == "product" or layout == "collection" %}
{%- set headerType = "no-border" -%}
{%- endif -%}
<header class="govuk-header app-header{% if headerType %} app-header--{{ headerType }}{% endif %}" role="banner" data-module="govuk-header">
<div class="govuk-header__container govuk-width-container app-header__container">
<div class="govuk-header__logo app-header__logo">
Expand Down

0 comments on commit 1829d18

Please sign in to comment.