partey_workadventure/front/src/Components/Menu/MenuIcon.svelte

53 lines
1.2 KiB
Svelte
Raw Normal View History

<script lang="typescript">
import logoTalk from "../images/logo-message-pixel.png"
import {menuVisiblilityStore} from "../../Stores/MenuStore";
import {chatVisibilityStore} from "../../Stores/ChatStore";
import {get} from "svelte/store";
2021-11-30 19:10:35 +01:00
import Woka from '../Woka/Woka.svelte';
function showMenu(){
menuVisiblilityStore.set(!get(menuVisiblilityStore))
}
function showChat(){
chatVisibilityStore.set(true);
}
</script>
2021-11-09 18:10:55 +01:00
<svelte:window/>
<main class="menuIcon">
2021-11-30 19:10:35 +01:00
<div class="nes-pointer woka" on:click|preventDefault={showMenu}><Woka userId={-1}/></div>
<img src={logoTalk} alt="open menu" class="nes-pointer" on:click|preventDefault={showChat}>
</main>
<style lang="scss">
.menuIcon {
display: inline-grid;
2021-10-07 14:44:15 +02:00
z-index: 90;
position: relative;
margin: 25px;
img {
pointer-events: auto;
width: 60px;
padding-top: 0;
2021-11-26 23:49:49 +01:00
margin: 3px;
image-rendering: pixelated;
}
}
.menuIcon img:hover{
transform: scale(1.2);
}
2021-11-30 19:10:35 +01:00
.menuIcon .woka:hover{
transform: scale(1.2);
}
@media only screen and (max-width: 800px), only screen and (max-height: 800px) {
.menuIcon {
margin: 3px;
img {
width: 50px;
}
}
}
</style>