2021-03-15 21:01:55 +01:00
|
|
|
import React from 'react'
|
2019-11-17 23:56:29 +01:00
|
|
|
import { Link } from 'gatsby'
|
2023-01-29 22:58:19 +01:00
|
|
|
import { useSiteMetadata } from '../../hooks/useSiteMetadata'
|
2019-11-15 22:10:53 +01:00
|
|
|
import Icon from '../atoms/Icon'
|
2018-08-29 01:13:47 +02:00
|
|
|
import Vcard from '../molecules/Vcard'
|
2022-11-11 03:31:54 +01:00
|
|
|
import * as styles from './Footer.module.css'
|
2018-08-11 02:39:18 +02:00
|
|
|
|
2019-11-17 23:56:29 +01:00
|
|
|
function Copyright() {
|
2020-07-19 13:31:27 +02:00
|
|
|
const { name, uri, github } = useSiteMetadata().author
|
2019-10-02 15:32:01 +02:00
|
|
|
const year = new Date().getFullYear()
|
2019-10-02 20:48:59 +02:00
|
|
|
|
|
|
|
return (
|
2022-11-11 03:31:54 +01:00
|
|
|
<section className={styles.copyright}>
|
2019-10-02 20:48:59 +02:00
|
|
|
<p>
|
|
|
|
© 2005–
|
|
|
|
{year + ' '}
|
|
|
|
<a href={uri} rel="me">
|
|
|
|
{name}
|
|
|
|
</a>
|
|
|
|
<a href={`${github}/blog`}>
|
2019-11-15 22:10:53 +01:00
|
|
|
<Icon name="GitHub" />
|
2019-10-02 20:48:59 +02:00
|
|
|
View source
|
|
|
|
</a>
|
2022-11-11 03:31:54 +01:00
|
|
|
<Link to="/thanks" className={styles.btc}>
|
2019-11-15 22:10:53 +01:00
|
|
|
<Icon name="Bitcoin" />
|
2020-07-19 13:31:27 +02:00
|
|
|
Say Thanks
|
2019-11-17 23:56:29 +01:00
|
|
|
</Link>
|
2019-10-02 20:48:59 +02:00
|
|
|
</p>
|
|
|
|
</section>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2021-03-15 21:01:55 +01:00
|
|
|
export default function Footer(): JSX.Element {
|
|
|
|
return (
|
2022-11-11 03:31:54 +01:00
|
|
|
<footer role="contentinfo" className={styles.footer}>
|
2021-03-15 21:01:55 +01:00
|
|
|
<Vcard />
|
|
|
|
<Copyright />
|
|
|
|
</footer>
|
|
|
|
)
|
2018-08-11 02:39:18 +02:00
|
|
|
}
|