mirror of
https://github.com/urbit/shrub.git
synced 2024-11-30 22:15:47 +03:00
publish: amend snippets
This commit is contained in:
parent
25a5090f6f
commit
059b52ea23
@ -112,7 +112,7 @@ export function getComments(node: GraphNode): GraphNode {
|
||||
}
|
||||
|
||||
export function getSnippet(body: string) {
|
||||
const start = body.slice(0, 400);
|
||||
const start = body.slice(0, body.indexOf('\n', 2));
|
||||
return start === body ? start : `${start}...`;
|
||||
}
|
||||
|
||||
|
@ -62,13 +62,15 @@ export function NotePreview(props: NotePreviewProps) {
|
||||
return (
|
||||
<Link to={url}>
|
||||
<Col mb={4}>
|
||||
<WrappedBox mb={1}><Text bold>{title}</Text></WrappedBox>
|
||||
<WrappedBox mb={1} className="md">
|
||||
<WrappedBox mb={1}><Text bold fontSize='0'>{title}</Text></WrappedBox>
|
||||
<WrappedBox mb={1}>
|
||||
<Text fontSize='14px'>
|
||||
<ReactMarkdown
|
||||
unwrapDisallowed
|
||||
allowedTypes={["text", "root", "break", "paragraph"]}
|
||||
source={snippet}
|
||||
/>
|
||||
</Text>
|
||||
</WrappedBox>
|
||||
<Box color="gray" display="flex">
|
||||
<Box
|
||||
|
@ -187,7 +187,7 @@
|
||||
color:var(--gray);
|
||||
}
|
||||
|
||||
.md p {
|
||||
.md {
|
||||
line-height: 1.5;
|
||||
}
|
||||
.md code, .md pre {
|
||||
@ -201,7 +201,7 @@
|
||||
border-bottom-width: 1px;
|
||||
}
|
||||
|
||||
md img {
|
||||
.md img {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user