1
0
mirror of https://github.com/uetchy/namae.git synced 2025-03-17 12:30:32 +09:00

feat: add language switcher

This commit is contained in:
uetchy 2019-08-03 14:35:49 +09:00
parent a68d11312b
commit cf3dd85ade

View File

@ -6,7 +6,8 @@ import { ExternalLink } from './Links'
export default function Footer() { export default function Footer() {
return ( return (
<Container> <Contaienr>
<Box>
<p> <p>
Made with{' '} Made with{' '}
<span role="img" aria-label="coffee"> <span role="img" aria-label="coffee">
@ -25,26 +26,47 @@ export default function Footer() {
<FaTwitter /> <FaTwitter />
</ExternalLink> </ExternalLink>
</Links> </Links>
</Container> </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>
) )
} }
const Container = styled.footer` const Contaienr = styled.div`
display: flex;
flex-direction: column;
align-items: center;
margin: 40px 0; margin: 40px 0;
text-align: center;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
font-size: 0.7rem; font-size: 0.7rem;
display: flex;
justify-content: center;
line-height: 1em;
${ExternalLink} { a {
color: black; color: black;
text-decoration: none; text-decoration: none;
} }
` `
const Box = styled.footer`
margin-bottom: 10px;
display: flex;
flex-direction: row;
justify-content: center;
line-height: 1em;
`
const Links = styled.div` const Links = styled.div`
margin-left: 15px; margin-left: 15px;
display: flex; display: flex;