client: improve markdown styles

This commit is contained in:
Max Leiter 2022-03-22 20:27:39 -07:00
parent eaffebb53c
commit 30e32e33cf
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
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()
}, [content, fileId, title])
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
}} />}
</>)

View file

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

View file

@ -1,6 +1,7 @@
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'
//@ts-ignore
delete defaultProps.theme
// import linkStyles from '../components/link/link.module.css'

View file

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