Put some global css in external file

This commit is contained in:
Kyle Mathews 2016-02-21 18:37:37 -08:00
parent d70ecc146e
commit 9482c3f810
2 changed files with 20 additions and 21 deletions

View file

@ -1,3 +1,16 @@
body {
color: rgb(66,66,66);
}
h1,h2,h3,h4,h5,h6 {
color: rgb(44,44,44);
}
a {
color: rgb(42,93,173);
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
blockquote {
padding-left: 16.875px;
border-left: 6px solid lightgray;

26
html.js
View file

@ -11,6 +11,11 @@ export default class Html extends React.Component {
title = this.props.title
}
let cssLink
if (process.env.NODE_ENV === 'production') {
cssLink = <link rel="stylesheet" href={link('/styles.css')} />
}
return (
<html lang="en">
<head>
@ -23,26 +28,7 @@ export default class Html extends React.Component {
<title>{this.props.title}</title>
<link rel="shortcut icon" href={favicon} />
<TypographyStyle/>
<style
dangerouslySetInnerHTML={{
__html:
`
body {
color: rgb(66,66,66);
}
h1,h2,h3,h4,h5,h6 {
color: rgb(44,44,44);
}
a {
color: rgb(42,93,173);
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
`,
}}
/>
{cssLink}
</head>
<body className="landing-page">
<div id="react-mount" dangerouslySetInnerHTML={{ __html: body }} />