mirror of
https://github.com/kremalicious/portfolio.git
synced 2024-11-13 16:45:12 +01:00
simplify meta queries
This commit is contained in:
parent
6699829972
commit
a9139865ea
@ -11,6 +11,7 @@
|
||||
# Footer actions
|
||||
gpg: https://kretschmann.io/pub.gpg
|
||||
addressbook: /matthias-kretschmann.vcf
|
||||
bugs: https://github.com/kremalicious/portfolio/issues
|
||||
|
||||
typekitID: dtg3zui
|
||||
|
||||
|
@ -20,13 +20,6 @@ module.exports = {
|
||||
path: path.join(__dirname, 'content')
|
||||
}
|
||||
},
|
||||
{
|
||||
resolve: 'gatsby-source-filesystem',
|
||||
options: {
|
||||
name: 'pkg',
|
||||
path: path.join(__dirname, 'package.json')
|
||||
}
|
||||
},
|
||||
{
|
||||
resolve: 'gatsby-source-filesystem',
|
||||
options: {
|
||||
|
@ -18,6 +18,7 @@
|
||||
},
|
||||
"gpg": "https://kretschmann.io/pub.gpg",
|
||||
"addressbook": "/matthias-kretschmann.vcf",
|
||||
"bugs": "https://github.com/kremalicious/portfolio/issues",
|
||||
"typekitID": "dtg3zui",
|
||||
"matomoUrl": "https://analytics.kremalicious.com",
|
||||
"matomoSite": 2,
|
||||
|
@ -12,7 +12,6 @@ beforeAll(() => {
|
||||
...meta,
|
||||
...resume,
|
||||
photoSrc,
|
||||
portfolioJson: { bugs: '' },
|
||||
...projects
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,6 @@
|
||||
"version": "0.1.0",
|
||||
"homepage": "https://matthiaskretschmann.com",
|
||||
"repository": "github:kremalicious/portfolio",
|
||||
"bugs": "https://github.com/kremalicious/portfolio/issues",
|
||||
"license": "MIT",
|
||||
"author": "Matthias Kretschmann <m@kretschmann.io>",
|
||||
"scripts": {
|
||||
|
@ -1,6 +1,5 @@
|
||||
import React, { memo } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { graphql, useStaticQuery } from 'gatsby'
|
||||
import loadable from '@loadable/component'
|
||||
import LogoUnit from '../molecules/LogoUnit'
|
||||
import Networks from '../molecules/Networks'
|
||||
@ -9,15 +8,7 @@ import { useMeta } from '../../hooks/use-meta'
|
||||
|
||||
const LazyVcard = loadable(() => import('../atoms/Vcard'))
|
||||
|
||||
const query = graphql`
|
||||
query FooterQuery {
|
||||
portfolioJson {
|
||||
bugs
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
const FooterMarkup = ({ pkg, meta, year }) => (
|
||||
const FooterMarkup = ({ meta, year }) => (
|
||||
<footer className={`h-card ${styles.footer}`}>
|
||||
<LogoUnit minimal />
|
||||
<Networks small />
|
||||
@ -27,7 +18,7 @@ const FooterMarkup = ({ pkg, meta, year }) => (
|
||||
<a className="u-key" href={meta.gpg}>
|
||||
PGP/GPG key
|
||||
</a>
|
||||
<a href={pkg.bugs}>Found a bug?</a>
|
||||
<a href={meta.bugs}>Found a bug?</a>
|
||||
</p>
|
||||
<p className={styles.copyright}>
|
||||
<small>
|
||||
@ -42,17 +33,15 @@ const FooterMarkup = ({ pkg, meta, year }) => (
|
||||
)
|
||||
|
||||
FooterMarkup.propTypes = {
|
||||
pkg: PropTypes.object.isRequired,
|
||||
meta: PropTypes.object.isRequired,
|
||||
year: PropTypes.number.isRequired
|
||||
}
|
||||
|
||||
function Footer() {
|
||||
const metaYaml = useMeta()
|
||||
const { portfolioJson } = useStaticQuery(query)
|
||||
const year = new Date().getFullYear()
|
||||
|
||||
return <FooterMarkup year={year} pkg={portfolioJson} meta={metaYaml} />
|
||||
return <FooterMarkup year={year} meta={metaYaml} />
|
||||
}
|
||||
|
||||
export default memo(Footer)
|
||||
|
Loading…
Reference in New Issue
Block a user