Merge pull request #4555 from urbit/mp/landscape/css-regressions

landscape: two css regressions
This commit is contained in:
matildepark 2021-03-08 14:55:22 -05:00 committed by GitHub
commit 73d26a4ff0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 6 deletions

View File

@ -156,7 +156,8 @@ h2 {
blockquote {
padding: 0 0 0 16px;
margin: 0;
border-left: 1px solid black;
color: inherit;
border-left: 1px solid;
}
:root {
@ -173,6 +174,7 @@ blockquote {
height: 100% !important;
width: 100% !important;
cursor: text;
color: inherit;
background: transparent;
}
@ -308,9 +310,6 @@ pre.CodeMirror-placeholder.CodeMirror-line-like {
/* dark */
@media (prefers-color-scheme: dark) {
blockquote {
border-left: 1px solid inherit;
}
/* codemirror */
.chat .cm-s-tlon.CodeMirror {

View File

@ -28,6 +28,7 @@ export const MarkdownField = ({
width="100%"
display="flex"
flexDirection="column"
color="black"
{...rest}
>
<MarkdownEditor

View File

@ -1,5 +1,5 @@
import React, { useState, useEffect } from 'react';
import { Box, Text, Col } from '@tlon/indigo-react';
import { Box, Text, Col, Anchor } from '@tlon/indigo-react';
import ReactMarkdown from 'react-markdown';
import bigInt from 'big-integer';
@ -32,6 +32,14 @@ export function Note(props: NoteProps & RouteComponentProps) {
const { notebook, note, contacts, ship, book, api, rootUrl, baseUrl, group } = props;
const editCommentId = props.match.params.commentId;
const renderers = {
link: ({ href, children }) => {
return (
<Anchor display="inline" target="_blank" href={href}>{children}</Anchor>
)
}
};
const deletePost = async () => {
setDeleting(true);
const indices = [note.post.index];
@ -107,7 +115,7 @@ export function Note(props: NoteProps & RouteComponentProps) {
</Box>
</Col>
<Box color="black" className="md" style={{ overflowWrap: 'break-word', overflow: 'hidden' }}>
<ReactMarkdown source={body} linkTarget={'_blank'} />
<ReactMarkdown source={body} linkTarget={'_blank'} renderers={renderers} />
</Box>
<NoteNavigation
notebook={notebook}

View File

@ -41,6 +41,8 @@
cursor: text;
font-size: 12px;
line-height: 20px;
background: inherit;
color: inherit;
}
.publish .CodeMirror * {