mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2025-08-10 11:20:34 +02:00
Init
This commit is contained in:
42
components/BlogPage/index.jsx
Normal file
42
components/BlogPage/index.jsx
Normal file
@@ -0,0 +1,42 @@
|
||||
import React from 'react'
|
||||
import moment from 'moment'
|
||||
import { RouteHandler, Link } from 'react-router'
|
||||
import { link } from 'gatsby-helpers'
|
||||
import DocumentTitle from 'react-document-title'
|
||||
import SidebarLeft from '../SidebarLeft'
|
||||
import access from 'safe-access'
|
||||
import { config } from 'config'
|
||||
|
||||
import './style.sss';
|
||||
|
||||
class BlogPage extends React.Component {
|
||||
render() {
|
||||
const { route } = this.props
|
||||
const post = route.page.data
|
||||
|
||||
return (
|
||||
<div>
|
||||
<SidebarLeft {...this.props}/>
|
||||
<div className='content'>
|
||||
<div className='main'>
|
||||
<div className='main-inner'>
|
||||
<div className='blog-page'>
|
||||
<div className='text'>
|
||||
<h1>{post.title}</h1>
|
||||
<div dangerouslySetInnerHTML={{__html: post.body}}/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
BlogPage.propTypes = {
|
||||
post: React.PropTypes.object.isRequired,
|
||||
pages: React.PropTypes.array,
|
||||
}
|
||||
|
||||
export default BlogPage
|
16
components/BlogPage/style.sss
Normal file
16
components/BlogPage/style.sss
Normal file
@@ -0,0 +1,16 @@
|
||||
.blog-page
|
||||
margin-bottom: 40px
|
||||
|
||||
.blog-page h1
|
||||
font-size: responsive 20px 36px
|
||||
margin-top: 0
|
||||
|
||||
.blog-page p
|
||||
font-size: responsive 14px 16px
|
||||
line-height: 1.5
|
||||
margin-top: 10px
|
||||
|
||||
@media (max-width: 900px)
|
||||
.blog-single .text,
|
||||
.blog-single .footer
|
||||
padding: 0 15px
|
Reference in New Issue
Block a user