Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix secondary links bug #13507

Merged
merged 2 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading