Update script.js
This commit is contained in:
parent
a07019851e
commit
ca130e5000
1 changed files with 4 additions and 1 deletions
|
|
@ -380,7 +380,10 @@ function navigateToPage(pageId) {
|
||||||
document.querySelectorAll('.nav-button').forEach(btn => {
|
document.querySelectorAll('.nav-button').forEach(btn => {
|
||||||
btn.classList.remove('active');
|
btn.classList.remove('active');
|
||||||
});
|
});
|
||||||
const navButton = document.querySelector(`[data-page="${pageId}"]`);
|
|
||||||
|
// Handle artist-detail page specially - it should highlight the 'library' nav button
|
||||||
|
const navPageId = pageId === 'artist-detail' ? 'library' : pageId;
|
||||||
|
const navButton = document.querySelector(`[data-page="${navPageId}"]`);
|
||||||
if (navButton) {
|
if (navButton) {
|
||||||
navButton.classList.add('active');
|
navButton.classList.add('active');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue