Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified assets/dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/homepage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/login.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 18 additions & 11 deletions assets/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,24 @@ function settings() {
}

// Close the dropdown menu if the user clicks outside of it
window.onclick = function(event) {
if (!event.target.matches('.dropbtn')) {
var dropdowns = document.getElementsByClassName("dropdown-content");
for (var i = 0; i < dropdowns.length; i++) {
var openDropdown = dropdowns[i];
if (openDropdown.classList.contains('show')) {
openDropdown.classList.remove('show');
}
document.addEventListener('DOMContentLoaded', () => {
const btn = document.querySelector('.dropdown .dropbtn');
const menu = document.getElementById('setting');
if (!btn || !menu) return;

btn.addEventListener('click', () => {
const expanded = btn.getAttribute('aria-expanded') === 'true';
btn.setAttribute('aria-expanded', String(!expanded));
menu.hidden = expanded;
});

document.addEventListener('click', (e) => {
if (!menu.hidden && !e.target.closest('.dropdown')) {
btn.setAttribute('aria-expanded', 'false');
menu.hidden = true;
}
}
}
});
});

/*
setmenu() function is used to set menu items dynamically
Expand Down Expand Up @@ -114,4 +121,4 @@ function validatePassword() {
} else {
passwordMatchCheck.textContent = '✗';
}
}
}
Binary file modified assets/register.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading