Logo
Explore Help
Sign In
darkhelm/notifications-admin
1
0
Fork 0
You've already forked notifications-admin
mirror of https://github.com/GSA/notifications-admin.git synced 2026-07-10 03:14:58 -04:00
Code Issues Packages Projects Releases Wiki Activity
Files
16da5d8243a13bcbf52e6b2fadee2ea95a67ee34
notifications-admin/app/templates/components/page-header.html

20 lines
301 B
HTML
Raw Normal View History

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-29 11:44:05 +01:00
{% 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 %}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.0 Page: 195ms Template: 7ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API