mirror of
				https://github.com/mastermindzh/rickvanlieshout.com
				synced 2025-11-04 02:29:46 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			57 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			57 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
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 './style.css'
 | 
						|
 | 
						|
class SidebarLeft extends React.Component {
 | 
						|
    render() {
 | 
						|
        const {location, children} = this.props
 | 
						|
        const isHome = location.pathname === prefixLink('/')
 | 
						|
 | 
						|
        let header = (
 | 
						|
        <header>
 | 
						|
          <Link style={ {    textDecoration: 'none',    borderBottom: 'none',    outline: 'none'} } to={ prefixLink('/') }>
 | 
						|
          <img src='./photo.jpg' width='75' height='75' />
 | 
						|
          </Link>
 | 
						|
          { isHome ? (
 | 
						|
            <h1><Link style={ {    textDecoration: 'none',    borderBottom: 'none',    color: 'inherit'} } to={ prefixLink('/') }> { config.siteAuthor } </Link></h1>
 | 
						|
            ) :
 | 
						|
            <h2><Link style={ {    textDecoration: 'none',    borderBottom: 'none',    color: 'inherit'} } to={ prefixLink('/') }> { config.siteAuthor } </Link></h2> }
 | 
						|
          <p>
 | 
						|
            { config.siteDescr }
 | 
						|
          </p>
 | 
						|
        </header>
 | 
						|
        )
 | 
						|
 | 
						|
        return (
 | 
						|
            <div className='sidebar'>
 | 
						|
              <div className='sidebar-inner'>
 | 
						|
                <div className='blog-details'>
 | 
						|
                  <header>
 | 
						|
                    { header }
 | 
						|
                  </header>
 | 
						|
                </div>
 | 
						|
                <div className='blog-options'>
 | 
						|
                  <BlogNav {...this.props}/>
 | 
						|
                  <footer>
 | 
						|
                    <BlogSocial {...this.props}/>
 | 
						|
                    <p className='copyright'>
 | 
						|
                      © All rights reserved.
 | 
						|
                    </p>
 | 
						|
                  </footer>
 | 
						|
                </div>
 | 
						|
              </div>
 | 
						|
            </div>
 | 
						|
            );
 | 
						|
    }
 | 
						|
}
 | 
						|
 | 
						|
SidebarLeft.propTypes = {
 | 
						|
    children: React.PropTypes.any,
 | 
						|
    location: React.PropTypes.object,
 | 
						|
}
 | 
						|
 | 
						|
export default SidebarLeft |