Backed up Walmart Supplier's templates. Downloaded BuilderTrend's as well as they have just been assigned to me.
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
|
||||
<nav class="np-sub-navigation">
|
||||
<div class="np-sub-navigation-content">
|
||||
{% for link in navigations.sub_navigation %}
|
||||
{% unless link.label == 'Dashboard' %}
|
||||
<div class="np-sub-navigation-content-item {{ link.active_class }}">
|
||||
<a class="np-sub-navigation-content-item-link" href="{{ link.url }}">
|
||||
{% if link.label == 'Catalog' %}
|
||||
@ -11,6 +13,7 @@
|
||||
</a>
|
||||
<div class="np-sub-navigation-content-item-bar np-button-background-color"></div>
|
||||
</div>
|
||||
{% endunless %}
|
||||
{% endfor %}
|
||||
<div id="navBlog" class="np-sub-navigation-content-item np-sub-navigation-content-item-inactive">
|
||||
<a class="np-sub-navigation-content-item-link" href="/app/blog">
|
||||
@ -41,6 +44,10 @@
|
||||
const url = window.location.pathname;
|
||||
const navBlogBtn = document.querySelector('#navBlog');
|
||||
const navHelpDocBtn = document.querySelector('#helpDocs');
|
||||
const navWalmart = document.querySelector('#walmart');
|
||||
const navAdvisors = document.querySelector('#advisors');
|
||||
const navItems = document.querySelectorAll('.np-sub-navigation-content-item-link');
|
||||
|
||||
|
||||
if (url === '/app/blog') {
|
||||
navBlogBtn.classList.add('np-sub-navigation-content-item-active');
|
||||
@ -48,6 +55,20 @@
|
||||
} else if (url === '/app/help-docs') {
|
||||
navHelpDocBtn.classList.add('np-sub-navigation-content-item-active');
|
||||
navHelpDocBtn.classList.remove('np-sub-navigation-content-item-inactive');
|
||||
}
|
||||
} else if (url === '/app/welcome-to-walmart') {
|
||||
navWalmart.classList.add('np-sub-navigation-content-item-active');
|
||||
navWalmart.classList.remove('np-sub-navigation-content-item-inactive');
|
||||
} else if (url === '/app/advisors') {
|
||||
navAdvisors.classList.add('np-sub-navigation-content-item-active');
|
||||
navAdvisors.classList.remove('np-sub-navigation-content-item-inactive');
|
||||
} else if (url == '/app/categories-catalog') {
|
||||
navItems.forEach(item => {
|
||||
if (item.innerText == 'Courses') {
|
||||
item.parentElement.classList.add('np-sub-navigation-content-item-active');
|
||||
item.parentElement.classList.remove('np-sub-navigation-content-item-inactive');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user