client: improve markdown styles

This commit is contained in:
Max Leiter 2022-03-22 20:27:39 -07:00
parent eaffebb53c
commit 30e32e33cf
No known key found for this signature in database
GPG key ID: A3512F2F2F17EBDA
4 changed files with 3 additions and 15 deletions

View file

@ -47,7 +47,7 @@ const MarkdownPreview = ({ height = 500, fileId, content, title }: Props) => {
fetchPost() fetchPost()
}, [content, fileId, title]) }, [content, fileId, title])
return (<> return (<>
{isLoading ? <div>Loading...</div> : <div data-theme={theme} className={styles.markdownPreview} dangerouslySetInnerHTML={{ __html: preview }} style={{ {isLoading ? <div>Loading...</div> : <article data-theme={theme} className={styles.markdownPreview} dangerouslySetInnerHTML={{ __html: preview }} style={{
height height
}} />} }} />}
</>) </>)

View file

@ -75,19 +75,10 @@
content: ""; content: "";
} }
.markdownPreview ul ul {
list-style: circle;
}
.markdownPreview ul ul li {
margin-left: var(--gap);
}
.markdownPreview code { .markdownPreview code {
border-radius: 3px; border-radius: 3px;
white-space: pre-wrap; white-space: pre-wrap;
word-wrap: break-word; word-wrap: break-word;
padding: 2px 4px;
} }
.markdownPreview code::before, .markdownPreview code::before,

View file

@ -1,6 +1,7 @@
import { marked } from 'marked' import { marked } from 'marked'
import Highlight, { defaultProps, Language } from 'prism-react-renderer' import Highlight, { defaultProps, Language, } from 'prism-react-renderer'
import { renderToStaticMarkup } from 'react-dom/server' import { renderToStaticMarkup } from 'react-dom/server'
//@ts-ignore //@ts-ignore
delete defaultProps.theme delete defaultProps.theme
// import linkStyles from '../components/link/link.module.css' // import linkStyles from '../components/link/link.module.css'

View file

@ -8,10 +8,6 @@ article > * + * {
margin-top: 2em; margin-top: 2em;
} }
article p {
color: var(--article-color);
}
article img { article img {
max-width: 100%; max-width: 100%;
/* width: var(--main-content); */ /* width: var(--main-content); */