<script>
	function click() {
	console.log("click");
		document
			.querySelectorAll(".menu-btn")
			.forEach(elem => elem.classList.toggle("darken"));
		document
			.querySelectorAll("#root")
			.forEach(elem => elem.classList.toggle("darken"));
		document
			.querySelectorAll(".navigation-overlay")
			.forEach(elem => elem.classList.toggle("open-nav"));
	};
</script>

<div class="cross menu-btn" on:click|preventDefault="{click}">
	<img src="/svg/menu1.svg" class="idle" alt="idle">
	<img src="/svg/menu2.svg" class="active" alt="active">
</div>
