From f22d10a535529f4d37207ef0be5b6e7b086e8bd9 Mon Sep 17 00:00:00 2001 From: kvakazyambra Date: Sun, 19 May 2024 01:03:06 +0300 Subject: [PATCH] Placeholders fixes --- .../Feed/Placeholder/Placeholder.module.scss | 81 +++++++++++++------ .../Feed/Placeholder/Placeholder.tsx | 2 +- src/components/Views/Author/Author.tsx | 42 +++++----- src/components/Views/Feed/Feed.tsx | 9 ++- src/pages/feed.page.tsx | 5 +- 5 files changed, 85 insertions(+), 54 deletions(-) diff --git a/src/components/Feed/Placeholder/Placeholder.module.scss b/src/components/Feed/Placeholder/Placeholder.module.scss index abd61262..42b4e765 100644 --- a/src/components/Feed/Placeholder/Placeholder.module.scss +++ b/src/components/Feed/Placeholder/Placeholder.module.scss @@ -17,6 +17,7 @@ display: flex; @include font-size(1.5rem); gap: 0.6rem; + justify-content: center; margin-top: 3rem; padding: 1rem 2rem; width: 100%; @@ -29,46 +30,63 @@ } .placeholder--feed-mode { - aspect-ratio: 1 / 0.8; flex-direction: column; + min-height: 40rem; text-align: center; - &:after { - bottom: 0; - content: ''; - height: 20%; - left: 0; - position: absolute; - width: 100%; - - .placeholder--feed & { - background: linear-gradient(to top, #171032, rgba(23, 16, 50, 0)); - } - - .placeholder--feedCollaborations & { - background: linear-gradient(to top, #070709, rgba(7, 7, 9, 0)); - } + @include media-breakpoint-up(lg) { + aspect-ratio: 1 / 0.8; } .placeholderCover { - flex: 0 100%; - width: 100%; + flex: 1 100%; + position: relative; + + &:after { + bottom: 0; + content: ''; + height: 20%; + left: 0; + position: absolute; + width: 100%; + } img { position: absolute; } } + + &.placeholder--feedMy .placeholderCover:after { + background: linear-gradient(to top, #171032, rgba(23, 16, 50, 0)); + } + + &.placeholder--feedCollaborations .placeholderCover:after { + background: linear-gradient(to top, #070709, rgba(7, 7, 9, 0)); + } } .placeholder--profile-mode { - min-height: 28rem; + min-height: 40rem; + + @include media-breakpoint-down(md) { + display: block; + } + + @include media-breakpoint-up(md) { + min-height: 28rem; + } .placeholderCover { - flex: 0 45rem; - min-width: 45rem; - order: 2; padding: 1.6rem; + @include media-breakpoint-up(md) { + flex: 0 45rem; + min-width: 50%; + order: 2; + position: static; + width: 45rem; + } + img { height: auto; width: 100%; @@ -92,9 +110,15 @@ background: var(--background-color-invert); color: var(--default-color-invert); bottom: 2rem; - position: absolute; + left: 2rem; right: 2rem; - width: auto; + width: 100%; + + @include media-breakpoint-up(md) { + left: auto; + position: absolute; + width: auto; + } .icon { filter: invert(1); @@ -117,7 +141,7 @@ padding: 1.6rem; } -.placeholder--feed, +.placeholder--feedMy, .placeholder--feedCollaborations { color: var(--default-color-invert); @@ -128,7 +152,7 @@ } } -.placeholder--feed { +.placeholder--feedMy { background: #171032; .placeholderCover { @@ -190,6 +214,11 @@ @include font-size(1.6rem); gap: 4rem; + @include media-breakpoint-down(sm) { + flex-direction: column; + gap: 1.4rem; + } + a { border: none !important; padding-left: 2.6rem; diff --git a/src/components/Feed/Placeholder/Placeholder.tsx b/src/components/Feed/Placeholder/Placeholder.tsx index 94fa247a..a0b7dce2 100644 --- a/src/components/Feed/Placeholder/Placeholder.tsx +++ b/src/components/Feed/Placeholder/Placeholder.tsx @@ -16,7 +16,7 @@ export const Placeholder = (props: PlaceholderProps) => { const { author } = useSession() const data = { - feed: { + feedMy: { image: 'placeholder-feed.webp', header: t('Feed settings'), text: t('Placeholder feed'), diff --git a/src/components/Views/Author/Author.tsx b/src/components/Views/Author/Author.tsx index c5a44e98..b8414e40 100644 --- a/src/components/Views/Author/Author.tsx +++ b/src/components/Views/Author/Author.tsx @@ -260,28 +260,32 @@ export const AuthorView = (props: Props) => { -
- -
+ +
+ +
+
-
-
-
-
    - - {(comment) => ( - handleDeleteComment(id)} - /> - )} - -
+ +
+
+
+
    + + {(comment) => ( + handleDeleteComment(id)} + /> + )} + +
+
-
+ {
- } - > + + + + +
  • { - - - +