2018-05-11 21:44:34 +02:00
|
|
|
import React, { PureComponent } from 'react'
|
2018-06-23 17:19:45 +02:00
|
|
|
import { StaticQuery, graphql } from 'gatsby'
|
2018-05-13 00:42:59 +02:00
|
|
|
import Vcard from '../atoms/Vcard'
|
2018-05-13 21:50:55 +02:00
|
|
|
import LogoUnit from '../atoms/LogoUnit'
|
2018-05-12 22:58:16 +02:00
|
|
|
import Networks from '../molecules/Networks'
|
2018-06-11 19:48:38 +02:00
|
|
|
import styles from './Footer.module.scss'
|
2018-04-02 23:22:48 +02:00
|
|
|
|
2018-05-11 21:44:34 +02:00
|
|
|
class Footer extends PureComponent {
|
2018-05-06 18:38:40 +02:00
|
|
|
constructor(props) {
|
|
|
|
super(props)
|
2018-05-11 21:44:34 +02:00
|
|
|
|
|
|
|
this.state = { year: new Date().getFullYear() }
|
2018-05-06 18:38:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
|
|
|
return (
|
2018-06-23 17:19:45 +02:00
|
|
|
<StaticQuery
|
|
|
|
query={graphql`
|
2018-07-11 15:54:32 +02:00
|
|
|
query {
|
2018-06-23 17:19:45 +02:00
|
|
|
# the package.json file
|
|
|
|
portfolioJson {
|
|
|
|
name
|
|
|
|
homepage
|
|
|
|
repository
|
|
|
|
bugs
|
|
|
|
}
|
2018-08-26 21:28:06 +02:00
|
|
|
|
|
|
|
dataYaml {
|
|
|
|
title
|
|
|
|
gpg
|
|
|
|
}
|
2018-06-23 17:19:45 +02:00
|
|
|
}
|
|
|
|
`}
|
|
|
|
render={data => {
|
|
|
|
const pkg = data.portfolioJson
|
2018-08-26 21:28:06 +02:00
|
|
|
const meta = data.dataYaml
|
2018-06-23 17:19:45 +02:00
|
|
|
|
|
|
|
return (
|
|
|
|
<footer className={styles.footer}>
|
2018-08-26 21:28:06 +02:00
|
|
|
<LogoUnit minimal />
|
|
|
|
<Networks minimal />
|
2018-06-23 17:19:45 +02:00
|
|
|
|
|
|
|
<p className={styles.footer__actions}>
|
2018-08-26 21:28:06 +02:00
|
|
|
<Vcard />
|
2018-06-23 17:19:45 +02:00
|
|
|
<a href={meta.gpg}>PGP/GPG key</a>
|
|
|
|
<a href={pkg.bugs}>Found a bug?</a>
|
|
|
|
</p>
|
|
|
|
<p className={styles.footer__copyright}>
|
|
|
|
<small>
|
|
|
|
© {this.state.year} {meta.title} — All Rights
|
|
|
|
Reserved
|
|
|
|
</small>
|
|
|
|
</p>
|
|
|
|
</footer>
|
|
|
|
)
|
|
|
|
}}
|
|
|
|
/>
|
2018-05-06 18:38:40 +02:00
|
|
|
)
|
|
|
|
}
|
2018-04-02 23:22:48 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export default Footer
|