Add cartography menu with image overlays (WIP)
This commit is contained in:
@@ -68,31 +68,6 @@ UI.toggleBurger = function(burgerClass) {
|
||||
document.querySelector(`#${menuId}`).classList.toggle('is-active');
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Toggle side menu
|
||||
* @param {string} triggerId The ID of the trigger element
|
||||
* @param {?string} listId The ID of the menu list to open (if any)
|
||||
*/
|
||||
UI.toggleMenu = function (triggerId, listId = null) {
|
||||
const trigger = document.querySelector(`#${triggerId}`);
|
||||
const menu = document.querySelector('#menu');
|
||||
trigger.addEventListener('click', () => {
|
||||
menu.classList.remove('is-hidden');
|
||||
//menu.classList.add('is-3');
|
||||
const lists = menu.querySelectorAll('ul');
|
||||
|
||||
if (listId !== null) {
|
||||
const list = document.querySelector(`#${listId}`);
|
||||
list.classList.remove('is-hidden');
|
||||
|
||||
for (let ul of lists) {
|
||||
if (ul.id !== listId && !ul.id.includes('sub')) {
|
||||
ul.classList.add('is-hidden');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Open a modal with DB site data
|
||||
* @param {object} data The data retrieved from the DB to display as modal content
|
||||
|
||||
Reference in New Issue
Block a user