permalinks: uniform appearance for collection links

fixes urbit/landscape#759
This commit is contained in:
James Acklin 2021-05-02 11:20:04 -04:00
parent 1d365d70c3
commit 4674559f2d

View File

@ -29,16 +29,38 @@ function TranscludedLinkNode(props: {
const [{ text }, link] = node.post.contents;
if('reference' in link) {
const permalink = referenceToPermalink(link).link;
return <PermalinkEmbed transcluded={transcluded + 1} api={api} link={permalink} association={assoc} />
return <PermalinkEmbed transcluded={transcluded + 1} api={api} link={permalink} association={assoc} />;
}
return (
<Box borderRadius="2" p="2" bg="scales.black05">
<Anchor underline={false} target="_blank" color="black" href={link.url}>
<Icon verticalAlign="bottom" mr="2" icon="ArrowExternal" />
{text}
</Anchor>
<Box>
<Author
pt='12px'
pl='12px'
size='24'
showImage
ship={node.post.author}
date={node.post?.['time-sent']}
/>
<Box
borderRadius='2'
mt='1'
ml='44px'
mr='3'
p='2'
display='inline-block'
bg='scales.black05'
>
<Anchor
underline={false}
target='_blank'
color='black'
href={link.url}
>
<Icon verticalAlign='bottom' mr='2' icon='ArrowExternal' />
{text}
</Anchor>
</Box>
</Box>
);
case 2: