portfolio/src/components/organisms/Footer.jsx

46 lines
1.1 KiB
React
Raw Normal View History

2021-03-13 01:17:53 +01:00
import React from 'react'
2019-04-16 03:59:21 +02:00
import PropTypes from 'prop-types'
2018-09-15 19:51:10 +02:00
import LogoUnit from '../molecules/LogoUnit'
2018-05-12 22:58:16 +02:00
import Networks from '../molecules/Networks'
import Location from '../molecules/Location'
2021-03-12 23:47:28 +01:00
import { footer, actions, copyright } from './Footer.module.css'
2019-11-11 21:46:14 +01:00
import { useMeta } from '../../hooks/use-meta'
2022-05-08 15:14:12 +02:00
import Vcard from '../atoms/Vcard'
2019-11-25 13:46:44 +01:00
2020-06-01 12:49:10 +02:00
const FooterMarkup = ({ meta, year }) => (
2021-03-12 23:47:28 +01:00
<footer className={`h-card ${footer}`}>
<LogoUnit minimal />
2019-11-12 22:20:34 +01:00
<Networks small />
<Location />
2021-03-12 23:47:28 +01:00
<p className={actions}>
2022-05-08 15:14:12 +02:00
<Vcard />
<a className="u-key" href={meta.gpg}>
PGP/GPG key
</a>
2020-06-01 12:49:10 +02:00
<a href={meta.bugs}>Found a bug?</a>
</p>
2021-03-12 23:47:28 +01:00
<p className={copyright}>
<small>
&copy; {year}{' '}
<a className="u-url" href={meta.url}>
{meta.title}
</a>{' '}
&mdash; All Rights Reserved
</small>
</p>
</footer>
)
2019-04-16 03:59:21 +02:00
FooterMarkup.propTypes = {
meta: PropTypes.object.isRequired,
year: PropTypes.number.isRequired
}
2021-03-13 01:17:53 +01:00
export default function Footer() {
2019-11-11 21:46:14 +01:00
const metaYaml = useMeta()
const year = new Date().getFullYear()
2018-06-23 17:19:45 +02:00
2020-06-01 12:49:10 +02:00
return <FooterMarkup year={year} meta={metaYaml} />
2018-04-02 23:22:48 +02:00
}