1
0
Fork 0
blog/src/components/organisms/Footer.tsx

41 lines
964 B
TypeScript
Raw Normal View History

2021-03-15 21:01:55 +01:00
import React from 'react'
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'
import * as styles from './Footer.module.css'
2018-08-11 02:39:18 +02: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 (
<section className={styles.copyright}>
2019-10-02 20:48:59 +02:00
<p>
&copy; 2005&ndash;
{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>
<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
</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 (
<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
}