Allowing more social lists, wrapping within buttons!
This commit is contained in:
parent
737e3a27bc
commit
1171b352c5
8 changed files with 30 additions and 17 deletions
18
assets/js/main.js
Normal file
18
assets/js/main.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
window.addEventListener("load", () => {
|
||||
let menu = document.querySelector(".navbar-menu");
|
||||
let nav = document.querySelector("nav");
|
||||
// Toggle display of the menu for mobile;
|
||||
document.querySelector("#navbar-toggler").addEventListener("click", () => {
|
||||
menu.classList.toggle('shown');
|
||||
nav.classList.toggle('menu-shown');
|
||||
})
|
||||
document.querySelectorAll(".menu-with-sub").forEach(menu => {
|
||||
menu.querySelector("a[role=button]").addEventListener("click", () => {
|
||||
menu.classList.toggle('toggled');
|
||||
})
|
||||
})
|
||||
// Basic mail protection
|
||||
for(let emailLink of document.querySelectorAll("a[alt=Mail]")) {
|
||||
emailLink.href = "mail" + "to" + String.fromCharCode(58) + "mail" + String.fromCharCode(64) + "ad5001.eu"
|
||||
}
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue