Fixed author link style in dark blocks
This commit is contained in:
parent
af5379ebf5
commit
11cd9641e0
|
@ -49,3 +49,16 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.authorLinkFloorImportant {
|
||||||
|
.link {
|
||||||
|
&:hover {
|
||||||
|
background: #fff !important;
|
||||||
|
|
||||||
|
.name {
|
||||||
|
background: none;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -9,11 +9,16 @@ type Props = {
|
||||||
author: Author
|
author: Author
|
||||||
size?: 'XS' | 'M' | 'L'
|
size?: 'XS' | 'M' | 'L'
|
||||||
class?: string
|
class?: string
|
||||||
|
isFloorImportant?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export const AuthorLink = (props: Props) => {
|
export const AuthorLink = (props: Props) => {
|
||||||
return (
|
return (
|
||||||
<div class={clsx(styles.AuthorLink, props.class, styles[props.size ?? 'M'])}>
|
<div
|
||||||
|
class={clsx(styles.AuthorLink, props.class, styles[props.size ?? 'M'], {
|
||||||
|
[styles.authorLinkFloorImportant]: props.isFloorImportant,
|
||||||
|
})}
|
||||||
|
>
|
||||||
<a class={styles.link} href={`/author/${props.author.slug}`}>
|
<a class={styles.link} href={`/author/${props.author.slug}`}>
|
||||||
<Userpic size={props.size ?? 'M'} name={props.author.name} userpic={props.author.userpic} />
|
<Userpic size={props.size ?? 'M'} name={props.author.name} userpic={props.author.userpic} />
|
||||||
<div class={styles.name}>{props.author.name}</div>
|
<div class={styles.name}>{props.author.name}</div>
|
||||||
|
|
|
@ -210,7 +210,13 @@ export const ArticleCard = (props: ArticleCardProps) => {
|
||||||
<div class={styles.shoutAuthor}>
|
<div class={styles.shoutAuthor}>
|
||||||
<For each={props.article.authors}>
|
<For each={props.article.authors}>
|
||||||
{(author) => {
|
{(author) => {
|
||||||
return <AuthorLink size={'XS'} author={author} />
|
return (
|
||||||
|
<AuthorLink
|
||||||
|
size={'XS'}
|
||||||
|
author={author}
|
||||||
|
isFloorImportant={props.settings.isFloorImportant || props.settings?.isWithCover}
|
||||||
|
/>
|
||||||
|
)
|
||||||
}}
|
}}
|
||||||
</For>
|
</For>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user