Accessibility and SEO best practices changes

This commit is contained in:
Moris Zen
2018-09-14 12:52:11 +02:00
parent 6196022748
commit c6f1235e86
10 changed files with 65 additions and 15 deletions

View File

@@ -11,7 +11,7 @@ const Card = ({ ...props }) => (
<div className={`relative ${!props.team ? 'hover:opacity-50' : ''}`}> <div className={`relative ${!props.team ? 'hover:opacity-50' : ''}`}>
{props.image && <img className="w-full" src={props.image.src} />} {props.image && <img className="w-full" src={props.image.src} />}
{props.teamMember && ( {props.teamMember && (
<img className="w-full rounded" src={props.teamMember} /> <img className="w-full rounded" alt={props.imgAlt ? props.imgAlt : 'saburly image'} src={props.teamMember} />
)} )}
<div <div
className={`px-6 py-4 ${ className={`px-6 py-4 ${

View File

@@ -45,7 +45,11 @@ const Footer = () => (
/> />
<div className="flex justify-between social-icons py-2"> <div className="flex justify-between social-icons py-2">
<div> <div>
<a href="https://facebook.com/saburly" target="_blank"> <a
href="https://facebook.com/saburly"
rel="noreferrer"
target="_blank"
>
<img <img
src={Facebook} src={Facebook}
alt="Facebook Social Media" alt="Facebook Social Media"
@@ -54,7 +58,11 @@ const Footer = () => (
</a> </a>
</div> </div>
<div> <div>
<a href="https://instagram.com/saburly" target="_blank"> <a
href="https://instagram.com/saburly"
rel="noreferrer"
target="_blank"
>
<img <img
src={Instagram} src={Instagram}
alt="Instagram Social Media" alt="Instagram Social Media"
@@ -63,7 +71,11 @@ const Footer = () => (
</a> </a>
</div> </div>
<div> <div>
<a href="https://twitter.com/saburly" target="_blank"> <a
href="https://twitter.com/saburly"
rel="noreferrer"
target="_blank"
>
<img <img
src={Twitter} src={Twitter}
alt="Twitter Social Media" alt="Twitter Social Media"
@@ -72,7 +84,11 @@ const Footer = () => (
</a> </a>
</div> </div>
<div> <div>
<a href="https://www.linkedin.com/company/saburly/" target="_blank"> <a
href="https://www.linkedin.com/company/saburly/"
rel="noreferrer"
target="_blank"
>
<img <img
src={LinkedIn} src={LinkedIn}
alt="LinkedIn Social Media" alt="LinkedIn Social Media"

View File

@@ -21,6 +21,14 @@
width: 25px; width: 25px;
} }
.side-toggle {
cursor: pointer;
}
.side-toggle:hover {
opacity: 0.7;
}
.menu_bar-mid { .menu_bar-mid {
width: 20px; width: 20px;
} }

View File

@@ -20,18 +20,18 @@ class Header extends Component {
<div className="max-w-xs mr-8"> <div className="max-w-xs mr-8">
<img <img
src={LogoSaburlyWhite} src={LogoSaburlyWhite}
className="saburly-logo" className="saburly-logo saburly-transition"
alt="Saburly Logo" alt="Saburly Logo"
/> />
</div> </div>
</Link> </Link>
<div className="side-toggle"> <div className="side-toggle saburly-transition">
<button className="menu_icon visible lg:invisible"> <div className="menu_icon visible lg:invisible">
<span className="menu_bar-top" /> <span className="menu_bar-top" />
<span className="menu_bar-mid" /> <span className="menu_bar-mid" />
<span className="menu_bar-bot" /> <span className="menu_bar-bot" />
</button> </div>
</div> </div>
<div className="hidden lg:visible w-full block flex-grow lg:flex lg:items-right lg:w-auto justify-end lg:flex-grow"> <div className="hidden lg:visible w-full block flex-grow lg:flex lg:items-right lg:w-auto justify-end lg:flex-grow">

View File

@@ -86,7 +86,11 @@ class SideMenu extends Component {
</ul> </ul>
<div className="absolute pin-b hidden social-icons p-8"> <div className="absolute pin-b hidden social-icons p-8">
<div> <div>
<a href="https://facebook.com/saburly" target="_blank"> <a
href="https://facebook.com/saburly"
rel="noreferrer"
target="_blank"
>
<img <img
src={Facebook} src={Facebook}
alt="Facebook Social Media" alt="Facebook Social Media"
@@ -95,7 +99,11 @@ class SideMenu extends Component {
</a> </a>
</div> </div>
<div> <div>
<a href="https://instagram.com/saburly" target="_blank"> <a
href="https://instagram.com/saburly"
rel="noreferrer"
target="_blank"
>
<img <img
src={Instagram} src={Instagram}
alt="Instagram Social Media" alt="Instagram Social Media"
@@ -104,7 +112,11 @@ class SideMenu extends Component {
</a> </a>
</div> </div>
<div> <div>
<a href="https://twitter.com/saburly" target="_blank"> <a
href="https://twitter.com/saburly"
rel="noreferrer"
target="_blank"
>
<img <img
src={Twitter} src={Twitter}
alt="Twitter Social Media" alt="Twitter Social Media"
@@ -113,7 +125,11 @@ class SideMenu extends Component {
</a> </a>
</div> </div>
<div> <div>
<a href="https://www.linkedin.com/company/saburly/" target="_blank"> <a
href="https://www.linkedin.com/company/saburly/"
rel="noreferrer"
target="_blank"
>
<img <img
src={LinkedIn} src={LinkedIn}
alt="LinkedIn Social Media" alt="LinkedIn Social Media"

View File

@@ -15,7 +15,9 @@ const Layout = ({ children, data }) => (
<div className="font-sans mx-auto"> <div className="font-sans mx-auto">
<Helmet <Helmet
link={[{ rel: 'shortcut icon', type: 'image/png', href: `${favicon32}` }]} link={[{ rel: 'shortcut icon', type: 'image/png', href: `${favicon32}` }]}
/> >
<html lang="en" />
</Helmet>
<main className="side-panel panel"> <main className="side-panel panel">
<Header /> <Header />
{children()} {children()}

View File

@@ -176,6 +176,7 @@ const IndexPage = ({ ...props }) => (
url={`blog/${node.slug}`} url={`blog/${node.slug}`}
title={node.title} title={node.title}
date={node.date} date={node.date}
imgAlt={node.title}
excerpt={node.excerpt} excerpt={node.excerpt}
image={ image={
node.featured_media node.featured_media

View File

@@ -143,6 +143,10 @@ body {
max-height: 22px; max-height: 22px;
} }
.saburly-logo:hover {
opacity: 0.7;
}
@media (min-width: 992px) { @media (min-width: 992px) {
.saburly-logo { .saburly-logo {
max-height: 30px; max-height: 30px;

View File

@@ -45,6 +45,7 @@ class Blog extends Component {
<Card <Card
title={node.title} title={node.title}
date={node.date} date={node.date}
imgAlt={node.title}
excerpt={node.excerpt} excerpt={node.excerpt}
image={ image={
node.featured_media node.featured_media

View File

@@ -30,7 +30,9 @@ class PostDefault extends Component {
link={[ link={[
{ rel: 'shortcut icon', type: 'image/png', href: `${favicon32}` }, { rel: 'shortcut icon', type: 'image/png', href: `${favicon32}` },
]} ]}
/> >
<html lang="en" />
</Helmet>
<main className="container mx-auto p-4 max-w-lg sm:p-10"> <main className="container mx-auto p-4 max-w-lg sm:p-10">
<img <img
className="w-full rounded" className="w-full rounded"