<script>
// let navWidth = 0;
let navOpen = false;
function handleNav() {
navOpen = !navOpen;
// navWidth === 0 ? navWidth = 40 : navWidth = 0;
}
function handleNavWithKey(e) {
console.log(e.code);
if (e.code === "F1") {
navOpen = !navOpen;
}
}
// const openNav = () => {
// navOpen = !navOpen;
// navWidth = 40;
// }
// const closeNav = () => {
// navOpen = !navOpen;
// navWidth = 0;
// }
</script>
<div id="mySidenav" class="sidenav" class:open={navOpen}>
<a href="#a" class="closebtn" on:click={handleNav}>×</a>
<a href="#b">About</a>
<a href="#c">Services</a>
<a href="#d">Clients</a>
<a href="#e">Contact</a>
</div>
<!-- Use to open the sidenav -->