Skip to content

Commit 5cc7131

Browse files
committed
Add Facebook icon
1 parent 9691599 commit 5cc7131

File tree

3 files changed

+46
-0
lines changed

3 files changed

+46
-0
lines changed

src/Layout.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { connect } from 'react-redux';
66
import styleLight from './styles/hljs/hljs.light';
77
import styleDark from './styles/hljs/hljs.dark';
88
import Header from './components/Header';
9+
import Footer from './components/Footer';
910
import GlobalStyle from './styles/global';
1011
import { themeCommon } from './styles/themes/theme.common';
1112
import { themeLight } from './styles/themes/theme.light';
@@ -38,6 +39,8 @@ const Layout = props => {
3839
<Route path="/about" component={About} />
3940
<Redirect to="/" />
4041
</Switch>
42+
43+
<Footer />
4144
</React.Fragment>
4245
</ThemeProvider>
4346
);

src/components/Footer.jsx

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import React from 'react';
2+
import styled from 'styled-components';
3+
import { ICON_FACEBOOK } from '../static/icons';
4+
5+
const FooterContainer = styled.footer`
6+
display: flex;
7+
justify-content: center;
8+
margin-top: 5rem;
9+
10+
a {
11+
border: 1px solid ${props => props.theme.buttonBackground};
12+
border-radius: 50%;
13+
display: inline-flex;
14+
padding: 0.5rem;
15+
16+
:hover svg,
17+
:active svg {
18+
fill: ${props => props.theme.toggleFillHover};
19+
}
20+
}
21+
22+
svg {
23+
fill: ${props => props.theme.buttonBackground};
24+
transition: 0.2s;
25+
}
26+
`;
27+
28+
const Footer = () => (
29+
<FooterContainer>
30+
<a href="https://www.facebook.com/sharer.php?u=https://designpatternsgame.com/" target="_blank">
31+
{ICON_FACEBOOK}
32+
</a>
33+
</FooterContainer>
34+
);
35+
36+
export default Footer;

src/static/icons/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,10 @@ export const SUN_FILLED = (
3737
<path d="M6.76 4.84l-1.8-1.79-1.41 1.41 1.79 1.79 1.42-1.41zM4 10.5H1v2h3v-2zm9-9.95h-2V3.5h2V.55zm7.45 3.91l-1.41-1.41-1.79 1.79 1.41 1.41 1.79-1.79zm-3.21 13.7l1.79 1.8 1.41-1.41-1.8-1.79-1.4 1.4zM20 10.5v2h3v-2h-3zm-8-5c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zm-1 16.95h2V19.5h-2v2.95zm-7.45-3.91l1.41 1.41 1.79-1.8-1.41-1.41-1.79 1.8z" />
3838
</Fragment>
3939
);
40+
41+
export const ICON_FACEBOOK = (
42+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 32 32">
43+
<title>facebook</title>
44+
<path d="M19 6h5v-6h-5c-3.86 0-7 3.14-7 7v3h-4v6h4v16h6v-16h5l1-6h-6v-3c0-0.542 0.458-1 1-1z" />
45+
</svg>
46+
);

0 commit comments

Comments
 (0)