Skip to content

Commit

Permalink
Final v1.0 template is done
Browse files Browse the repository at this point in the history
  • Loading branch information
yukiarimo committed Feb 17, 2024
1 parent d7dd4e9 commit 7cab5b9
Show file tree
Hide file tree
Showing 2 changed files with 246 additions and 36 deletions.
13 changes: 13 additions & 0 deletions assets/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,47 @@ var firstNavSidebar = document.getElementsByClassName('nav-link')[0];
var secondNavSidebar = document.getElementsByClassName('nav-link')[1];
var thirdNavSidebar = document.getElementsByClassName('nav-link')[2];
var fourthNavSidebar = document.getElementsByClassName('nav-link')[3];
var fifthNavSidebar = document.getElementsByClassName('nav-link')[4];

// add "selected" class to which is clicked and remove from other tabs
firstNavSidebar.addEventListener('click', function () {
firstNavSidebar.classList.add('active');
secondNavSidebar.classList.remove('active');
thirdNavSidebar.classList.remove('active');
fourthNavSidebar.classList.remove('active');
fifthNavSidebar.classList.remove('active');
});

secondNavSidebar.addEventListener('click', function () {
firstNavSidebar.classList.remove('active');
secondNavSidebar.classList.add('active');
thirdNavSidebar.classList.remove('active');
fourthNavSidebar.classList.remove('active');
fifthNavSidebar.classList.remove('active');
});

thirdNavSidebar.addEventListener('click', function () {
firstNavSidebar.classList.remove('active');
secondNavSidebar.classList.remove('active');
thirdNavSidebar.classList.add('active');
fourthNavSidebar.classList.remove('active');
fifthNavSidebar.classList.remove('active');
});

fourthNavSidebar.addEventListener('click', function () {
firstNavSidebar.classList.remove('active');
secondNavSidebar.classList.remove('active');
thirdNavSidebar.classList.remove('active');
fourthNavSidebar.classList.add('active');
fifthNavSidebar.classList.remove('active');
});

fifthNavSidebar.addEventListener('click', function () {
firstNavSidebar.classList.remove('active');
secondNavSidebar.classList.remove('active');
thirdNavSidebar.classList.remove('active');
fourthNavSidebar.classList.remove('active');
fifthNavSidebar.classList.add('active');
});

// check if the user on mobile or not
Expand Down
Loading

0 comments on commit 7cab5b9

Please sign in to comment.