mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Fix breaking on author styles
This commit is contained in:
parent
5ba2343cc6
commit
c7bc590ae8
3 changed files with 7 additions and 8 deletions
|
|
@ -70,14 +70,16 @@ export const DescriptionStyle = {
|
||||||
|
|
||||||
export const AuthorInfoStyle = {
|
export const AuthorInfoStyle = {
|
||||||
maxLines: '1',
|
maxLines: '1',
|
||||||
textOverflow: 'ellipsis',
|
|
||||||
whiteSpace: 'nowrap',
|
|
||||||
maxWidth: '240px',
|
maxWidth: '240px',
|
||||||
color: '$thNotebookSubtle',
|
color: '$thNotebookSubtle',
|
||||||
fontSize: '12px',
|
fontSize: '12px',
|
||||||
fontWeight: '400',
|
fontWeight: '400',
|
||||||
fontFamily: '$display',
|
fontFamily: '$display',
|
||||||
lineHeight: '1',
|
lineHeight: '1',
|
||||||
|
wordWrap: 'break-word',
|
||||||
|
whiteSpace: 'nowrap',
|
||||||
|
overflow: 'hidden',
|
||||||
|
textOverflow: 'ellipsis',
|
||||||
}
|
}
|
||||||
|
|
||||||
export const timeAgo = (date: string | undefined): string => {
|
export const timeAgo = (date: string | undefined): string => {
|
||||||
|
|
|
||||||
|
|
@ -249,7 +249,7 @@ const LibraryGridCardContent = (props: LinkedItemCardProps): JSX.Element => {
|
||||||
>
|
>
|
||||||
{props.item.author}
|
{props.item.author}
|
||||||
{props.item.author && originText && ' | '}
|
{props.item.author && originText && ' | '}
|
||||||
<SpanBox css={{ textDecoration: 'underline' }}>{originText}</SpanBox>
|
{originText}
|
||||||
</SpanBox>
|
</SpanBox>
|
||||||
|
|
||||||
<HStack
|
<HStack
|
||||||
|
|
|
||||||
|
|
@ -279,19 +279,16 @@ export function LibraryListCardContent(
|
||||||
<LibraryItemMetadata item={props.item} showProgress={true} />
|
<LibraryItemMetadata item={props.item} showProgress={true} />
|
||||||
</HStack>
|
</HStack>
|
||||||
|
|
||||||
<Box css={{ ...TitleStyle, width: '80%' }}>{props.item.title}</Box>
|
<Box css={{ ...TitleStyle }}>{props.item.title}</Box>
|
||||||
{(props.item.author?.length ?? 0 + originText.length) > 0 && (
|
{(props.item.author?.length ?? 0 + originText.length) > 0 && (
|
||||||
<SpanBox
|
<SpanBox
|
||||||
css={{
|
css={{
|
||||||
...AuthorInfoStyle,
|
...AuthorInfoStyle,
|
||||||
maxWidth: '90%',
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{props.item.author}
|
{props.item.author}
|
||||||
{props.item.author && originText && ' | '}
|
{props.item.author && originText && ' | '}
|
||||||
<SpanBox css={{ textDecoration: 'underline' }}>
|
{originText}
|
||||||
{originText}
|
|
||||||
</SpanBox>
|
|
||||||
</SpanBox>
|
</SpanBox>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue