Skip to content

Commit

Permalink
Merge pull request #4740 from alphagov/make-tudor-crown-default
Browse files Browse the repository at this point in the history
Make Tudor Crown logo the default
  • Loading branch information
querkmachine committed Feb 15, 2024
2 parents 6c841c6 + 5db4dcf commit 551c833
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/govuk/components/header/header.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ params:
- name: useTudorCrown
type: boolean
required: false
description: If `true`, the header uses the Tudor crown from King Charles III's royal cypher. This will become the default in a future version of GOV.UK Frontend.
description: Deprecated. If `true`, uses the Tudor crown from King Charles III's royal cypher. Otherwise, uses the St. Edward's crown. Default is `true`.

previewLayout: full-width
accessibilityCriteria: |
Expand All @@ -98,10 +98,10 @@ examples:
description: The standard header as used on information pages on GOV.UK
options: {}

- name: with Tudor crown
description: Standard header with King Charles III's crown.
- name: with St Edward's crown
description: Legacy header with Queen Elizabeth II's crown.
options:
useTudorCrown: true
useTudorCrown: false

- name: with service name
description: If your service is more than a few pages long, you can help users understand where they are by adding the service name.
Expand Down
2 changes: 1 addition & 1 deletion src/govuk/components/header/template.njk
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
We use a single compound path for the logo to prevent subpixel rounding
shifting different elements unevenly relative to one another. #}
{{ (_tudorCrown if params.useTudorCrown else _stEdwardsCrown) | safe | trim | indent(8) }}
{{ (_stEdwardsCrown if (params.useTudorCrown !== undefined and params.useTudorCrown === false) else _tudorCrown) | safe | trim | indent(8) }}
{% if (params.productName) %}
<span class="govuk-header__product-name">
{{ params.productName }}
Expand Down
10 changes: 5 additions & 5 deletions src/govuk/components/header/template.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,8 @@ describe('header', () => {
$svg = $('.govuk-header__logotype')
})

it("defaults to St Edward's crown", () => {
expect($svg.attr('viewBox')).toEqual('0 0 152 30')
it('defaults to Tudor crown', () => {
expect($svg.attr('viewBox')).toEqual('0 0 148 30')
})

it('sets focusable="false" so that IE does not treat it as an interactive element', () => {
Expand All @@ -301,11 +301,11 @@ describe('header', () => {
expect($svg.html()).toContain('<title>GOV.UK</title>')
})

it('uses the Tudor Crown if useTudorCrown is set', () => {
$ = render('header', examples['with Tudor crown'])
it("uses the St Edward's Crown if useTudorCrown is false", () => {
$ = render('header', examples["with St Edward's crown"])
$svg = $('.govuk-header__logotype')

expect($svg.attr('viewBox')).toEqual('0 0 148 30')
expect($svg.attr('viewBox')).toEqual('0 0 152 30')
})
})
})

0 comments on commit 551c833

Please sign in to comment.