mirror of
				https://github.com/mastermindzh/rickvanlieshout.com
				synced 2025-11-04 02:29:46 +01:00 
			
		
		
		
	Version 1.0
This commit is contained in:
		
							
								
								
									
										10
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								README.md
									
									
									
									
									
								
							@@ -2,8 +2,16 @@
 | 
			
		||||
 | 
			
		||||
Gatsby starter for creating a blog
 | 
			
		||||
 | 
			
		||||
## Features
 | 
			
		||||
Inline CSS.
 | 
			
		||||
Clean and extensible code.
 | 
			
		||||
Six simple components: SiteSidebar, SiteNav, SiteLinks, SitePost, SitePage, ReadNext.
 | 
			
		||||
[peterramsing/lost](https://github.com/peterramsing/lost) as a base for Grid.
 | 
			
		||||
[matejlatin/Gutenberg](https://github.com/matejlatin/Gutenberg) as a base for Typography.
 | 
			
		||||
 | 
			
		||||
## Installing
 | 
			
		||||
Install this starter (assuming Gatsby is installed) by running from your CLI:
 | 
			
		||||
`gatsby new lumen https://github.com/hb-gatsby/gatsby-starter-lumen`
 | 
			
		||||
`gatsby new lumen https://github.com/wpioneer/gatsby-starter-lumen`
 | 
			
		||||
 | 
			
		||||
## Running in development
 | 
			
		||||
`gatsby develop`
 | 
			
		||||
 
 | 
			
		||||
@@ -2,11 +2,10 @@ import React from 'react'
 | 
			
		||||
import { RouteHandler, Link } from 'react-router'
 | 
			
		||||
import { prefixLink } from 'gatsby-helpers'
 | 
			
		||||
import { config } from 'config'
 | 
			
		||||
 | 
			
		||||
import './style.css'
 | 
			
		||||
import '../../static/fonts/fontawesome/style.css'
 | 
			
		||||
 | 
			
		||||
class BlogSocial extends React.Component {
 | 
			
		||||
class SiteLinks extends React.Component {
 | 
			
		||||
    render() {
 | 
			
		||||
 | 
			
		||||
        return (
 | 
			
		||||
@@ -40,4 +39,4 @@ class BlogSocial extends React.Component {
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export default BlogSocial
 | 
			
		||||
export default SiteLinks
 | 
			
		||||
@@ -1,10 +1,9 @@
 | 
			
		||||
import React from 'react'
 | 
			
		||||
import { RouteHandler, Link } from 'react-router'
 | 
			
		||||
import { prefixLink } from 'gatsby-helpers'
 | 
			
		||||
 | 
			
		||||
import './style.css'
 | 
			
		||||
 | 
			
		||||
class BlogNav extends React.Component {
 | 
			
		||||
class SiteNav extends React.Component {
 | 
			
		||||
    render() {
 | 
			
		||||
        const {location} = this.props
 | 
			
		||||
        return (
 | 
			
		||||
@@ -28,8 +27,8 @@ class BlogNav extends React.Component {
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
BlogNav.propTypes = {
 | 
			
		||||
SiteNav.propTypes = {
 | 
			
		||||
    location: React.PropTypes.object,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export default BlogNav
 | 
			
		||||
export default SiteNav
 | 
			
		||||
@@ -3,20 +3,19 @@ import moment from 'moment'
 | 
			
		||||
import { RouteHandler, Link } from 'react-router'
 | 
			
		||||
import { prefixLink } from 'gatsby-helpers'
 | 
			
		||||
import DocumentTitle from 'react-document-title'
 | 
			
		||||
import SidebarLeft from '../SidebarLeft'
 | 
			
		||||
import access from 'safe-access'
 | 
			
		||||
import { config } from 'config'
 | 
			
		||||
 | 
			
		||||
import SiteSidebar from '../SiteSidebar'
 | 
			
		||||
import './style.css';
 | 
			
		||||
 | 
			
		||||
class BlogPage extends React.Component {
 | 
			
		||||
class SitePage extends React.Component {
 | 
			
		||||
    render() {
 | 
			
		||||
        const {route} = this.props
 | 
			
		||||
        const post = route.page.data
 | 
			
		||||
 | 
			
		||||
        return (
 | 
			
		||||
            <div>
 | 
			
		||||
              <SidebarLeft {...this.props}/>
 | 
			
		||||
              <SiteSidebar {...this.props}/>
 | 
			
		||||
              <div className='content'>
 | 
			
		||||
                <div className='main'>
 | 
			
		||||
                  <div className='main-inner'>
 | 
			
		||||
@@ -34,9 +33,9 @@ class BlogPage extends React.Component {
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
BlogPage.propTypes = {
 | 
			
		||||
SitePage.propTypes = {
 | 
			
		||||
    post: React.PropTypes.object.isRequired,
 | 
			
		||||
    pages: React.PropTypes.array,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export default BlogPage
 | 
			
		||||
export default SitePage
 | 
			
		||||
@@ -9,7 +9,7 @@ import ReadNext from '../ReadNext'
 | 
			
		||||
import './style.css'
 | 
			
		||||
import '../../static/css/highlight.css'
 | 
			
		||||
 | 
			
		||||
class BlogPost extends React.Component {
 | 
			
		||||
class SitePost extends React.Component {
 | 
			
		||||
    render() {
 | 
			
		||||
        const {route} = this.props
 | 
			
		||||
        const post = route.page.data
 | 
			
		||||
@@ -46,9 +46,9 @@ class BlogPost extends React.Component {
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
BlogPost.propTypes = {
 | 
			
		||||
SitePost.propTypes = {
 | 
			
		||||
    post: React.PropTypes.object.isRequired,
 | 
			
		||||
    pages: React.PropTypes.array,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export default BlogPost
 | 
			
		||||
export default SitePost
 | 
			
		||||
@@ -2,11 +2,11 @@ import React from 'react'
 | 
			
		||||
import { RouteHandler, Link } from 'react-router'
 | 
			
		||||
import { prefixLink } from 'gatsby-helpers'
 | 
			
		||||
import { config } from 'config'
 | 
			
		||||
import BlogNav from '../BlogNav'
 | 
			
		||||
import BlogSocial from '../BlogSocial'
 | 
			
		||||
import SiteNav from '../SiteNav'
 | 
			
		||||
import SiteLinks from '../SiteLinks'
 | 
			
		||||
import './style.css'
 | 
			
		||||
 | 
			
		||||
class SidebarLeft extends React.Component {
 | 
			
		||||
class SiteSidebar extends React.Component {
 | 
			
		||||
    render() {
 | 
			
		||||
        const {location, children} = this.props
 | 
			
		||||
        const isHome = location.pathname === prefixLink('/')
 | 
			
		||||
@@ -35,9 +35,9 @@ class SidebarLeft extends React.Component {
 | 
			
		||||
                  </header>
 | 
			
		||||
                </div>
 | 
			
		||||
                <div className='blog-options'>
 | 
			
		||||
                  <BlogNav {...this.props}/>
 | 
			
		||||
                  <SiteNav {...this.props}/>
 | 
			
		||||
                  <footer>
 | 
			
		||||
                    <BlogSocial {...this.props}/>
 | 
			
		||||
                    <SiteLinks {...this.props}/>
 | 
			
		||||
                    <p className='copyright'>
 | 
			
		||||
                      © All rights reserved.
 | 
			
		||||
                    </p>
 | 
			
		||||
@@ -49,9 +49,9 @@ class SidebarLeft extends React.Component {
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
SidebarLeft.propTypes = {
 | 
			
		||||
SiteSidebar.propTypes = {
 | 
			
		||||
    children: React.PropTypes.any,
 | 
			
		||||
    location: React.PropTypes.object,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export default SidebarLeft
 | 
			
		||||
export default SiteSidebar
 | 
			
		||||
@@ -6,11 +6,10 @@ import DocumentTitle from 'react-document-title'
 | 
			
		||||
import { prefixLink } from 'gatsby-helpers'
 | 
			
		||||
import access from 'safe-access'
 | 
			
		||||
import { config } from 'config'
 | 
			
		||||
import SitePost from '../components/SitePost'
 | 
			
		||||
import SiteSidebar from '../components/SiteSidebar'
 | 
			
		||||
 | 
			
		||||
import BlogPost from '../components/BlogPost'
 | 
			
		||||
import SidebarLeft from '../components/SidebarLeft'
 | 
			
		||||
 | 
			
		||||
class BlogIndex extends React.Component {
 | 
			
		||||
class SiteIndex extends React.Component {
 | 
			
		||||
    render() {
 | 
			
		||||
        const pageLinks = []
 | 
			
		||||
        // Sort pages.
 | 
			
		||||
@@ -42,7 +41,7 @@ class BlogIndex extends React.Component {
 | 
			
		||||
        return (
 | 
			
		||||
            <DocumentTitle title={ config.siteTitle }>
 | 
			
		||||
              <div>
 | 
			
		||||
                <SidebarLeft {...this.props}/>
 | 
			
		||||
                <SiteSidebar {...this.props}/>
 | 
			
		||||
                <div className='content'>
 | 
			
		||||
                  <div className='main'>
 | 
			
		||||
                    <div className='main-inner'>
 | 
			
		||||
@@ -56,8 +55,8 @@ class BlogIndex extends React.Component {
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
BlogIndex.propTypes = {
 | 
			
		||||
SiteIndex.propTypes = {
 | 
			
		||||
    route: React.PropTypes.object,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export default BlogIndex
 | 
			
		||||
export default SiteIndex
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
import React from 'react'
 | 
			
		||||
import DocumentTitle from 'react-document-title'
 | 
			
		||||
import BlogPost from '../components/BlogPost'
 | 
			
		||||
import BlogPage from '../components/BlogPage'
 | 
			
		||||
import SitePost from '../components/SitePost'
 | 
			
		||||
import SitePage from '../components/SitePage'
 | 
			
		||||
import { config } from 'config'
 | 
			
		||||
 | 
			
		||||
class MarkdownWrapper extends React.Component {
 | 
			
		||||
@@ -13,9 +13,9 @@ class MarkdownWrapper extends React.Component {
 | 
			
		||||
        layout = post.layout
 | 
			
		||||
 | 
			
		||||
        if (layout != 'page') {
 | 
			
		||||
            template = <BlogPost {...this.props}/>
 | 
			
		||||
            template = <SitePost {...this.props}/>
 | 
			
		||||
        } else {
 | 
			
		||||
            template = <BlogPage {...this.props}/>
 | 
			
		||||
            template = <SitePage {...this.props}/>
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return (
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user