Fixed subscribers style
This commit is contained in:
parent
8caef5b1f0
commit
3319bfe973
|
@ -18,9 +18,8 @@
|
||||||
|
|
||||||
.authorName {
|
.authorName {
|
||||||
@include font-size(4rem);
|
@include font-size(4rem);
|
||||||
|
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
margin-bottom: 0.2em;
|
margin-bottom: 1.2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.authorAbout {
|
.authorAbout {
|
||||||
|
@ -432,3 +431,16 @@
|
||||||
.listWrapper {
|
.listWrapper {
|
||||||
max-height: 70vh;
|
max-height: 70vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.subscribersContainer {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
font-size: 1.4rem;
|
||||||
|
gap: 1rem;
|
||||||
|
margin-top: 0;
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
|
@include media-breakpoint-down(md) {
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -127,12 +127,14 @@ export const AuthorCard = (props: Props) => {
|
||||||
<div class={styles.authorAbout} innerHTML={props.author.bio} />
|
<div class={styles.authorAbout} innerHTML={props.author.bio} />
|
||||||
</Show>
|
</Show>
|
||||||
<Show when={props.followers?.length > 0 || props.following?.length > 0}>
|
<Show when={props.followers?.length > 0 || props.following?.length > 0}>
|
||||||
|
<div class={styles.subscribersContainer}>
|
||||||
<Subscribers
|
<Subscribers
|
||||||
followers={props.followers}
|
followers={props.followers}
|
||||||
followersAmount={props.author?.stat?.followers}
|
followersAmount={props.author?.stat?.followers}
|
||||||
following={props.following}
|
following={props.following}
|
||||||
followingAmount={props.author?.stat?.authors}
|
followingAmount={props.author?.stat?.authors}
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
</Show>
|
</Show>
|
||||||
</div>
|
</div>
|
||||||
<ShowOnlyOnClient>
|
<ShowOnlyOnClient>
|
||||||
|
|
|
@ -44,16 +44,20 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.topicDetails {
|
.topicDetails {
|
||||||
|
align-items: flex-start;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
font-size: 1.4rem;
|
font-size: 1.4rem;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: 4rem;
|
gap: 1rem;
|
||||||
margin-top: 1.5rem;
|
margin-top: 1.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.topicDetailsItem {
|
.topicDetailsItem {
|
||||||
|
align-items: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
margin-right: 1rem;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.topicDetailsIcon {
|
.topicDetailsIcon {
|
||||||
|
|
|
@ -1,19 +1,8 @@
|
||||||
.subscribersContainer {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
font-size: 1.4rem;
|
|
||||||
margin-top: 1.5rem;
|
|
||||||
|
|
||||||
@include media-breakpoint-down(md) {
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.subscribers {
|
.subscribers {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
margin: 0 2% 1rem;
|
margin: 0 1rem 0 0;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
border-bottom: unset !important;
|
border-bottom: unset !important;
|
||||||
|
|
||||||
|
@ -44,7 +33,6 @@
|
||||||
|
|
||||||
.subscribersCounter {
|
.subscribersCounter {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
margin-left: 1rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
|
@ -55,3 +43,8 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.subscribersList {
|
||||||
|
display: flex;
|
||||||
|
margin-right: 0.6rem;
|
||||||
|
}
|
||||||
|
|
|
@ -18,12 +18,14 @@ export const Subscribers = (props: Props) => {
|
||||||
const {t} = useLocalize()
|
const {t} = useLocalize()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div class={styles.subscribersContainer}>
|
<>
|
||||||
<a href="?m=followers" class={styles.subscribers}>
|
<a href="?m=followers" class={styles.subscribers}>
|
||||||
<Show when={props.followers && props.followers.length > 0}>
|
<Show when={props.followers && props.followers.length > 0}>
|
||||||
|
<div class={styles.subscribersList}>
|
||||||
<For each={props.followers.slice(0, 3)}>
|
<For each={props.followers.slice(0, 3)}>
|
||||||
{(f) => <Userpic size={'XS'} name={f.name} userpic={f.pic} class={styles.subscribersItem}/>}
|
{(f) => <Userpic size={'XS'} name={f.name} userpic={f.pic} class={styles.subscribersItem}/>}
|
||||||
</For>
|
</For>
|
||||||
|
</div>
|
||||||
</Show>
|
</Show>
|
||||||
<div class={styles.subscribersCounter}>
|
<div class={styles.subscribersCounter}>
|
||||||
{t('SubscriberWithCount', {
|
{t('SubscriberWithCount', {
|
||||||
|
@ -34,6 +36,7 @@ export const Subscribers = (props: Props) => {
|
||||||
|
|
||||||
<a href="?m=following" class={styles.subscribers}>
|
<a href="?m=following" class={styles.subscribers}>
|
||||||
<Show when={props.following && props.following.length > 0}>
|
<Show when={props.following && props.following.length > 0}>
|
||||||
|
<div class={styles.subscribersList}>
|
||||||
<For each={props.following.slice(0, 3)}>
|
<For each={props.following.slice(0, 3)}>
|
||||||
{(f) => {
|
{(f) => {
|
||||||
if ('name' in f) {
|
if ('name' in f) {
|
||||||
|
@ -41,12 +44,14 @@ export const Subscribers = (props: Props) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('title' in f) {
|
if ('title' in f) {
|
||||||
return <Userpic size={'XS'} name={f.title} userpic={f.pic} class={styles.subscribersItem} />
|
return <Userpic size={'XS'} name={f.title} userpic={f.pic}
|
||||||
|
class={styles.subscribersItem}/>
|
||||||
}
|
}
|
||||||
|
|
||||||
return null
|
return null
|
||||||
}}
|
}}
|
||||||
</For>
|
</For>
|
||||||
|
</div>
|
||||||
</Show>
|
</Show>
|
||||||
<div class={styles.subscribersCounter}>
|
<div class={styles.subscribersCounter}>
|
||||||
{t('SubscriptionWithCount', {
|
{t('SubscriptionWithCount', {
|
||||||
|
@ -54,6 +59,6 @@ export const Subscribers = (props: Props) => {
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@ export const TopicPage = (props: PageProps) => {
|
||||||
const usePrerenderedData = props.topic?.slug === slug()
|
const usePrerenderedData = props.topic?.slug === slug()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<PageLayout title={props.seo.title}>
|
<PageLayout title={props.seo?.title}>
|
||||||
<ReactionsProvider>
|
<ReactionsProvider>
|
||||||
<Show when={isLoaded()} fallback={<Loading />}>
|
<Show when={isLoaded()} fallback={<Loading />}>
|
||||||
<TopicView
|
<TopicView
|
||||||
|
|
Loading…
Reference in New Issue
Block a user