From ecfb4a4c53edc0007b004be576f99fcc78a8d0c5 Mon Sep 17 00:00:00 2001 From: t1enne Date: Thu, 13 Oct 2022 20:13:37 +0200 Subject: [PATCH] fixed mobile ui overflowing --- web/components/ui/Content/Content.module.scss | 6 ++++++ web/components/ui/Content/Content.tsx | 6 +++--- web/components/ui/Header/Header.module.scss | 9 +-------- web/components/ui/Sidebar/Sidebar.module.scss | 8 ++++---- web/styles/ant-overrides.scss | 8 ++++++++ 5 files changed, 22 insertions(+), 15 deletions(-) diff --git a/web/components/ui/Content/Content.module.scss b/web/components/ui/Content/Content.module.scss index d5752d54e..44af3a371 100644 --- a/web/components/ui/Content/Content.module.scss +++ b/web/components/ui/Content/Content.module.scss @@ -2,7 +2,13 @@ display: grid; grid-template-columns: 1fr auto; height: 100%; + width: 100%; background-color: var(--theme-color-background-main); + + .mainSection { + display: flex; + flex-direction: column; + } .topSection { padding: 0; diff --git a/web/components/ui/Content/Content.tsx b/web/components/ui/Content/Content.tsx index b8cb9ac55..48e61baf9 100644 --- a/web/components/ui/Content/Content.tsx +++ b/web/components/ui/Content/Content.tsx @@ -1,7 +1,7 @@ import { useRecoilState, useRecoilValue } from 'recoil'; import { Layout, Tabs, Spin } from 'antd'; import { FC, useEffect, useState } from 'react'; -import classNames from 'classnames'; +import cn from 'classnames'; import dynamic from 'next/dynamic'; import { LOCAL_STORAGE_KEYS, getLocalStorage, setLocalStorage } from '../../../utils/localStorage'; @@ -132,7 +132,7 @@ const MobileContent = ({ ]; return ( -
+
); @@ -215,7 +215,7 @@ export const Content: FC = () => {
-
+
{online && } {!online && !appState.appLoading && ( diff --git a/web/components/ui/Header/Header.module.scss b/web/components/ui/Header/Header.module.scss index 6c60d7630..317217240 100644 --- a/web/components/ui/Header/Header.module.scss +++ b/web/components/ui/Header/Header.module.scss @@ -7,7 +7,6 @@ z-index: 20; padding: 0.4rem 0.7rem; box-shadow: 0px 1px 3px 1px rgb(0 0 0 / 10%); - background-color: var(--theme-color-background-header); .logo { @@ -17,15 +16,9 @@ color: var(--theme-color-components-text-on-dark); font-family: var(--theme-text-display-font-family); margin-left: 0.5rem; - font-size: 1.5rem; + font-size: clamp(1rem, 4vw, 2rem); font-weight: 600; } } } -@media (max-width: 768px) { - .header { - line-height: 5vh; - height: 5vh; - } -} diff --git a/web/components/ui/Sidebar/Sidebar.module.scss b/web/components/ui/Sidebar/Sidebar.module.scss index 7d3fdae62..8364a4618 100644 --- a/web/components/ui/Sidebar/Sidebar.module.scss +++ b/web/components/ui/Sidebar/Sidebar.module.scss @@ -1,16 +1,16 @@ .root { background-color: var(--theme-color-background-chat); display: none; - --header-h: 64px; + // --header-h: 64px; } @media (min-width: 768px) { .root { position: sticky; - top: var(--header-h); + // top: var(--header-h); display: block; - height: calc(100vh - var(--header-h)); - max-height: calc(100vh - var(--header-h)); + // height: calc(100vh - var(--header-h)); + // max-height: calc(100vh - var(--header-h)); } } /* diff --git a/web/styles/ant-overrides.scss b/web/styles/ant-overrides.scss index eb7d5138f..7472379b3 100644 --- a/web/styles/ant-overrides.scss +++ b/web/styles/ant-overrides.scss @@ -1,3 +1,11 @@ +/* ------------------------- // + HEADER +// ------------------------- */ + +.ant-layout-header { + line-height: unset; + height: auto; +} /* ------------------------- // BUTTONS // ------------------------- */