Skip to content

Commit

Permalink
Use 2/3 grid to constrain the width of cookie banner
Browse files Browse the repository at this point in the history
  • Loading branch information
hannalaakso committed Feb 1, 2021
1 parent b09e386 commit 879997f
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions src/govuk/components/cookie-banner/template.njk
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,26 @@
{%- for attribute, value in banner.attributes %} {{attribute}}="{{value}}"{% endfor %}
{% if banner.hidden %} hidden{% endif %}>

{% if banner.headingHtml or banner.headingText %}
<h2 class="govuk-cookie-banner__heading govuk-heading-m">
{%- if banner.headingHtml -%}
{{ banner.headingHtml | safe }}
{%- else -%}
{{ banner.headingText }}
{%- endif -%}
</h2>
{% endif %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
{% if banner.headingHtml or banner.headingText %}
<h2 class="govuk-cookie-banner__heading govuk-heading-m">
{%- if banner.headingHtml -%}
{{ banner.headingHtml | safe }}
{%- else -%}
{{ banner.headingText }}
{%- endif -%}
</h2>
{% endif %}

<div class="govuk-cookie-banner__content">
{%- if banner.html -%}
{{ banner.html | safe }}
{%- elif banner.text -%}
<p class="govuk-body">{{ banner.text }}</p>
{%- endif -%}
<div class="govuk-cookie-banner__content">
{%- if banner.html -%}
{{ banner.html | safe }}
{%- elif banner.text -%}
<p class="govuk-body">{{ banner.text }}</p>
{%- endif -%}
</div>
</div>
</div>

{% if banner.actions %}
Expand Down

0 comments on commit 879997f

Please sign in to comment.