mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2025-08-08 02:18:11 +02:00
New version
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user