Skip to content

Commit

Permalink
Update govuk-prototype-components dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrobertlloyd committed Dec 19, 2023
1 parent ef26a2d commit 4ca9f34
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 10 deletions.
8 changes: 8 additions & 0 deletions components/header/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
// See: https://github.com/alphagov/govuk-design-system/blob/master/src/stylesheets/components/_header.scss

@include govuk-exports("app-header") {
.app-header--full-width-border {
border-bottom: $govuk-border-width-wide solid $govuk-brand-colour;
}

.app-header--no-border {
border-bottom: 0;
}

// Override the default 33% width on the logo in GOV.UK Frontend (prevents
// unnecessary wrapping of product name on smaller tablet / desktop
// viewports)
Expand Down
6 changes: 5 additions & 1 deletion components/header/template.njk
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{%- from "../site-search/macro.njk" import appSiteSearch -%}
<header class="govuk-header app-header" role="banner" data-module="govuk-header">
{%- set headerType = "no-border" if
layout == "product" or
layout == "collection"
-%}
<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">
<a href="{{ params.homepageUrl | default("/") }}" class="govuk-header__link govuk-header__link--homepage">
Expand Down
2 changes: 1 addition & 1 deletion layouts/base.njk
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
{% from "components/document-header/macro.njk" import appDocumentHeader %}
{% from "components/document-list/macro.njk" import appDocumentList %}
{% from "components/footer/macro.njk" import appFooter %}
{% from "components/header/macro.njk" import appHeader %}
{% from "components/header/macro.njk" import appHeader with context %}
{% from "components/prose-scope/macro.njk" import appProseScope %}

{% block headIcons %}
Expand Down
1 change: 0 additions & 1 deletion layouts/product.njk
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

{% block main %}
{{ xGovukMasthead({
classes: "x-govuk-masthead--large",
title: {
html: title | smart
} if title,
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"@11ty/eleventy-plugin-rss": "^1.1.2",
"@rollup/plugin-commonjs": "^25.0.0",
"@rollup/plugin-node-resolve": "^15.0.0",
"@x-govuk/govuk-prototype-components": "^2.2.0",
"@x-govuk/govuk-prototype-components": "^3.0.0",
"deepmerge": "^4.2.2",
"govuk-frontend": "^5.0.0",
"luxon": "^3.0.1",
Expand Down

0 comments on commit 4ca9f34

Please sign in to comment.