File tree Expand file tree Collapse file tree 3 files changed +46
-0
lines changed Expand file tree Collapse file tree 3 files changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { connect } from 'react-redux';
6
6
import styleLight from './styles/hljs/hljs.light' ;
7
7
import styleDark from './styles/hljs/hljs.dark' ;
8
8
import Header from './components/Header' ;
9
+ import Footer from './components/Footer' ;
9
10
import GlobalStyle from './styles/global' ;
10
11
import { themeCommon } from './styles/themes/theme.common' ;
11
12
import { themeLight } from './styles/themes/theme.light' ;
@@ -38,6 +39,8 @@ const Layout = props => {
38
39
< Route path = "/about" component = { About } />
39
40
< Redirect to = "/" />
40
41
</ Switch >
42
+
43
+ < Footer />
41
44
</ React . Fragment >
42
45
</ ThemeProvider >
43
46
) ;
Original file line number Diff line number Diff line change
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 ;
Original file line number Diff line number Diff line change @@ -37,3 +37,10 @@ export const SUN_FILLED = (
37
37
< 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" />
38
38
</ Fragment >
39
39
) ;
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
+ ) ;
You can’t perform that action at this time.
0 commit comments