major UI/UX improvements
Signed-off-by: ari melody <ari@arimelody.me>
This commit is contained in:
parent
93539c8376
commit
6efd47c6c6
17 changed files with 739 additions and 458 deletions
14
public/script/header.js
Normal file
14
public/script/header.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
const header_links = document.getElementById("header-links");
|
||||
const hamburger = document.getElementById("header-links-toggle");
|
||||
|
||||
function toggle_header_links() {
|
||||
header_links.classList.toggle("open");
|
||||
}
|
||||
|
||||
document.addEventListener("click", event => {
|
||||
if (!header_links.contains(event.target) && !hamburger.contains(event.target)) {
|
||||
header_links.classList.remove("open");
|
||||
}
|
||||
});
|
||||
|
||||
hamburger.addEventListener("click", event => { toggle_header_links(); });
|
Loading…
Add table
Add a link
Reference in a new issue