1
0
mirror of https://github.com/uetchy/namae.git synced 2025-03-19 13:30:32 +09:00
namae/web/src/components/Footer.tsx

92 lines
2.0 KiB
TypeScript
Raw Normal View History

2019-07-31 12:22:31 +09:00
import React from 'react'
import styled from 'styled-components'
2019-08-03 22:50:35 +09:00
import { useTranslation } from 'react-i18next'
2019-08-06 02:07:05 +09:00
import { FaTwitter, FaGithubAlt } from 'react-icons/fa'
2019-07-31 12:22:31 +09:00
2019-07-31 18:54:28 +09:00
import { ExternalLink } from './Links'
2019-07-31 12:22:31 +09:00
export default function Footer() {
2019-08-03 22:50:35 +09:00
const { t } = useTranslation()
2019-07-31 12:22:31 +09:00
return (
2019-08-03 14:35:49 +09:00
<Contaienr>
<Box>
<p>
Made with{' '}
<span role="img" aria-label="coffee">
🦀
</span>{' '}
by{' '}
<ExternalLink href="https://twitter.com/uetschy">
<Bold>Yasuaki Uechi</Bold>
</ExternalLink>
</p>
<Links>
2019-08-08 21:53:09 +09:00
<ExternalLink
href="https://github.com/uetchy/namae"
aria-label="Go to GitHub repository">
2019-08-03 14:35:49 +09:00
<FaGithubAlt />
</ExternalLink>
2019-08-03 22:50:35 +09:00
<ExternalLink
2019-08-08 21:53:09 +09:00
aria-label="Tweet this page"
2019-08-03 22:50:35 +09:00
href={`https://twitter.com/intent/tweet?text=${encodeURIComponent(
`namae — ${t('title')}`
)}&url=${encodeURIComponent('https://namae.dev')}`}>
2019-08-03 14:35:49 +09:00
<FaTwitter />
</ExternalLink>
</Links>
</Box>
<Box>
<a href="/?lng=en">
<span role="img" aria-label="English">
🇬🇧
</span>
</a>
<a href="/?lng=ja">
<span role="img" aria-label="Japanese">
🇯🇵
</span>
</a>
</Box>
</Contaienr>
2019-07-31 12:22:31 +09:00
)
}
2019-08-03 14:35:49 +09:00
const Contaienr = styled.div`
display: flex;
flex-direction: column;
align-items: center;
2019-07-31 12:22:31 +09:00
margin: 40px 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
2019-08-01 14:00:22 +09:00
font-size: 0.7rem;
2019-08-01 14:32:00 +09:00
2019-08-03 14:35:49 +09:00
a {
2019-08-01 14:32:00 +09:00
color: black;
text-decoration: none;
}
2019-08-01 13:21:23 +09:00
`
2019-08-03 14:35:49 +09:00
const Box = styled.footer`
margin-bottom: 10px;
display: flex;
flex-direction: row;
justify-content: center;
line-height: 1em;
`
2019-08-01 13:21:23 +09:00
const Links = styled.div`
margin-left: 15px;
display: flex;
2019-08-01 14:40:43 +09:00
align-items: center;
2019-08-01 13:21:23 +09:00
2019-08-01 14:32:00 +09:00
${ExternalLink} {
2019-08-01 13:21:23 +09:00
margin-right: 5px;
}
2019-07-31 12:22:31 +09:00
`
2019-08-01 14:00:22 +09:00
const Bold = styled.span`
font-weight: bold;
`