diff --git a/src/components/Author/AuthorCard/AuthorCard.module.scss b/src/components/Author/AuthorCard/AuthorCard.module.scss index 460be48a..fa6574c4 100644 --- a/src/components/Author/AuthorCard/AuthorCard.module.scss +++ b/src/components/Author/AuthorCard/AuthorCard.module.scss @@ -14,10 +14,13 @@ } .authorDetails { - align-items: baseline; - display: flex; flex: 1; + @include media-breakpoint-up(sm) { + align-items: baseline; + display: flex; + } + &.authorDetailsShrinked { flex: 0 0 auto; } @@ -62,7 +65,7 @@ .authorAbout { color: rgb(0 0 0 / 60%); - font-size: 1.5rem; + font-size: 1.4rem; line-height: 1.4; word-break: break-word; } @@ -442,11 +445,19 @@ } } +.subscribersContainer { + display: flex; + flex-wrap: wrap; + font-size: 1.4rem; + margin-top: 1em; +} + .subscribers { + align-items: center; cursor: pointer; display: inline-flex; + margin-right: 3rem; vertical-align: top; - align-items: center; .userpic { background: var(--background-color); @@ -459,7 +470,12 @@ } } -.listWrapper { - overflow: auto; - max-height: 70vh; +.subscribersCounter { + margin-left: -0.6rem; +} + +.listWrapper { + max-height: 70vh; + overflow: auto; + padding-right: 2rem; } diff --git a/src/components/Author/AuthorCard/AuthorCard.tsx b/src/components/Author/AuthorCard/AuthorCard.tsx index 5257495c..8bd7bc79 100644 --- a/src/components/Author/AuthorCard/AuthorCard.tsx +++ b/src/components/Author/AuthorCard/AuthorCard.tsx @@ -39,6 +39,7 @@ type AuthorCardProps = { class?: string followers?: Author[] subscriptions?: Array + showPublicationsCounter?: boolean } function isAuthor(value: Author | Topic): value is Author { @@ -115,128 +116,168 @@ export const AuthorCard = (props: AuthorCardProps) => { }) return ( -
- - } - > -
- -
-
- + <>
-
-
- ( - - {children} - - )} - > - {name()} - -
- {/*TODO: implement plurals by i18n*/} - {props.author.stat?.shouts} публикаций
}> -
- + } + > +
+ +
+ - 0}> -
showModal('followers')}> - - {(f) => } - -
- {props.followers.length}  - {getNumeralsDeclension(props.followers.length, [ - t('subscriber'), - t('subscriber_rp'), - t('subscribers') - ])} -
+
+
+
+ ( + + {children} + + )} + > + {name()} +
- - 0}> -
-
showModal('subscriptions')}> - - {(f) => { - if ('name' in f) { - return - } else if ('title' in f) { - return - } - return null - }} - -
- {props.subscriptions.length}  - {getNumeralsDeclension(props.subscriptions.length, [ - t('subscription'), - t('subscription_rp'), - t('subscriptions') - ])} -
-
-
-
-
- - - -
- - + ) : ( + '' + ) + } + > +
+ + + 0) || + (props.subscriptions && props.subscriptions.length > 0) + } + > +
+ 0}> +
showModal('followers')}> + + {(f) => } + +
+ {props.followers.length}  + {getNumeralsDeclension(props.followers.length, [ + t('subscriber'), + t('subscriber_rp'), + t('subscribers') + ])} +
+ 0}> +
showModal('subscriptions')}> + + {(f) => { + if ('name' in f) { + return + } else if ('title' in f) { + return + } + return null + }} + +
+ {props.subscriptions.length}  + {getNumeralsDeclension(props.subscriptions.length, [ + t('subscription'), + t('subscription_rp'), + t('subscriptions') + ])} +
+
+
+
+
+
+ + + +
+ + + +
+
- -
+ +
+ <>

{t('Followers')}

- - {(follower: Author) => ( -
- -
- )} -
+
+ + {(follower: Author) => ( + + )} + +
+ <> @@ -357,29 +386,32 @@ export const AuthorCard = (props: AuthorCardProps) => { +
- - {(subscription: Author | Topic) => ( -
- {isAuthor(subscription) ? ( +
+ + {(subscription: Author | Topic) => + isAuthor(subscription) ? ( ) : ( - - )} -
- )} - + + ) + } + +
-
+ ) } diff --git a/src/components/Feed/ArticleCard.module.scss b/src/components/Feed/ArticleCard.module.scss index 5ed8a383..b7761634 100644 --- a/src/components/Feed/ArticleCard.module.scss +++ b/src/components/Feed/ArticleCard.module.scss @@ -398,8 +398,10 @@ padding: 0 2.4rem; width: 100%; - @include media-breakpoint-down(sm) { - padding-top: 100%; + @include media-breakpoint-down(xl) { + aspect-ratio: auto; + height: 100%; + padding-top: 30%; } &.swiper-slide { @@ -450,6 +452,12 @@ justify-content: end; padding: 2.4rem; z-index: 1; + + @include media-breakpoint-down(xl) { + padding-left: 0; + padding-right: 0; + position: relative; + } } .shoutCardCover { diff --git a/src/components/Topic/Card.module.scss b/src/components/Topic/Card.module.scss index 2dee7902..c0d58d03 100644 --- a/src/components/Topic/Card.module.scss +++ b/src/components/Topic/Card.module.scss @@ -19,6 +19,7 @@ align-items: center; display: flex; justify-content: space-between; + margin-top: 0; button { margin-top: 0;