2021-05-12 18:32:55 +02:00
|
|
|
<script lang="typescript">
|
2021-08-09 14:49:17 +02:00
|
|
|
import {menuVisiblilityStore} from "../../Stores/MenuStore";
|
|
|
|
import {get} from "svelte/store";
|
2021-07-12 17:39:16 +02:00
|
|
|
|
2021-08-11 14:07:34 +02:00
|
|
|
function showMenu(){
|
2021-08-09 14:49:17 +02:00
|
|
|
menuVisiblilityStore.set(!get(menuVisiblilityStore))
|
2021-07-12 17:39:16 +02:00
|
|
|
}
|
2021-08-11 14:07:34 +02:00
|
|
|
|
|
|
|
function onKeyDown(e: KeyboardEvent) {
|
|
|
|
if (e.key === "Tab") {
|
|
|
|
showMenu();
|
|
|
|
}
|
|
|
|
}
|
2021-05-12 18:32:55 +02:00
|
|
|
</script>
|
|
|
|
|
2021-08-11 14:07:34 +02:00
|
|
|
<svelte:window on:keydown={onKeyDown}/>
|
|
|
|
|
2021-05-12 18:32:55 +02:00
|
|
|
<main class="menuIcon">
|
2021-08-11 14:07:34 +02:00
|
|
|
<img src="/static/images/logo-WA-min.png" alt="open menu" class="nes-pointer" on:click|preventDefault={showMenu}>
|
2021-05-12 18:32:55 +02:00
|
|
|
</main>
|
|
|
|
|
2021-05-17 14:30:54 +02:00
|
|
|
<style lang="scss">
|
2021-08-09 14:49:17 +02:00
|
|
|
.menuIcon {
|
|
|
|
pointer-events: auto;
|
|
|
|
margin: 25px;
|
|
|
|
img {
|
|
|
|
width: 60px;
|
|
|
|
padding-top: 0;
|
2021-05-12 18:32:55 +02:00
|
|
|
}
|
2021-08-09 14:49:17 +02:00
|
|
|
}
|
|
|
|
@media only screen and (max-height: 700px) {
|
|
|
|
.menuIcon {
|
|
|
|
margin: 100px;
|
2021-05-12 18:32:55 +02:00
|
|
|
}
|
2021-08-09 14:49:17 +02:00
|
|
|
}
|
2021-05-12 18:32:55 +02:00
|
|
|
</style>
|