Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.
[website] Add share icons (#62)
Chris Chua3248c5ab76fe
diff --git a/website/package.json b/website/package.jsonindex 9df5ce12d..e1e34cc2f 100644--- a/website/package.json+++ b/website/package.json@@ -28,6 +28,7 @@"react-redux": "^4.4.5","react-router": "^3.0.5","react-router-redux": "^4.0.8",+ "react-share": "^2.1.1","react-swipeable-views": "^0.12.13","react-waypoint": "^8.0.1","redux": "^3.0.4",diff --git a/website/src/components/footer.js b/website/src/components/footer.jsindex 780bf176f..f4f34bad6 100644--- a/website/src/components/footer.js+++ b/website/src/components/footer.js@@ -20,6 +20,12 @@import React, {PureComponent} from 'react';import styled from 'styled-components';+import {+ FacebookIcon,+ FacebookShareButton,+ TwitterIcon,+ TwitterShareButton+} from 'react-share';import {cdnUrl} from '../utils';import {LinkButton} from './common/styled-components';@@ -87,10 +93,20 @@ const StyledLogo = styled.span`}`;-const ButtonContainer = styled.div`+const ButtonSection = styled.div`display: flex;margin-top: 32px;+ ${media.palm`+ display: flex;+ justify-content: center;+ width: 100%;+ flex-direction: column;+ `};+`;++const ButtonContainer = styled.div`+ display: flex;a {width: 160px;}@@ -106,6 +122,23 @@ const ButtonContainer = styled.div``};`;+const SocialContainer = styled.div`+ display: flex;+ flex: 1;+ justify-content: flex-end;++ .SocialMediaShareButton {+ margin-right: 5px;+ }++ ${media.palm`+ display: flex;+ justify-content: center;+ margin-top: 12px;+ width: 100%;+ `};+`;+export default class Footer extends PureComponent {render() {return (@@ -127,19 +160,30 @@ export default class Footer extends PureComponent {</CreatedBy></BrandingContainer></LogosContainer>- <ButtonContainer>- <LinkButton large href="#/demo">- Get Started- </LinkButton>- <LinkButton- large- outlineDark- href="https://github.com/uber/kepler.gl"- style={{marginLeft: '5px'}}- >- <img src={cdnUrl('icons/github.svg')} /> Github- </LinkButton>- </ButtonContainer>+ <ButtonSection>+ <ButtonContainer>+ <LinkButton large href="#/demo">+ Get Started+ </LinkButton>+ <LinkButton+ large+ outlineDark+ href="https://github.com/uber/kepler.gl"+ style={{marginLeft: '5px'}}+ >+ <img src={cdnUrl('icons/github.svg')} /> Github+ </LinkButton>+ </ButtonContainer>+ <SocialContainer>+ <FacebookShareButton url="https://uber.github.io/kepler.gl/">+ <FacebookIcon size={32} />+ </FacebookShareButton>+ {' '}+ <TwitterShareButton url="https://uber.github.io/kepler.gl/" hashtags={['keplergl']}>+ <TwitterIcon size={32} />+ </TwitterShareButton>+ </SocialContainer>+ </ButtonSection></Container>);}