From 139727712dd3d23da28925dd34b566525639d303 Mon Sep 17 00:00:00 2001 From: vvandenb Date: Sun, 12 Mar 2023 13:53:50 +0100 Subject: [PATCH] * Frontend even more responsive! --- front/volume/src/components/NavBar.svelte | 100 +++++++++++------- .../src/components/Pong/GameComponent.svelte | 2 +- 2 files changed, 64 insertions(+), 38 deletions(-) diff --git a/front/volume/src/components/NavBar.svelte b/front/volume/src/components/NavBar.svelte index 02072fa..dceffc3 100644 --- a/front/volume/src/components/NavBar.svelte +++ b/front/volume/src/components/NavBar.svelte @@ -5,7 +5,7 @@ ":" + import.meta.env.VITE_BACK_PORT; export let links = [ - { text: "Home", url: "img/pong.png" }, + { text: "Home" }, { text: "Spectate" }, { text: "Channels" }, { text: "History" }, @@ -18,46 +18,55 @@ export let clickFriends = () => {}; export let clickChannels = () => {}; export let clickLeaderboard = () => {}; + + let hide = true; + + function toggle() { + hide = !hide; + } @@ -91,6 +100,14 @@ border: none; } + .hamburger { + display: none; + } + + .links { + display: flex; + } + @media (max-width: 768px) { .navigation-bar { flex-direction: column; @@ -109,5 +126,14 @@ margin: 0; text-align: center; } + + .hamburger { + display: block; + /* margin: 0 auto; */ + } + + .links { + display: none; + } } diff --git a/front/volume/src/components/Pong/GameComponent.svelte b/front/volume/src/components/Pong/GameComponent.svelte index 8c7ec6b..5b22638 100644 --- a/front/volume/src/components/Pong/GameComponent.svelte +++ b/front/volume/src/components/Pong/GameComponent.svelte @@ -49,7 +49,7 @@ } .renderCanvas { - max-width: 1000px; + max-width: 60vw; width: 100%; height: auto; padding-left: 0;