From e0ae47bd5e83773d58985351f1ec460e8326d759 Mon Sep 17 00:00:00 2001 From: kvakazyambra Date: Mon, 16 Oct 2023 23:11:08 +0300 Subject: [PATCH] Mobile style fixes --- public/icons/key.svg | 4 ++ .../Feed/Sidebar/Sidebar.module.scss | 2 + src/components/Nav/Header/Header.module.scss | 53 +++++++++++++------ src/components/Nav/Header/Header.tsx | 13 +++-- src/components/Nav/HeaderAuth.tsx | 4 +- src/components/Nav/Topics/Topics.module.scss | 43 +++++++++++++-- src/components/Views/Feed.module.scss | 3 +- src/styles/app.scss | 12 +++-- 8 files changed, 101 insertions(+), 33 deletions(-) create mode 100644 public/icons/key.svg diff --git a/public/icons/key.svg b/public/icons/key.svg new file mode 100644 index 00000000..11d788ca --- /dev/null +++ b/public/icons/key.svg @@ -0,0 +1,4 @@ + + + diff --git a/src/components/Feed/Sidebar/Sidebar.module.scss b/src/components/Feed/Sidebar/Sidebar.module.scss index c09de070..5735b053 100644 --- a/src/components/Feed/Sidebar/Sidebar.module.scss +++ b/src/components/Feed/Sidebar/Sidebar.module.scss @@ -1,9 +1,11 @@ .sidebar { + margin-top: -0.7rem; max-height: calc(100vh - 120px); overflow: auto; top: 120px; @include media-breakpoint-up(md) { + margin-top: 0; position: sticky; ul > li { diff --git a/src/components/Nav/Header/Header.module.scss b/src/components/Nav/Header/Header.module.scss index 9d6fc432..5dffec89 100644 --- a/src/components/Nav/Header/Header.module.scss +++ b/src/components/Nav/Header/Header.module.scss @@ -104,9 +104,9 @@ position: relative; @include media-breakpoint-down(lg) { - flex: 1 !important; max-width: 100% !important; - padding: 0 !important; + position: absolute; + right: 0; } } @@ -139,7 +139,7 @@ overflow: auto; padding: $container-padding-x !important; position: fixed; - top: 64px; + top: 58px; width: 100%; z-index: 1; @@ -191,8 +191,9 @@ } } - ul { + :global(.view-switcher) { margin-top: 0; + overflow: hidden; } li { @@ -217,6 +218,10 @@ .fixed & { display: block; } + + a { + padding-top: 0.1em; + } } .mainNavigationSocial a { @@ -246,6 +251,30 @@ background: #f7f7f8; border: none; border-radius: 1.6rem; + padding-right: 5.6rem; + + &:not(:placeholder-shown) { + & ~ .mobileSubscriptionSubmit { + display: block; + } + } + } +} + +.mobileSubscriptionSubmit { + aspect-ratio: 1/1; + display: none; + height: 100%; + position: absolute; + right: 0; + top: 0; + + img { + aspect-ratio: 1/1; + left: 50%; + position: relative; + transform: translateX(-50%); + width: 16px !important; } } @@ -387,19 +416,11 @@ display: flex; justify-content: flex-end; position: absolute; - right: 5rem; + right: 0; top: 50%; transform: translateY(-50%); width: 100%; - @include media-breakpoint-up(lg) { - right: 0; - } - - @include media-breakpoint-up(xl) { - right: 2rem; - } - .control { cursor: pointer; border: 0; @@ -446,10 +467,6 @@ z-index: -1; } - @include media-breakpoint-down(md) { - padding: divide($container-padding-x, 2); - } - .userpic { align-items: center; margin-right: 0; @@ -534,6 +551,8 @@ } &:global(.loginbtn) { + background: #e9e9ee; + .icon { height: 2.4rem; width: 2.4rem; diff --git a/src/components/Nav/Header/Header.tsx b/src/components/Nav/Header/Header.tsx index 855086ac..23cc3435 100644 --- a/src/components/Nav/Header/Header.tsx +++ b/src/components/Nav/Header/Header.tsx @@ -173,6 +173,11 @@ export const Header = (props: Props) => {