Merge pull request #2536 from GSA/2123-back-button-context

2123 back button context
This commit is contained in:
Beverly Nguyen
2025-05-01 09:48:50 -07:00
committed by GitHub
12 changed files with 155 additions and 67 deletions

View File

@@ -1,3 +1,3 @@
{% macro usaBackLink(params) %}
{%- include "./template.njk" -%}
{%- include "./template.njk" with context %}
{% endmacro %}

View File

@@ -1,4 +1,6 @@
<nav class="usa-breadcrumb" aria-label="Breadcrumb">
<a href="{{ params.href.url or params.href or '#' }}" class="usa-link usa-back-link display-inline-flex {{ params.classes or '' }}"
{%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}" {% endfor %}>{{ params.html | safe or params.href.text or 'Back' }}</a>
{%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}" {% endfor %}>
{{- params.html | safe or params.href.text or 'Back' -}}
</a>
</nav>