Merge remote-tracking branch 'wpioneer/master'

This commit is contained in:
Ihor Orlovskyi 2016-12-09 22:42:26 +02:00
commit 7ade116485
9 changed files with 42 additions and 49 deletions

View File

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2015 gatsbyjs
Copyright (c) 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -23,16 +23,16 @@ Install this starter (assuming Gatsby is installed) by running from your CLI:
[Statinamic port](https://github.com/thangngoc89/statinamic-theme-lumen) by [Khoa Nguyen](https://github.com/thangngoc89)
## License
The MIT license.
The MIT License (MIT)
Copyright (c) 2016 Alexandr Shelepenok [ashk.io](http://ashk.io)
Copyright (c) 2016
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

View File

@ -10,15 +10,15 @@ class SiteNav extends React.Component {
<nav className='blog-nav'>
<ul>
<li>
<Link to="/" className={ location.pathname === prefixLink('/') ? "current" : null }> Articles
<Link to="/" activeClassName="current" onlyActiveOnIndex> Articles
</Link>
</li>
<li>
<Link to="/about/" className={ location.pathname === prefixLink('/about/') ? "current" : null }> About me
<Link to="/about/" activeClassName="current"> About me
</Link>
</li>
<li>
<Link to="/contact/" className={ location.pathname === prefixLink('/contact/') ? "current" : null }> Contact me
<Link to="/contact/" activeClassName="current"> Contact me
</Link>
</li>
</ul>

View File

@ -2,7 +2,6 @@ import React from 'react'
import moment from 'moment'
import { RouteHandler, Link } from 'react-router'
import { prefixLink } from 'gatsby-helpers'
import DocumentTitle from 'react-document-title'
import access from 'safe-access'
import { config } from 'config'
import SiteSidebar from '../SiteSidebar'

View File

@ -1,7 +1,6 @@
import React from 'react'
import moment from 'moment'
import { RouteHandler, Link } from 'react-router'
import DocumentTitle from 'react-document-title'
import { prefixLink } from 'gatsby-helpers'
import access from 'safe-access'
import { config } from 'config'

View File

@ -1,5 +1,5 @@
import React from 'react'
import DocumentTitle from 'react-document-title'
import Helmet from 'react-helmet'
import { prefixLink } from 'gatsby-helpers'
const BUILD_TIME = new Date().getTime()
@ -11,7 +11,7 @@ module.exports = React.createClass({
},
render() {
const {body, route} = this.props
const title = DocumentTitle.rewind()
const {title} = Helmet.rewind()
const font = <link href='https://fonts.googleapis.com/css?family=Roboto:400,400italic,500,700&subset=latin,cyrillic' rel='stylesheet' type='text/css' />
let css
if (process.env.NODE_ENV === 'production') {
@ -24,9 +24,7 @@ module.exports = React.createClass({
<meta charSet="utf-8" />
<meta httpEquiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0 maximum-scale=5.0" />
<title>
{ title }
</title>
{ title.toComponent() }
{ font }
{ css }
</head>

View File

@ -34,14 +34,15 @@
"markdown-it": "^6.0.2",
"moment": "^2.14.1",
"react": "^15.3.0",
"react-document-title": "^2.0.2",
"react-dom": "^15.3.0",
"react-ga": "^2.1.2",
"react-helmet": "^3.2.2",
"react-router": "^2.6.1",
"safe-access": "^0.1.0",
"underscore.string": "^3.2.3"
},
"devDependencies": {
"autoprefixer": "^6.3.7",
"babel-core": "^6.11.4",
"babel-loader": "^6.2.4",
"babel-preset-react-hmre": "^1.1.1",
@ -51,18 +52,17 @@
"eslint-plugin-import": "^1.12.0",
"eslint-plugin-jsx-a11y": "^2.0.1",
"eslint-plugin-react": "^6.0.0",
"file-loader": "^0.9.0",
"gh-pages": "^0.11.0",
"image-webpack-loader": "^2.0.0",
"lost": "^7.0.3",
"null-loader": "^0.1.1",
"postcss-loader": "^0.9.1",
"react-transform-catch-errors": "^1.0.2",
"react-transform-hmr": "^1.0.4",
"redbox-react": "^1.2.10",
"style-loader": "^0.13.1",
"webpack": "^1.13.1",
"autoprefixer": "^6.3.7",
"file-loader": "^0.9.0",
"rucksack-css": "^0.8.5",
"lost": "^7.0.3"
"style-loader": "^0.13.1",
"webpack": "^1.13.1"
}
}

View File

@ -2,7 +2,7 @@ import React from 'react'
import { Link } from 'react-router'
import sortBy from 'lodash/sortBy'
import moment from 'moment'
import DocumentTitle from 'react-document-title'
import Helmet from 'react-helmet'
import { prefixLink } from 'gatsby-helpers'
import access from 'safe-access'
import { config } from 'config'
@ -39,8 +39,8 @@ class SiteIndex extends React.Component {
})
return (
<DocumentTitle title={ config.siteTitle }>
<div>
<Helmet title={ config.siteTitle }/>
<SiteSidebar {...this.props}/>
<div className='content'>
<div className='main'>
@ -50,7 +50,6 @@ class SiteIndex extends React.Component {
</div>
</div>
</div>
</DocumentTitle>
)
}
}

View File

@ -1,5 +1,5 @@
import React from 'react'
import DocumentTitle from 'react-document-title'
import Helmet from 'react-helmet'
import SitePost from '../components/SitePost'
import SitePage from '../components/SitePage'
import { config } from 'config'
@ -19,11 +19,10 @@ class MarkdownWrapper extends React.Component {
}
return (
<DocumentTitle title={ `${post.title} - ${config.siteTitle}` }>
<div>
<Helmet title={ `${post.title} - ${config.siteTitle}` }/>
{ template }
</div>
</DocumentTitle>
);
}
}