New version

This commit is contained in:
wpioneer
2018-01-21 03:03:59 +03:00
parent 4bab6c4260
commit 35d5d7c244
21 changed files with 54 additions and 333 deletions

View File

@@ -1,5 +1,4 @@
import React from 'react';
import PropTypes from 'prop-types';
import get from 'lodash/get';
import Link from 'gatsby-link';
import Menu from '../Menu';
@@ -13,14 +12,15 @@ class Sidebar extends React.Component {
const { author, subtitle, copyright, menu } = this.props.data.site.siteMetadata;
const isHomePage = get(location, 'pathname', '/') === '/';
/* eslint-disable jsx-a11y/img-redundant-alt*/
/* eslint-disable jsx-a11y/img-redundant-alt */
const authorBlock = (
<div>
<Link to="/">
<img
src={profilePic}
className="sidebar__author-photo"
width="75" height="75"
width="75"
height="75"
alt={author.name}
/>
</Link>
@@ -36,7 +36,7 @@ class Sidebar extends React.Component {
<p className="sidebar__author-subtitle">{subtitle}</p>
</div>
);
/* eslint-enable jsx-a11y/img-redundant-alt*/
/* eslint-enable jsx-a11y/img-redundant-alt */
return (
<div className="sidebar">
@@ -57,18 +57,4 @@ class Sidebar extends React.Component {
}
}
Sidebar.propTypes = {
data: PropTypes.shape({
site: PropTypes.shape({
siteMetadata: PropTypes.shape({
subtitle: PropTypes.string.isRequired,
author: PropTypes.object.isRequired,
copyright: PropTypes.string.isRequired,
menu: PropTypes.array.isRequired
})
})
}),
location: PropTypes.object
};
export default Sidebar;