diff --git a/src/components/About.js b/src/components/About.js index 815f43f..d568fa7 100644 --- a/src/components/About.js +++ b/src/components/About.js @@ -1,22 +1,23 @@ import React, {Component} from 'react'; import '../static/stylesheets/globals.scss'; -import './About.scss'; +import styles from './About.scss'; +import contentStyle from '../static/stylesheets/content.scss'; export default class About extends Component { render () { if (this.props.isLoading) { return ( -
+

Loading

); } return ( -
+

About

-
+
) diff --git a/src/components/Blog.js b/src/components/Blog.js index e7ddd22..5bebff2 100644 --- a/src/components/Blog.js +++ b/src/components/Blog.js @@ -1,13 +1,14 @@ import React, {Component} from 'react'; import '../static/stylesheets/globals.scss'; import styles from './Blog.scss'; +import contentStyle from '../static/stylesheets/content.scss'; export default class Blog extends Component { render() { if (this.props.isLoading) { return ( -
+

Loading

); @@ -35,10 +36,10 @@ export default class Blog extends Component { ) return ( -
+

Blog

-
+
{posts}
diff --git a/src/components/NotFoundPage.js b/src/components/NotFoundPage.js index 23eb08f..9ee555e 100644 --- a/src/components/NotFoundPage.js +++ b/src/components/NotFoundPage.js @@ -1,5 +1,6 @@ import React from 'react'; import '../static/stylesheets/globals.scss'; +import contentStyle from '../static/stylesheets/content.scss'; export const NotFoundPage = (props) => { if (props.location.pathname === '/') { @@ -7,7 +8,7 @@ export const NotFoundPage = (props) => { } return (
-
+

Uhm... WHAT?

Looks like you're lost

404 Page not found

diff --git a/src/components/Post.js b/src/components/Post.js index fd6cf11..49cc4b8 100644 --- a/src/components/Post.js +++ b/src/components/Post.js @@ -1,6 +1,7 @@ import React, {Component} from 'react'; import '../static/stylesheets/globals.scss'; -import './Post.scss'; +import contentStyle from '../static/stylesheets/content.scss'; +import styles from './Post.scss'; export default class Post extends Component { render() { @@ -12,15 +13,15 @@ export default class Post extends Component { } return ( -
+

{this.props.post.title}

-
-
+
+

{this.props.post.published}

-
+
diff --git a/src/components/Post.scss b/src/components/Post.scss index ed18413..e3ea681 100644 --- a/src/components/Post.scss +++ b/src/components/Post.scss @@ -1,10 +1,10 @@ @import "../static/stylesheets/variables.scss"; -.post-content { +.postContent { clear: both; } -.post-date { +.postDate { float: right; h3 { font-weight: normal diff --git a/src/static/stylesheets/content.scss b/src/static/stylesheets/content.scss new file mode 100644 index 0000000..50c0977 --- /dev/null +++ b/src/static/stylesheets/content.scss @@ -0,0 +1,28 @@ +@import "./variables.scss"; + +.contentWrapper { + margin-left: 320px; + overflow: auto; + padding: 20px; + h1 { + text-align: center; + } + a { + color: $blue; + } + @media screen and (max-width: $break-medium) { + width: 100%; + float: none; + } + @media screen and (min-width: $break-large) { + margin-left: 500px; + } +} + +.content { + box-sizing: border-box; + margin: 0 auto; + @media screen and (min-width: $break-large) { + width: 90%; + } +} diff --git a/src/static/stylesheets/globals.scss b/src/static/stylesheets/globals.scss index 4c71fbc..541fb21 100644 --- a/src/static/stylesheets/globals.scss +++ b/src/static/stylesheets/globals.scss @@ -1,24 +1,5 @@ @import "./variables.scss"; -:global(.content-wrapper) { - margin-left: 320px; - overflow: auto; - padding: 20px; - h1 { - text-align: center; - } - a { - color: $blue; - } - @media screen and (max-width: $break-medium) { - width: 100%; - float: none; - } - @media screen and (min-width: $break-large) { - margin-left: 500px; - } -} - :global(body) { font-family: $font-paragraph; color: $black; @@ -30,11 +11,3 @@ font-family: $font-header; } } - -:global(.content) { - box-sizing: border-box; - margin: 0 auto; - @media screen and (min-width: $break-large) { - width: 90%; - } -}