diff --git a/src/templates/contributor.js b/src/templates/contributor.js index 8b547d1347..d81187dda6 100644 --- a/src/templates/contributor.js +++ b/src/templates/contributor.js @@ -1,50 +1,46 @@ -import React from "react" -import { graphql, Link } from "gatsby" -import Layout from "../layout/layout" -import SEO from "../layout/seo" -import ContributorLink from "../components/ContributorLink" +import React from 'react'; +import { graphql, Link } from 'gatsby'; +import Layout from '../layout/layout'; +import SEO from '../layout/seo'; +import ContributorLink from '../components/ContributorLink'; -import { Container, TwoItemLayout } from "@pantheon-systems/pds-toolkit-react" +import { Container, TwoItemLayout } from '@pantheon-systems/pds-toolkit-react'; const links = [ { - property: "url", - icon: "user", + property: 'url', + icon: 'user', }, { - property: "github", - icon: "github", + property: 'github', + icon: 'github', }, { - property: "drupal", - icon: "drupal", + property: 'drupal', + icon: 'drupal', }, { - property: "wordpress", - icon: "wordpress", + property: 'wordpress', + icon: 'wordpress', }, { - property: "twitter", - icon: "twitter", + property: 'twitter', + icon: 'twitter', }, { - property: "linkedin", - icon: "linkedin", + property: 'linkedin', + icon: 'linkedin', }, -] +]; // Set container width for search and main content. -const containerWidth = "standard" +const containerWidth = 'standard'; class ContributorTemplate extends React.Component { render() { - const contributor = this.props.data.contributorYaml - const docs = - this.props.data.allDocs != null ? this.props.data.allDocs.edges : [] - let printedGuides = [] - let printedOverview = [] + const contributor = this.props.data.contributorYaml; - console.log(contributor) + // console.log(contributor) return ( @@ -70,11 +66,11 @@ class ContributorTemplate extends React.Component { {links.map((link, i) => { const url = contributor.hasOwnProperty(link.property) ? contributor[link.property] - : null + : null; if (url !== null) { return ( - ) + ); } })} @@ -84,29 +80,24 @@ class ContributorTemplate extends React.Component { slot="second-item" className="docs-contributor__contributions" > -

Contributions

- +

+ + See contributions on GitHub + +

- ) + ); } } -export default ContributorTemplate +export default ContributorTemplate; export const pageQuery = graphql` query ContributorById($id: String!) { @@ -137,6 +128,7 @@ export const pageQuery = graphql` id frontmatter { title + permalink } fileAbsolutePath } @@ -151,4 +143,4 @@ export const pageQuery = graphql` } } } -` +`;