This commit is contained in:
Beverly Nguyen
2024-10-22 16:40:20 -07:00
parent 4f802587b9
commit f2ea113856
5 changed files with 35 additions and 4 deletions

View File

@@ -0,0 +1,29 @@
(function(window) {
"use strict";
document.addEventListener('DOMContentLoaded', function() {
const sideNavLinks = document.querySelectorAll('.usa-sidenav__item');
const currentURL = window.location.pathname;
sideNavLinks.forEach(link => {
const sublist = link.querySelector('.usa-sidenav__sublist');
const parentLink = link.querySelector('a');
const isMatch = parentLink && sublist && currentURL === parentLink.getAttribute('href');
if (isMatch) {
sublist.classList.replace('display-none', 'display-block');
}
link.addEventListener('click', function(event) {
if (sublist && event.target === parentLink) {
event.preventDefault();
sublist.classList.toggle('display-none');
sublist.classList.toggle('display-block');
setTimeout(() => window.location.href = parentLink.href, 100);
}
});
});
});
})(window);

View File

@@ -831,13 +831,14 @@ $do-dont-top-bar-width: 1;
transition: transform 0.3s ease, background-color 0.3s ease,
}
li.linked-card > div:first-child {
li.linked-card:hover > div:first-child:hover {
border-color: #005ea2;
}
li.linked-card:hover h4,
li.linked-card:hover p,
.guidance_card_img{
li.linked-card:hover svg,
.guidance_card_img:hover{
color: #005ea2;
}