Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Mar 9, 2021. It is now read-only.

Commit f55cf5a

Browse files
committed
add terms and privacy links to footer
1 parent bfa094d commit f55cf5a

File tree

1 file changed

+56
-2
lines changed

1 file changed

+56
-2
lines changed

components/common/footer/index.js

Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react';
22
import styled from 'react-emotion';
3+
import Link from 'next/link';
34
import { Flex, Box } from 'grid-styled/emotion';
45
import FaFacebook from 'react-icons/lib/fa/facebook';
56
import FaYoutube from 'react-icons/lib/fa/youtube-play';
@@ -12,7 +13,8 @@ import { baseEventsURL, subscribeURL } from '../../../utils/urls';
1213

1314
const Footer = styled.footer`
1415
background: #222;
15-
color: #fff;
16+
text-align: center;
17+
color: rgba(255, 255, 255, 0.7);
1618
@media (max-width: 480px) {
1719
.follow {
1820
background: #111;
@@ -114,6 +116,44 @@ const Message = styled.div`
114116
}
115117
`;
116118

119+
const FooterLinks = styled.ul`
120+
list-style: none;
121+
margin: 0;
122+
padding: 0;
123+
display: flex;
124+
width: 100%;
125+
justify-content: center;
126+
@media (min-width: 48em) {
127+
width: 50%;
128+
}
129+
`;
130+
131+
const FooterLink = styled.li`
132+
margin: 10px;
133+
@media (min-width: 48em) {
134+
margin: 0 10px;
135+
}
136+
& a {
137+
color: rgba(255, 255, 255, 0.7);
138+
text-decoration: none;
139+
transition: all 0.2s;
140+
&:hover {
141+
color: rgba(255, 255, 255, 1);
142+
}
143+
}
144+
`;
145+
146+
const footerLinks = [
147+
{
148+
title: 'Terms & Conditions',
149+
path: '/terms',
150+
},
151+
{
152+
title: 'Privacy Policy',
153+
path: '/privacy',
154+
},
155+
];
156+
117157
export default class FooterBar extends React.Component {
118158
state = {
119159
subscribersEmail: '',
@@ -175,7 +215,7 @@ export default class FooterBar extends React.Component {
175215
return (
176216
<Footer>
177217
<Container>
178-
<Flex flexWrap="wrap" py={[0, 4]}>
218+
<Flex flexWrap="wrap" py={[0, 2]}>
179219
<Flex
180220
alignItems="center"
181221
flexDirection="column"
@@ -239,6 +279,20 @@ export default class FooterBar extends React.Component {
239279
</Box>
240280
</Flex>
241281
</Flex>
282+
<Flex py={[3, 3]} px={[3, 0]} flexWrap="wrap" alignItems="center" justifyContent="space-between">
283+
<Box width={[1, 1 / 2]}>&copy; Copyright {new Date().getFullYear()} - Coderplex - All Rights Reserved.</Box>
284+
<FooterLinks>
285+
{footerLinks.map(item => (
286+
<FooterLink key={item.path}>
287+
<Link href={item.path}>
288+
<a>
289+
<span>{item.title}</span>
290+
</a>
291+
</Link>
292+
</FooterLink>
293+
))}
294+
</FooterLinks>
295+
</Flex>
242296
</Container>
243297
</Footer>
244298
);

0 commit comments

Comments
 (0)