Skip to content

Commit

Permalink
Fix secondary links bug (#13507)
Browse files Browse the repository at this point in the history
* Fix secondary links bug

* Run linter
  • Loading branch information
petesfrench committed Feb 6, 2024
1 parent 431f192 commit 0ba431b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions static/js/src/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ mainList.addEventListener("click", function (e) {
handleDropdownClick(e.target.parentNode);
}
} else if (
target.classList.contains("p-navigation__dropdown") &&
target.tagName == "A"
target.classList.contains("p-navigation__dropdown-item") ||
(target.classList.contains("p-navigation__secondary-link") &&
target.tagName == "A")
) {
// This handles the globa-nav using a slightly different class naming convention
window.location.href = target.href;
}
});
Expand Down
4 changes: 4 additions & 0 deletions static/sass/_pattern_navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ $meganav-height: 3rem;
top: 0;
z-index: 40;

.p-navigation__secondary-link {
@extend .dropdown-window__side-panel-link;
}

.p-link--inverted {
font-weight: 400;
}
Expand Down
2 changes: 1 addition & 1 deletion templates/templates/meganav/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@
<p class="p-muted-heading is-muted">{{ links_section.title }}</p>
{% for link in links_section.links %}
<li class="p-list__item">
<a class="dropdown-window__side-panel-link" href="{{ link.url }}" tabindex="-1">{{ link.title }}</a>
<a class="p-navigation__secondary-link" href="{{ link.url }}" tabindex="-1">{{ link.title }}</a>
</li>
{% endfor %}
</ul>
Expand Down

0 comments on commit 0ba431b

Please sign in to comment.