Topics list fixes
This commit is contained in:
parent
ece5f2505f
commit
4c787fe49c
|
@ -314,7 +314,7 @@ export const AuthorCard = (props: Props) => {
|
||||||
isAuthor(subscription) ? (
|
isAuthor(subscription) ? (
|
||||||
<AuthorBadge author={subscription} />
|
<AuthorBadge author={subscription} />
|
||||||
) : (
|
) : (
|
||||||
<TopicBadge topic={subscription} />
|
<TopicBadge topic={subscription} subscriptionsMode={true} />
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
</For>
|
</For>
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
margin-bottom: 1.6rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.basicInfo {
|
.basicInfo {
|
||||||
|
@ -19,26 +18,29 @@
|
||||||
|
|
||||||
.info {
|
.info {
|
||||||
@include font-size(1.4rem);
|
@include font-size(1.4rem);
|
||||||
|
|
||||||
border: none;
|
border: none;
|
||||||
display: flex;
|
//display: flex;
|
||||||
flex-direction: column;
|
//flex-direction: column;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: unset;
|
background: unset;
|
||||||
|
color: inherit;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
background: var(--background-color-invert);
|
||||||
|
color: var(--default-color-invert);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
@include font-size(2.2rem);
|
@include font-size(2.2rem);
|
||||||
|
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-bottom: 0.8rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.description {
|
.description {
|
||||||
@include font-size(1.6rem);
|
@include font-size(1.6rem);
|
||||||
|
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
|
margin: 0.8rem 0;
|
||||||
-webkit-line-clamp: 3;
|
-webkit-line-clamp: 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -47,6 +49,7 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
|
margin-bottom: -1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.subscribeButton {
|
.subscribeButton {
|
||||||
|
|
|
@ -15,6 +15,7 @@ type Props = {
|
||||||
topic: Topic
|
topic: Topic
|
||||||
minimizeSubscribeButton?: boolean
|
minimizeSubscribeButton?: boolean
|
||||||
showStat?: boolean
|
showStat?: boolean
|
||||||
|
subscriptionsMode?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export const TopicBadge = (props: Props) => {
|
export const TopicBadge = (props: Props) => {
|
||||||
|
@ -52,15 +53,15 @@ export const TopicBadge = (props: Props) => {
|
||||||
<div class={styles.basicInfo}>
|
<div class={styles.basicInfo}>
|
||||||
<a href={`/topic/${props.topic.slug}`} class={styles.info}>
|
<a href={`/topic/${props.topic.slug}`} class={styles.info}>
|
||||||
<span class={styles.title}>{title()}</span>
|
<span class={styles.title}>{title()}</span>
|
||||||
<Show
|
|
||||||
when={props.topic.body}
|
<Show when={props.topic.body}>
|
||||||
fallback={
|
<div innerHTML={props.topic.body} class={clsx('text-truncate', styles.description)} />
|
||||||
|
</Show>
|
||||||
|
|
||||||
|
<Show when={props.subscriptionsMode && !props.topic.body}>
|
||||||
<div class={styles.description}>
|
<div class={styles.description}>
|
||||||
{t('PublicationsWithCount', { count: props.topic?.stat?.shouts ?? 0 })}
|
{t('PublicationsWithCount', { count: props.topic?.stat?.shouts ?? 0 })}
|
||||||
</div>
|
</div>
|
||||||
}
|
|
||||||
>
|
|
||||||
<div innerHTML={props.topic.body} class={clsx('text-truncate', styles.description)} />
|
|
||||||
</Show>
|
</Show>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user