From 20a2204e42c12569d6c3106703a600d359f9b895 Mon Sep 17 00:00:00 2001 From: EmmaVandewalle Date: Wed, 20 Mar 2024 14:26:31 +0100 Subject: [PATCH 1/8] fix: logo doesn't resize weirdly anymore --- frontend/src/assets/styles/mainpage.css | 19 +++++++++++++++---- .../src/assets/styles/students_components.css | 2 +- frontend/src/components/Header.tsx | 8 +++++--- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/frontend/src/assets/styles/mainpage.css b/frontend/src/assets/styles/mainpage.css index d300ddd7..71c4c751 100644 --- a/frontend/src/assets/styles/mainpage.css +++ b/frontend/src/assets/styles/mainpage.css @@ -1,26 +1,37 @@ +:root { + --sidebar-width: 8vh; +} + .main-header { width: 100vw; height: 8vh; background-color: #9c9afd; + overflow: hidden; } .main-nav { height: 100%; +} + +.logo-div { + background-color: #3f63c8; + height: 100%; + width: var(--sidebar-width); img { - background-color: #5f63c8; - width: 4vw; + display: block; + width: 100%; height: 100%; } } .main-content { width: 100vw; - height: 92vh; + height: calc(100vh - var(--sidebar-width)); } .side-bar { - width: 4vw; + width: var(--sidebar-width); background-color: #6a74ce; li { diff --git a/frontend/src/assets/styles/students_components.css b/frontend/src/assets/styles/students_components.css index 9473459e..34edf564 100644 --- a/frontend/src/assets/styles/students_components.css +++ b/frontend/src/assets/styles/students_components.css @@ -1,5 +1,5 @@ .student-main { - width: 96vw; + width: calc(100vw - var(--sidebar-width)); } .student-left { diff --git a/frontend/src/components/Header.tsx b/frontend/src/components/Header.tsx index ed1cad2e..ae303106 100644 --- a/frontend/src/components/Header.tsx +++ b/frontend/src/components/Header.tsx @@ -6,9 +6,11 @@ export function Header(): JSX.Element { return (