Skip to content

Commit 0053d4b

Browse files
committed
Use callout for brand notes
1 parent 0e887f8 commit 0053d4b

6 files changed

Lines changed: 30 additions & 43 deletions

File tree

src/components/cookie-banner/index.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@ Allow users to accept or reject cookies which are not essential to making your s
1414

1515
{{ example({ group: "components", item: "cookie-banner", example: "default", html: true, nunjucks: true, open: false, loading: "eager" }) }}
1616

17-
<strong class="govuk-tag brand-tag-green">
18-
Brand
19-
</strong>
17+
{% call callout({ tagText: "Brand", colour: "green" }) %}
18+
2019
<p class="govuk-body"><a href="#">See an example of the Cookie banner showing the refreshed GOV.UK branding</a>.</p>
2120

21+
{% endcall %}
22+
2223
If you use the page template, you'll also get the Cookie banner without having to add it, as it's included by default. However, if you want to customise the default Cookie banner, read the [page template guidance about customising components](/styles/page-template/#changing-template-content).
2324

24-
{% call callout({ tagText: "Brand", colour: "green" }) %}
25+
{% call callout({ tagText: "Brand", colour: "green", isInset: "true" }) %}
2526

2627
<h2 class="app-callout__heading">Brand changes to the {{title}} component</h2>
2728
<p class="govuk-body">From June 2025, the {{title}} component will change to support a wider refresh of the GOV.UK brand. </p>

src/components/footer/index.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@ The GOV.UK footer provides copyright, licensing and other information about your
1515

1616
{{ example({ group: "components", item: "footer", example: "default", id: "default-1", html: true, nunjucks: true, open: false, size: "m", loading: "eager" }) }}
1717

18-
<strong class="govuk-tag brand-tag-green">
19-
Brand
20-
</strong>
18+
{% call callout({ tagText: "Brand", colour: "green" }) %}
19+
2120
<p class="govuk-body"><a href="#">See an example of the GOV.UK footer showing the refreshed GOV.UK branding</a>.</p>
2221

22+
{% endcall %}
23+
2324
If you use the page template, you'll also get the footer without having to add it, as it's included by default. However, if you want to customise the default footer, read the [page template guidance about customising components](/styles/page-template/#changing-template-content).
2425

25-
{% call callout({ tagText: "Brand", colour: "green" }) %}
26+
{% call callout({ tagText: "Brand", colour: "green", isInset: "true" }) %}
2627

2728
<h2 class="app-callout__heading">Brand changes to the {{title}} component</h2><p class="govuk-body">From June 2025, the {{title}} component will change to support a wider refresh of the GOV.UK brand.</p>
2829

src/components/header/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ The GOV.UK header component tells users they’re using a service on GOV.UK and
1414

1515
{{ example({ group: "components", item: "header", example: "default", id: "default-1", html: true, nunjucks: true, open: false, loading: "eager" }) }}
1616

17-
<strong class="govuk-tag brand-tag-green">
18-
Brand
19-
</strong>
17+
{% call callout({ tagText: "Brand", colour: "green" }) %}
18+
2019
<p class="govuk-body"><a href="#">See an example of the GOV.UK header showing the refreshed GOV.UK branding</a>.</p>
20+
{% endcall %}
2121

2222
If you use the page template, you'll also get the GOV.UK header without having to add it, as it's included by default. However, if you want to customise the default GOV.UK header, read the [page template guidance about customising components](/styles/page-template/#changing-template-content).
2323

24-
{% call callout({ tagText: "Brand", colour: "green" }) %}
24+
{% call callout({ tagText: "Brand", colour: "green", isInset: "true" }) %}
2525

2626
<h2 class="app-callout__heading">Brand changes to the {{title}} component</h2>
2727
<p class="govuk-body">From June 2025, the {{title}} component will change to support a wider refresh of the GOV.UK brand. </p>

src/components/service-navigation/index.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ layout: layout-pane.njk
1313

1414
Service navigation helps users understand that they’re using your service and lets them navigate around your service.
1515

16-
{% call callout({ tagText: "Brand", colour: "green" }) %}
16+
{% call callout({ tagText: "Brand", colour: "green", isInset: "true" }) %}
1717

1818
<h2 class="app-callout__heading">Brand changes to the {{title}} component</h2><p class="govuk-body">From June 2025, the {{title}} component will change to support a wider refresh of the GOV.UK brand.</p>
1919

@@ -23,15 +23,17 @@ Service navigation helps users understand that they’re using your service and
2323
<li>reduces overall padding by [x]px</li>
2424
</ul>
2525
<p class="govuk-body">To help service teams in government get ready to use the new branding by June 2025, <a href="#update-to-refresh-the-govuk-brand">we’ve provided several options to update their services</a>.</p>
26+
2627
{% endcall %}
2728

2829
{{ example({ group: "components", item: "service-navigation", example: "default", html: true, nunjucks: true, open: false, loading: "eager" }) }}
2930

30-
<strong class="govuk-tag brand-tag-green">
31-
Brand
32-
</strong>
31+
{% call callout({ tagText: "Brand", colour: "green" }) %}
32+
3333
<p class="govuk-body"><a href="#">See an example of the Service navigation showing the refreshed GOV.UK branding</a>.</p>
3434

35+
{% endcall %}
36+
3537
If you use the page template, you'll also get the Service navigation without having to add it, as it's included by default. However, if you want to customise the default Service navigation, read the [page template guidance about customising components](/styles/page-template/#changing-template-content).
3638

3739
## When to use this component

views/partials/_brand-callout.njk

Lines changed: 0 additions & 17 deletions
This file was deleted.

views/partials/_callout.njk

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@
77
text: params.tagText,
88
classes: "app-callout__tag app-callout__tag--" + params.colour
99
}) }}
10-
{% if params.heading %}
10+
{% if params.heading -%}
1111
<h2 class="app-callout__heading">{{ params.heading }}</h2>
1212
{% endif -%}
13-
{% if caller %}
14-
{{ caller() }}
15-
{% elif params.content %}
16-
{{ params.content | safe }}
17-
{% endif %}
13+
{{ caller() if caller else params.content | safe }}
1814
{% endset -%}
1915

20-
{{ govukInsetText({
21-
html: calloutContent,
22-
classes: "app-callout app-callout--" + params.colour
23-
}) }}
16+
{% if params.isInset === "true" -%}
17+
{{ govukInsetText({
18+
html: calloutContent,
19+
classes: "app-callout app-callout--" + params.colour
20+
}) }}
21+
{% else -%}
22+
<div {% if params.id %}{{ params.id }} {% endif %}role="note">{{ calloutContent | trim | safe }}</div>
23+
{% endif -%}
2424

2525
{% endmacro %}

0 commit comments

Comments
 (0)