Files
notifications-admin/app/templates/components/page-header.html
Chris Hill-Scott 74fb30ce5f Add GOV.UK Design System style back links
The Design System has standardised on back links being at the top of the
page, decorated with a small text-coloured arrow.

I think this makes more sense than having them at the bottom, because it
suggests, in some way, being able to go back before commiting to any of
the forms on the page. Whereas the things at the bottom of the page
should be performing actions on what’s in the page.

The reason for making this change now is that it de-clutters the area
around the green buttons. This was presenting a design challenge where
multiple levels of interaction were happening in the same form. Moving
these back links to the top of the page should mean that, in these
complicated forms, there’s one fewer thing to compete for the user’s
attention.

I’ve componentised this into a `page_header` macro so that the change is
easier to roll out and maintain.
2019-04-30 15:29:39 +01:00

20 lines
301 B
HTML

{% macro page_header(
h1,
back_link=None
) %}
{% if back_link %}
{{ govuk_back_link(back_link) }}
{% endif %}
<h1 class="heading-large">{{ h1 }}</h1>
{% endmacro %}
{% macro govuk_back_link(back_link) %}
<a class="govuk-back-link" href="{{ back_link }}">Back</a>
{% endmacro %}