permalinks: pad sigils, unify author timestamp size systemwide

fixes urbit/landscape#759
This commit is contained in:
James Acklin 2021-05-03 12:18:14 -04:00
parent 23c56b35d2
commit e2f17527ca
2 changed files with 33 additions and 25 deletions

View File

@ -38,6 +38,7 @@ function TranscludedLinkNode(props: {
pt='12px'
pl='12px'
size='24'
sigilPadding='6'
showImage
ship={node.post.author}
date={node.post?.['time-sent']}
@ -93,6 +94,7 @@ function TranscludedComment(props: {
pt='12px'
pl='12px'
size='24'
sigilPadding='6'
showImage
ship={comment.post.author}
date={comment.post?.["time-sent"]}
@ -130,6 +132,7 @@ function TranscludedPublishNode(props: {
pl='12px'
pt='12px'
size='24'
sigilPadding='6'
showImage
ship={post.post.author}
date={post.post?.["time-sent"]}
@ -173,6 +176,7 @@ export function TranscludedPost(props: {
pt='12px'
pl='12px'
size='24'
sigilPadding='6'
showImage
ship={post.author}
date={post?.["time-sent"]}

View File

@ -25,6 +25,7 @@ interface AuthorProps {
api?: GlobalApi;
size?: number;
lineHeight?: string;
isRelativeTime?: boolean;
}
// eslint-disable-next-line max-lines-per-function
@ -97,7 +98,8 @@ export default function Author(props: AuthorProps & PropFunc<typeof Box>): React
e.stopPropagation();
toggleOverlay();
}}
height={size}
height={`${size}px`}
overflow='hidden'
position='relative'
cursor='pointer'
>
@ -107,31 +109,33 @@ export default function Author(props: AuthorProps & PropFunc<typeof Box>): React
</ProfileOverlay>
)}
</Box>
<Box
ml={showImage ? 2 : 0}
color='black'
fontSize='1'
cursor='pointer'
lineHeight={lineHeight}
fontFamily={showNickname ? 'sans' : 'mono'}
fontWeight={showNickname ? '500' : '400'}
mr={showNickname ? 0 : "2px"}
mt={showNickname ? 0 : "0px"}
onClick={doCopy}
>
{copyDisplay}
<Box display='flex' alignItems='baseline'>
<Box
ml={showImage ? 2 : 0}
color='black'
fontSize='1'
cursor='pointer'
lineHeight={lineHeight}
fontFamily={showNickname ? 'sans' : 'mono'}
fontWeight={showNickname ? '500' : '400'}
mr={showNickname ? 0 : '2px'}
mt={showNickname ? 0 : '0px'}
onClick={doCopy}
>
{copyDisplay}
</Box>
{ !dontShowTime && time && (
<Timestamp
height="fit-content"
relative={isRelativeTime}
stamp={stamp}
fontSize={0}
time={time}
ml={2}
color={unread ? 'blue' : 'gray'} />
)}
{children}
</Box>
{ !dontShowTime && time && (
<Timestamp
height="fit-content"
relative={isRelativeTime}
stamp={stamp}
fontSize={1}
time={time}
ml={2}
color={unread ? 'blue' : 'gray'} />
)}
{children}
</Row>
);
}