1
0
Fork 0

Add github markdown css styles

This commit is contained in:
Amarpreet Minhas 2019-08-03 21:28:31 -04:00
parent b4c9b0d5d8
commit 3e2172ac36
7 changed files with 23 additions and 8 deletions

View file

@ -1,4 +1,3 @@
# TODO
1. Fix wrapping on code blocks
2. Add filtering posts by tags
1. Add filtering posts by tags

7
package-lock.json generated
View file

@ -5396,6 +5396,11 @@
"assert-plus": "^1.0.0"
}
},
"github-markdown-css": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/github-markdown-css/-/github-markdown-css-3.0.1.tgz",
"integrity": "sha512-9G5CIPsHoyk5ObDsb/H4KTi23J8KE1oDd4KYU51qwqeM+lKWAiO7abpSgCkyWswgmSKBiuE7/4f8xUz7f2qAiQ=="
},
"glob": {
"version": "7.1.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
@ -6757,7 +6762,7 @@
"bundled": true,
"optional": true,
"requires": {
"ms": "2.1.1"
"ms": "^2.1.1"
}
},
"deep-extend": {

View file

@ -4,6 +4,7 @@
"private": true,
"dependencies": {
"axios": "^0.18.0",
"github-markdown-css": "^3.0.1",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-markdown": "^4.0.8",

View file

@ -1,4 +1,5 @@
import React from 'react';
import 'github-markdown-css'
import ReactMarkdown from 'react-markdown';
import AboutMarkdown from '../static/about.md';
@ -15,8 +16,8 @@ class About extends React.Component {
render () {
const { markdown } = this.state;
return (
<div className="content">
<ReactMarkdown source={markdown }/>
<div className="markdown-body">
<ReactMarkdown source={markdown} />
</div>
);
}

View file

@ -1,5 +1,6 @@
import React from 'react';
import ReactMarkdown from 'react-markdown';
import 'github-markdown-css'
import { connect } from 'react-redux';
import { fetchPost } from '../actions';
import { Link } from 'react-router-dom';
@ -32,7 +33,9 @@ class Post extends React.Component {
<h1><b><u><Link to={"/posts/" + post.slug}>{post.title}</Link></u></b></h1>
<h3><b>By <Link to={"/users/"+ post.author}>{post.author}</Link></b></h3>
<h4>Posted {post.time_published}</h4>
<ReactMarkdown source={post.content} />
<div className="markdown-body">
<ReactMarkdown source={post.content} />
</div>
</div>
</div>
</div>

View file

@ -1,5 +1,6 @@
import React from 'react';
import ReactMarkdown from 'react-markdown';
import 'github-markdown-css'
import { connect } from 'react-redux';
import { fetchPosts } from '../actions';
import { Link } from 'react-router-dom';
@ -22,7 +23,9 @@ class PostList extends React.Component {
<h2><b><u><Link to={"/posts/" + post.slug}>{post.title}</Link></u></b></h2>
<h3><b>By <Link to={"/users/"+ post.author}>{post.author}</Link></b></h3>
<h4>Posted {post.time_published}</h4>
<ReactMarkdown source={post.content} />
<div className="markdown-body">
<ReactMarkdown source={post.content} />
</div>
</div>
</div>
</div>

View file

@ -1,5 +1,6 @@
import React from 'react';
import ReactMarkdown from 'react-markdown';
import 'github-markdown-css'
import { connect } from 'react-redux';
import { fetchUserProfile } from '../actions';
import { Link } from 'react-router-dom';
@ -26,7 +27,9 @@ class User extends React.Component {
<h2><b><u><Link to={"/posts/" + post.slug}>{post.title}</Link></u></b></h2>
<h3><b>By <Link to={"/users/"+ post.author}>{post.author}</Link></b></h3>
<h4>Posted {post.time_published}</h4>
<ReactMarkdown source={post.content} />
<div className="markdown-body">
<ReactMarkdown source={post.content} />
</div>
</div>
</div>
</div>