Skip to content

Commit

Permalink
Remove from sticky and change link color
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob-korf committed Sep 24, 2024
1 parent 0dd1436 commit f4998bf
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
8 changes: 8 additions & 0 deletions css/block/ucb-mega-menu.css
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@
flex-wrap: wrap;
}

.ucb-main-nav-container .ucb-mega-menu .menu-item .mega-menu-wrapper a{
color: #0277bd;
}

.ucb-main-nav-container .ucb-mega-menu .menu-item .mega-menu-wrapper a:hover{
color: #B71C1C;
}

@media only screen and (max-width: 767px) {

.ucb-mega-menu-column-3 div,
Expand Down
5 changes: 5 additions & 0 deletions css/ucb-sticky-menu.css
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,8 @@
.sticky-menu-inner .ucb-menu li.menu-item a.nav-link:hover {
color: var(--ucb-gold);
}

.sticky-menu-inner .ucb-mega-menu,
.sticky-menu-inner .ucb-mega-menu-icon {
display: none;
}
14 changes: 13 additions & 1 deletion js/ucb-mega-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,16 @@ const megaMenuList = [...megaMenuElementList].map(collapseEl => new bootstrap.Co
}
}
}
})
})

// Disable Sticky Menu Mega Menus
const stickyMenu = document.getElementsByClassName("ucb-sticky-menu");
for (let i = 0; i < stickyMenu.length; i++) {
const allMegaMenus = stickyMenu[i].getElementsByClassName("ucb-mega-menu-outer-link");
for (let j = 0; j < allMegaMenus.length; j++) {
allMegaMenus[j].removeAttribute("data-bs-toggle");
allMegaMenus[j].removeAttribute("data-bs-target");
allMegaMenus[j].removeAttribute("aria-expanded");
allMegaMenus[j].removeAttribute("aria-controls");
}
}

0 comments on commit f4998bf

Please sign in to comment.