mirror of
https://github.com/kremalicious/blog.git
synced 2025-02-14 21:10:25 +01:00
47 lines
1.1 KiB
TypeScript
47 lines
1.1 KiB
TypeScript
import React from 'react'
|
|
import { Link } from 'gatsby'
|
|
import Container from '../atoms/Container'
|
|
import Icon from '../atoms/Icon'
|
|
import Vcard from '../molecules/Vcard'
|
|
import ThemeSwitch from '../molecules/ThemeSwitch'
|
|
import { useSiteMetadata } from '../../hooks/use-site-metadata'
|
|
import styles from './Footer.module.scss'
|
|
|
|
function Copyright() {
|
|
const { name, uri, bitcoin, github } = useSiteMetadata().author
|
|
const year = new Date().getFullYear()
|
|
|
|
return (
|
|
<section className={styles.copyright}>
|
|
<p>
|
|
© 2005–
|
|
{year + ' '}
|
|
<a href={uri} rel="me">
|
|
{name}
|
|
</a>
|
|
<a href={`${github}/blog`}>
|
|
<Icon name="GitHub" />
|
|
View source
|
|
</a>
|
|
<Link to="/thanks" className={styles.btc}>
|
|
<Icon name="Bitcoin" />
|
|
<code>{bitcoin}</code>
|
|
</Link>
|
|
</p>
|
|
</section>
|
|
)
|
|
}
|
|
|
|
export default function Footer() {
|
|
return (
|
|
<footer role="contentinfo" className={styles.footer}>
|
|
<Container>
|
|
<ThemeSwitch />
|
|
<Vcard />
|
|
|
|
<Copyright />
|
|
</Container>
|
|
</footer>
|
|
)
|
|
}
|