2021-06-08 14:19:46 +00:00
|
|
|
|
|
|
|
window.addEventListener("load", () => {
|
|
|
|
let menu = document.querySelector(".navbar-menu");
|
2021-06-08 16:18:22 +00:00
|
|
|
let nav = document.querySelector("nav");
|
2021-06-08 14:19:46 +00:00
|
|
|
// Toggle display of the menu for mobile;
|
|
|
|
document.querySelector("#navbar-toggler").addEventListener("click", () => {
|
|
|
|
menu.classList.toggle('shown');
|
2021-06-23 01:18:18 +00:00
|
|
|
nav.classList.toggle('menu-shown');
|
2021-06-08 14:19:46 +00:00
|
|
|
})
|
2021-06-09 18:00:57 +00:00
|
|
|
document.querySelectorAll(".menu-with-sub").forEach(menu => {
|
2021-07-13 22:18:53 +00:00
|
|
|
menu.querySelector("a[role=button]").addEventListener("click", () => {
|
2021-06-09 18:00:57 +00:00
|
|
|
menu.classList.toggle('toggled');
|
|
|
|
})
|
|
|
|
})
|
2021-07-13 22:18:53 +00:00
|
|
|
// Basic mail protection
|
|
|
|
document.querySelector("a[alt=Mail]").href = "mail" + "to" + String.fromCharCode(58) + "mail" + String.fromCharCode(64) + "ad5001.eu"
|
2021-06-08 14:19:46 +00:00
|
|
|
})
|