Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.

Commit

Permalink
add data tagging to nav items
Browse files Browse the repository at this point in the history
  • Loading branch information
timothyPatterson committed Feb 28, 2024
1 parent c4490aa commit aa1e2b3
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions core/templates/atlas/components/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,18 @@
{% for node in navigation_tree %}
<li>
<a class="atlas-nav__item{% if node.tier_one_item.name == header_section %} active{% endif %}"
href="{{ node.tier_one_item.url }}">{% trans node.tier_one_item.title %}</a>
href="{{ node.tier_one_item.url }}"
data-location="{{node.tier_one_item.name}} primary-nav"
data-title="{{node.tier_one_item.title}}"
>{% trans node.tier_one_item.title %}</a>
<ul class="atlas-nav__section atlas-list--bare">
{% for item in node.tier_two_items %}
<li>
<a class="atlas-nav__section-item{% if item.name == header_sub_section %} active{% endif %}"
href="{{ item.url }}">{{ item.title }}</a>
href="{{ item.url }}"
data-location="{{node.tier_one_item.name}} sub-nav"
data-title="{{item.title}}"
>{{ item.title }}</a>
</li>
{% endfor %}
</ul>
Expand All @@ -54,7 +60,10 @@
{% for item in node.tier_two_items %}
<li>
<a class="atlas-subnav__item{% if item.name == header_sub_section %} active{% endif %}"
href="{{ item.url }}">{{ item.title }}</a>
href="{{ item.url }}"
data-location="{{node.tier_one_item.name}} sub-nav"
data-title="{{item.title}}"
>{{ item.title }}</a>
</li>
{% endfor %}
</ul>
Expand Down

0 comments on commit aa1e2b3

Please sign in to comment.