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