Followers list on authors page.
Replaced "compact" props with "hideWriteButton" in the author card component.
This commit is contained in:
parent
1c1cfe9b40
commit
9b22627908
|
@ -101,7 +101,6 @@ export const Comment = (props: Props) => {
|
|||
<Userpic
|
||||
user={comment().createdBy as Author}
|
||||
isBig={false}
|
||||
isAuthorsList={false}
|
||||
class={clsx({
|
||||
[styles.compactUserpic]: props.compact
|
||||
})}
|
||||
|
|
|
@ -135,10 +135,12 @@ export const FullArticle = (props: ArticleProps) => {
|
|||
)}
|
||||
</For>
|
||||
</div>
|
||||
<div
|
||||
class={styles.shoutCover}
|
||||
style={{ 'background-image': `url('${props.article.cover}')` }}
|
||||
/>
|
||||
<Show when={props.article.cover}>
|
||||
<div
|
||||
class={styles.shoutCover}
|
||||
style={{ 'background-image': `url('${props.article.cover}')` }}
|
||||
/>
|
||||
</Show>
|
||||
</div>
|
||||
|
||||
<Show when={media() && props.article.layout !== 'image'}>
|
||||
|
@ -254,7 +256,7 @@ export const FullArticle = (props: ArticleProps) => {
|
|||
<For each={props.article.authors}>
|
||||
{(a) => (
|
||||
<div class="col-xl-6">
|
||||
<AuthorCard author={a} compact={false} hasLink={true} liteButtons={true} />
|
||||
<AuthorCard author={a} hasLink={true} liteButtons={true} />
|
||||
</div>
|
||||
)}
|
||||
</For>
|
||||
|
|
|
@ -16,7 +16,7 @@ import { useLocalize } from '../../context/localize'
|
|||
|
||||
interface AuthorCardProps {
|
||||
caption?: string
|
||||
compact?: boolean
|
||||
hideWriteButton?: boolean
|
||||
hideDescription?: boolean
|
||||
hideFollow?: boolean
|
||||
hasLink?: boolean
|
||||
|
@ -166,7 +166,7 @@ export const AuthorCard = (props: AuthorCardProps) => {
|
|||
</button>
|
||||
</Show>
|
||||
|
||||
<Show when={!props.compact && !props.isAuthorsList}>
|
||||
<Show when={!props.hideWriteButton}>
|
||||
<button
|
||||
class={styles.button}
|
||||
classList={{
|
||||
|
|
|
@ -6,7 +6,7 @@ export const AuthorFull = (props: { author: Author }) => {
|
|||
return (
|
||||
<div class="row">
|
||||
<div class="col-md-9 col-lg-8 user-details">
|
||||
<AuthorCard author={props.author} compact={false} isAuthorPage={true} />
|
||||
<AuthorCard author={props.author} isAuthorPage={true} />
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
|
|
@ -69,7 +69,7 @@ export const Beside = (props: BesideProps) => {
|
|||
<Show when={props.wrapper === 'author'}>
|
||||
<AuthorCard
|
||||
author={value as Author}
|
||||
compact={true}
|
||||
hideWriteButton={true}
|
||||
hasLink={true}
|
||||
truncateBio={true}
|
||||
/>
|
||||
|
|
|
@ -207,9 +207,15 @@ export const AuthorView = (props: AuthorProps) => {
|
|||
</Match>
|
||||
<Match when={searchParams().by === 'followed'}>
|
||||
<div class="wide-container">
|
||||
<ul class={stylesArticle.comments}>
|
||||
<For each={followers()}>{(follower: Author) => <AuthorCard author={follower} />}</For>
|
||||
</ul>
|
||||
<div class="row">
|
||||
<For each={followers()}>
|
||||
{(follower: Author) => (
|
||||
<div class="col-md-6 col-lg-4">
|
||||
<AuthorCard author={follower} hideWriteButton={true} hasLink={true} />
|
||||
</div>
|
||||
)}
|
||||
</For>
|
||||
</div>
|
||||
</div>
|
||||
</Match>
|
||||
<Match when={searchParams().by === 'rating'}>
|
||||
|
|
|
@ -124,7 +124,7 @@ export const FeedView = () => {
|
|||
<For each={topAuthors().slice(0, 5)}>
|
||||
{(author) => (
|
||||
<li>
|
||||
<AuthorCard author={author} compact={true} hasLink={true} />
|
||||
<AuthorCard author={author} hideWriteButton={true} hasLink={true} />
|
||||
</li>
|
||||
)}
|
||||
</For>
|
||||
|
@ -147,7 +147,7 @@ export const FeedView = () => {
|
|||
<AuthorCard
|
||||
author={comment.createdBy as Author}
|
||||
isFeedMode={true}
|
||||
compact={true}
|
||||
hideWriteButton={true}
|
||||
hideFollow={true}
|
||||
/>
|
||||
<div class={clsx('text-truncate', styles.commentArticleTitle)}>
|
||||
|
|
Loading…
Reference in New Issue
Block a user