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'
|
2019-11-25 13:46:44 +01:00
|
|
|
import loadable from '@loadable/component'
|
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'
|
2021-10-19 22:47:19 +02:00
|
|
|
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'
|
2018-04-02 23:22:48 +02:00
|
|
|
|
2019-11-25 13:46:44 +01:00
|
|
|
const LazyVcard = loadable(() => import('../atoms/Vcard'))
|
|
|
|
|
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}`}>
|
2019-11-10 13:17:13 +01:00
|
|
|
<LogoUnit minimal />
|
2019-11-12 22:20:34 +01:00
|
|
|
<Networks small />
|
2021-10-19 22:47:19 +02:00
|
|
|
<Location />
|
2019-11-10 13:17:13 +01:00
|
|
|
|
2021-03-12 23:47:28 +01:00
|
|
|
<p className={actions}>
|
2019-11-25 13:46:44 +01:00
|
|
|
<LazyVcard />
|
2019-11-10 13:17:13 +01:00
|
|
|
<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>
|
2019-11-10 13:17:13 +01:00
|
|
|
</p>
|
2021-03-12 23:47:28 +01:00
|
|
|
<p className={copyright}>
|
2019-11-10 13:17:13 +01:00
|
|
|
<small>
|
|
|
|
© {year}{' '}
|
|
|
|
<a className="u-url" href={meta.url}>
|
|
|
|
{meta.title}
|
|
|
|
</a>{' '}
|
|
|
|
— 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()
|
2019-11-10 13:17:13 +01:00
|
|
|
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
|
|
|
}
|