Skip to content

Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.

add placeholder website

Shan He42ca46f1bda1
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000..237a7a22e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+dist/
+node_modules/
+*/**/node_modules
+.idea/
+
+*/**/yarn.lock
+yarn-error.log
+package-lock.json
\ No newline at end of file
diff --git a/.idea/markdown-navigator.xml b/.idea/markdown-navigator.xml
new file mode 100644
index 000000000..c96e21df1
--- /dev/null
+++ b/.idea/markdown-navigator.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="MarkdownProjectSettings">
+ <PreviewSettings splitEditorLayout="SPLIT" splitEditorPreview="PREVIEW" useGrayscaleRendering="false" zoomFactor="1.0" maxImageWidth="0" showGitHubPageIfSynced="false" allowBrowsingInPreview="false" synchronizePreviewPosition="false" highlightPreviewType="LINE" highlightFadeOut="5" highlightOnTyping="false" synchronizeSourcePosition="false">
+ <PanelProvider>
+ <provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.panel" providerName="Default - Swing" />
+ </PanelProvider>
+ </PreviewSettings>
+ <ParserSettings>
+ <PegdownExtensions>
+ <option name="ABBREVIATIONS" value="false" />
+ <option name="ANCHORLINKS" value="true" />
+ <option name="ATXHEADERSPACE" value="true" />
+ <option name="AUTOLINKS" value="true" />
+ <option name="DEFINITIONS" value="false" />
+ <option name="FENCED_CODE_BLOCKS" value="true" />
+ <option name="FOOTNOTES" value="false" />
+ <option name="HARDWRAPS" value="false" />
+ <option name="INSERTED" value="false" />
+ <option name="QUOTES" value="false" />
+ <option name="RELAXEDHRULES" value="true" />
+ <option name="SMARTS" value="false" />
+ <option name="STRIKETHROUGH" value="true" />
+ <option name="SUBSCRIPT" value="false" />
+ <option name="SUPERSCRIPT" value="false" />
+ <option name="SUPPRESS_HTML_BLOCKS" value="false" />
+ <option name="SUPPRESS_INLINE_HTML" value="false" />
+ <option name="TABLES" value="true" />
+ <option name="TASKLISTITEMS" value="true" />
+ <option name="TOC" value="false" />
+ <option name="WIKILINKS" value="true" />
+ </PegdownExtensions>
+ <ParserOptions>
+ <option name="COMMONMARK_LISTS" value="false" />
+ <option name="DUMMY" value="false" />
+ <option name="EMOJI_SHORTCUTS" value="true" />
+ <option name="FLEXMARK_FRONT_MATTER" value="false" />
+ <option name="GFM_TABLE_RENDERING" value="true" />
+ <option name="GITBOOK_URL_ENCODING" value="false" />
+ <option name="GITHUB_EMOJI_URL" value="false" />
+ <option name="GITHUB_LISTS" value="true" />
+ <option name="GITHUB_WIKI_LINKS" value="true" />
+ <option name="JEKYLL_FRONT_MATTER" value="false" />
+ <option name="SIM_TOC_BLANK_LINE_SPACER" value="true" />
+ </ParserOptions>
+ </ParserSettings>
+ <HtmlSettings headerTopEnabled="false" headerBottomEnabled="false" bodyTopEnabled="false" bodyBottomEnabled="false" embedUrlContent="false" addPageHeader="true">
+ <GeneratorProvider>
+ <provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.generator" providerName="Default Swing HTML Generator" />
+ </GeneratorProvider>
+ <headerTop />
+ <headerBottom />
+ <bodyTop />
+ <bodyBottom />
+ </HtmlSettings>
+ <CssSettings previewScheme="UI_SCHEME" cssUri="" isCssUriEnabled="false" isCssTextEnabled="false" isDynamicPageWidth="true">
+ <StylesheetProvider>
+ <provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.css" providerName="Default Swing Stylesheet" />
+ </StylesheetProvider>
+ <ScriptProviders />
+ <cssText />
+ </CssSettings>
+ <HtmlExportSettings updateOnSave="false" parentDir="$ProjectFileDir$" targetDir="$ProjectFileDir$" cssDir="" scriptDir="" plainHtml="false" imageDir="" copyLinkedImages="false" imageUniquifyType="0" targetExt="" useTargetExt="false" noCssNoScripts="false" linkToExportedHtml="true" exportOnSettingsChange="true" regenerateOnProjectOpen="false" />
+ <LinkMapSettings>
+ <textMaps />
+ </LinkMapSettings>
+ </component>
+</project>
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 000000000..94a25f7f4
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="VcsDirectoryMappings">
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
+ </component>
+</project>
\ No newline at end of file
diff --git a/website/.babelrc b/website/.babelrc
new file mode 100644
index 000000000..8853ed676
--- /dev/null
+++ b/website/.babelrc
@@ -0,0 +1,7 @@
+{
+ presets: [
+ "stage-2",
+ "react",
+ "es2015"
+ ]
+}
diff --git a/website/.eslintrc b/website/.eslintrc
new file mode 100644
index 000000000..35af3040a
--- /dev/null
+++ b/website/.eslintrc
@@ -0,0 +1,37 @@
+{
+ "extends": [
+ "eslint-config-prettier",
+ "eslint-config-uber-es2015",
+ "eslint-config-uber-jsx",
+ "prettier",
+ "prettier/react"
+ ],
+ "parser": "babel-eslint",
+ "plugins": [
+ "babel",
+ "prettier"
+ ],
+ "rules": {
+ "valid-jsdoc": 0,
+ "no-var": 0,
+ "max-len": 0,
+ "react/no-did-mount-set-state": 0,
+ "react/no-multi-comp": 0,
+ "prefer-spread": 1,
+ "prefer-template": 1,
+ "quote-props": 1,
+ "spaced-comment": 1,
+ "max-params": 0,
+ "no-multiple-empty-lines": 1,
+ "no-process-env": 0,
+ "no-inline-comments": 0,
+ "no-invalid-this": 0,
+ "no-unused-expressions": 0,
+ "camelcase": 0,
+ "consistent-return": 0,
+ "comma-dangle": 1
+ },
+ "globals": {
+ "process": false
+ }
+}
diff --git a/website/README.md b/website/README.md
new file mode 100644
index 000000000..b9df28e1b
--- /dev/null
+++ b/website/README.md
@@ -0,0 +1,6 @@
+This is the source code of the demo website for kepler.gl.
+
+## Developing
+
+ npm install
+ export MapboxAccessToken=<insert_your_token> && npm start
diff --git a/website/index.html b/website/index.html
new file mode 100644
index 000000000..b9a8b72b7
--- /dev/null
+++ b/website/index.html
@@ -0,0 +1,17 @@
+<!doctype html>
+<html>
+ <head>
+ <meta charset='UTF-8' />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="Kepler.gl is a data agnostic, WebGL empowered, high-performance web application for geospatial analytic visualizations.">
+ <title>Kepler.gl</title>
+ <link rel="shortcut icon" href="favicon.png">
+ <link rel="stylesheet" id="font-link" href="https://d1a3f4spazzrp4.cloudfront.net/uber-fonts/3.1.0/refresh.css">
+ <style>
+ body {margin: 0; padding: 0; overflow: hidden;}
+ </style>
+ </head>
+ <body>
+ <script src='bundle.js'></script>
+ </body>
+</html>
diff --git a/website/package.json b/website/package.json
new file mode 100644
index 000000000..0e65c8e33
--- /dev/null
+++ b/website/package.json
@@ -0,0 +1,57 @@
+{
+ "name": "kepler.gl",
+ "description": "Website for kepler.gl",
+ "license": "MIT",
+ "author": "Shan He <[email protected]>",
+ "main": "dist/index.js",
+ "engines": {
+ "node": "^8.7.0",
+ "npm": "^5.4.2",
+ "yarn": "^0.27.5"
+ },
+ "scripts": {
+ "start": "webpack-dev-server --env.local --progress --open",
+ "build-clean": "rm -rf ./dist && mkdir dist",
+ "build-static": "cp -r ./src/static/* dist && cd `git rev-parse --show-toplevel`",
+ "build-script": "webpack -p --env.prod",
+ "build": "npm run build-clean && npm run build-static && npm run build-script",
+ "lint": "eslint src"
+ },
+ "dependencies": {
+ "classnames": "^2.2.5",
+ "global": "^4.3.2",
+ "react": "^15.4.1",
+ "react-dom": "^15.4.1",
+ "react-redux": "^4.4.5",
+ "react-router": "^3.0.5",
+ "react-router-redux": "^4.0.8",
+ "redux": "^3.6.0",
+ "redux-actions": "^1.2.0",
+ "styled-components": "^2.2.4"
+ },
+ "devDependencies": {
+ "babel-core": "^6.25.0",
+ "babel-eslint": "6.1.0",
+ "babel-loader": "^7.1.1",
+ "babel-preset-es2015": "^6.24.1",
+ "babel-preset-react": "^6.24.1",
+ "babel-preset-stage-0": "^6.24.1",
+ "eslint": "^3.0.0",
+ "eslint-config-prettier": "^2.4.0",
+ "eslint-config-uber-es2015": "^3.0.0",
+ "eslint-config-uber-jsx": "^3.0.0",
+ "eslint-plugin-babel": "^4.1.2",
+ "eslint-plugin-prettier": "^2.2.0",
+ "eslint-plugin-react": "^6.0.0",
+ "file-loader": "^1.1.11",
+ "prettier": "^1.7.0",
+ "source-map-loader": "^0.2.1",
+ "url-loader": "^0.5.9",
+ "webpack": "^2.2.0",
+ "webpack-dev-server": "^2.2.0"
+ },
+ "peerDependencies": {
+ "react": "0.14.x - 16.x",
+ "react-dom": "0.14.x - 16.x"
+ }
+}
diff --git a/website/src/components/app.js b/website/src/components/app.js
new file mode 100644
index 000000000..5aa8f46dd
--- /dev/null
+++ b/website/src/components/app.js
@@ -0,0 +1,53 @@
+import React, {Component} from 'react';
+import styled, {ThemeProvider} from 'styled-components';
+import {theme} from '../styles';
+import {connect} from 'react-redux';
+
+const GlobalStyle = styled.div`
+ font-family: ff-clan-web-pro, 'Helvetica Neue', Helvetica, sans-serif;
+ font-weight: 400;
+ font-size: 0.875em;
+ line-height: 1.71429;
+ color: ${props => props.theme.textColor};
+
+ *,
+ *:before,
+ *:after {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ }
+
+ ul {
+ margin: 0;
+ padding: 0;
+ }
+
+ li {
+ margin: 0;
+ }
+
+ a {
+ text-decoration: none;
+ color: ${props => props.theme.labelColor};
+ }
+`;
+
+class App extends Component {
+
+ render() {
+ const {children} = this.props;
+
+ return (
+ <ThemeProvider theme={theme}>
+ <GlobalStyle className="kg-web-content">
+ {children}
+ </GlobalStyle>
+ </ThemeProvider>
+ );
+ }
+}
+
+export default connect(
+ state => state
+)(App);
diff --git a/website/src/components/common/styled-components.js b/website/src/components/common/styled-components.js
new file mode 100644
index 000000000..3c8208e03
--- /dev/null
+++ b/website/src/components/common/styled-components.js
@@ -0,0 +1,59 @@
+import styled from 'styled-components';
+
+export const Button = styled.div.attrs({
+ className: 'kg-button'
+})`
+ align-items: center;
+ background-color: ${props =>
+ props.negative
+ ? props.theme.negativeBtnBgd
+ : props.secondary
+ ? props.theme.secondaryBtnBgd
+ : props.link ? props.theme.linkBtnBgd : props.theme.primaryBtnBgd};
+ border-radius: ${props => props.theme.primaryBtnRadius};
+ color: ${props =>
+ props.negative
+ ? props.theme.negativeBtnColor
+ : props.secondary
+ ? props.theme.secondaryBtnColor
+ : props.link ? props.theme.linkBtnColor : props.theme.primaryBtnColor};
+ cursor: pointer;
+ display: inline-flex;
+ font-size: ${props => (props.large ? '14px' : '11px')};
+ font-weight: 500;
+ justify-content: center;
+ letter-spacing: 0.3px;
+ line-height: 14px;
+ outline: 0;
+ padding: ${props => (props.large ? '14px 32px' : '9px 12px')};
+ text-align: center;
+ transition: ${props => props.theme.transition};
+ vertical-align: middle;
+ width: ${props => props.width || 'auto'};
+
+ :hover,
+ :focus,
+ :active,
+ &.active {
+ background-color: ${props =>
+ props.negative
+ ? props.theme.negativeBtnBgdHover
+ : props.secondary
+ ? props.theme.secondaryBtnBgdHover
+ : props.link
+ ? props.theme.linkBtnActBgdHover
+ : props.theme.primaryBtnBgdHover};
+ color: ${props =>
+ props.negative
+ ? props.theme.negativeBtnActColor
+ : props.secondary
+ ? props.theme.secondaryBtnActColor
+ : props.link
+ ? props.theme.linkBtnActColor
+ : props.theme.primaryBtnActColor};
+ }
+
+ svg {
+ margin-right: 8px;
+ }
+`;
diff --git a/website/src/components/home.js b/website/src/components/home.js
new file mode 100644
index 000000000..0dac2469c
--- /dev/null
+++ b/website/src/components/home.js
@@ -0,0 +1,345 @@
+import React, {Component} from 'react';
+import window from 'global/window';
+import styled, {keyframes} from 'styled-components';
+import {media, breakPoints} from '../styles';
+
+export const CLOUDFRONT = 'https://d1a3f4spazzrp4.cloudfront.net/';
+
+export const KEPLER_GL_BUCKET = 'kepler.gl/';
+
+import {Button} from './common/styled-components';
+
+// ee755ad8-3d68-4559-ab6b-cdcedb3a4d04
+const imgRatio = 696 / 1080;
+
+const imageSize = {w: 1080, h: 696, top: 137, right: 132, palm: 272};
+const screenSize = {w: 1680, h: 954};
+const imgToScrRatio = imageSize.w / screenSize.w;
+
+const imgMinW = 800;
+const screenMinW = 840 / imgToScrRatio;
+const minRight = imageSize.right / imageSize.w * imgMinW;
+const minTop = imageSize.top / imageSize.w * imgMinW;
+
+const IMAGES = [
+ 'kepler.gl-hex.png',
+ 'kepler.gl-scatterplot.png',
+ 'kepler.gl-contour.png'
+];
+
+const IMAGES_S = IMAGES.map(img => img.replace('.png', '_s.png'));
+const LOGO = 'viz_logo_bw.png';
+
+const StyledHome = styled.div`
+ background-color: ${props => props.theme.mapBackground};
+ height: 100vh;
+`;
+
+const StyledMapContainer = styled.div`
+ position: fixed;
+ top: 0;
+ left: 0;
+ z-index: 0;
+
+ .kg-home__map__blocker {
+ width: 100%;
+ height: 100%;
+ position: fixed;
+ top: 0;
+ left: 0;
+ background-color: ${props => props.theme.mapBackground};
+ opacity: 0;
+ z-index: 1;
+ pointer-events: none;
+ }
+
+ .mapboxgl-map .mapboxgl-missing-css {
+ display: none;
+ }
+
+ ${media.palm`
+ display: none;
+ `}
+`;
+
+const StyledHomeContent = styled.div`
+ padding-top: 136px;
+ position: relative;
+ z-index: 1;
+ display: flex;
+ justify-content: space-between;
+
+ ${media.palm`
+ padding-left: 24px;
+ padding-right: 24px;
+ padding-top: 76px;
+ align-items: center;
+ flex-direction: column;
+ display: flex;
+ `}
+`;
+
+// based on keyframe aniamtion to fade img
+// http://css3.bradshawenterprises.com/cfimg/
+
+// styled-components keyframe
+// https://github.com/styled-components/styled-components/blob/master/docs/tips-and-tricks.md
+
+const a = 3;
+const b = 2;
+const d = a + b;
+const n = 3;
+const t = d * 3;
+
+const animationName = keyframes`
+ 0% {
+ opacity:1;
+ }
+ ${a / t * 100}% {
+ opacity:1;
+ }
+ ${1 / n * 100}% {
+ opacity:0;
+ }
+ ${(1 - b / t) * 100}% {
+ opacity:0;
+ }
+ 100% {
+ opacity:1;
+ }
+`;
+
+const StyledImgContainer = styled.div`
+ box-shadow: 0 12px 24px 0 rgba(0,0,0,0.50);
+ flex-shrink: 0;
+ opacity: 1;
+ position: relative;
+
+ ${media.palm`
+ width: 100%;
+ `}
+
+ img {
+ animation-name: ${animationName};
+ animation-timing-function: ease-in-out;
+ animation-iteration-count: infinite;
+ animation-duration: ${d * n}s;
+ }
+
+ img:nth-of-type(1) {
+ animation-delay: ${d * 2}s;
+ }
+ img:nth-of-type(2) {
+ animation-delay: ${d}s;
+ }
+ img:nth-of-type(3) {
+ animation-delay: 0s;
+ }
+
+`;
+
+const StyledCaption = styled.div`
+ width: 240px;
+ margin-right: 60px;
+ padding-top: 70px;
+ flex-shrink: 0;
+
+ ${media.palm`
+ width: auto;
+ padding-top: 0;
+ margin-right: 0;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ `}
+
+ .kg-home__caption__title {
+ font-size: 44px;
+ letter-spacing: 1.83px;
+ margin-bottom: 20px;
+ font-weight: 600;
+ }
+
+ .kg-home__caption__description {
+ font-size: 14px;
+ color: ${props => props.theme.labelColor};
+ line-height: 24px;
+ margin-bottom: 64px;
+
+ span.t-bold {
+ color: ${props => props.theme.textColor};
+ font-weight: 500;
+ }
+
+
+ ${media.palm`
+ margin-bottom: 32px;
+ text-align: center;
+ `}
+ }
+
+ .kg-home__caption__bottom {
+ ${media.palm`
+ margin-top: 30px;
+ text-align: center;
+ `}
+
+ .kg-home__caption__bottom__title {
+ font-size: 16px;
+ letter-spacing: 0.67px;
+ margin-bottom: 16px;
+ font-weight: 600;
+ }
+
+ .kg-button {
+ background: #005CD2;
+ box-shadow: 0 4px 16px 0 rgba(0,0,0,0.24);
+ letter-spacing: 0.25px;
+ font-weight: 600;
+
+ :hover {
+ background: #196CD6;
+ }
+ }
+ }
+`;
+
+const StyledFooter = styled.div`
+ position: absolute;
+ bottom: 24px;
+ display: flex;
+ justify-content: center;
+ width: 100%;
+ font-size: 11px;
+ color: ${props => props.theme.footerColor};
+ letter-spacing: 0.5px;
+ align-items: center;
+ line-height: 14px;
+
+ ${media.palm`
+ margin-top: 16px;
+ position: relative;
+ bottom: auto;
+ `}
+`;
+
+const StyledLogo = styled.span`
+ font-size: 11px;
+ font-weight: 700;
+ letter-spacing: 4px;
+ position: relative;
+ margin-left: 2.2rem;
+ margin-top: 0;
+ margin-bottom: 0;
+
+ a {
+ padding: 0 1rem 0 0;
+ color: #E5E5E4;
+ letter-spacing: 2px;
+ }
+
+ :before {
+ content: "";
+ background: url(${`${CLOUDFRONT}${KEPLER_GL_BUCKET}${LOGO}`}) no-repeat;
+ background-size: cover;
+ height: 20px;
+ width: 24px;
+ position: absolute;
+ top: -2px;
+ left: -30px;
+ }
+`;
+
+class Home extends Component {
+ state = {
+ window: window.innerWidth,
+ height: window.innerHeight
+ };
+ componentDidMount() {
+ window.addEventListener('resize', this.resize);
+ this.resize();
+ }
+ componentWillUnmount() {
+ window.removeEventListener('resize', this.resize);
+ }
+ resize = () => {
+ this.setState({
+ width: window.innerWidth,
+ height: window.innerHeight
+ });
+ };
+ render() {
+ const isPalm = this.state.width <= breakPoints.palm;
+ const imgW = isPalm ? this.state.width - 48 : this.state.width * imgToScrRatio;
+ const shrink = this.state.width / screenSize.w;
+
+ return (
+ <StyledHome className="kg-home">
+ <StyledMapContainer className="kg-home__map">
+ <div className="kg-home__map__blocker"/>
+ <img style={{
+ width: `${this.state.width}px`,
+ height: 'auto',
+ minWidth: `${screenMinW}px`
+ }}
+ src={`${CLOUDFRONT}${KEPLER_GL_BUCKET}kepler.gl-background.png`}/>
+ </StyledMapContainer>
+
+ <StyledHomeContent style={isPalm ? {} : {
+ paddingLeft: `${Math.max(imageSize.right * shrink, minRight)}px`,
+ paddingRight: `${Math.max(imageSize.right * shrink, minRight)}px`,
+ paddingTop: `${Math.max(imageSize.top * shrink, minTop)}px`
+ }}>
+ <StyledCaption>
+ <div className="kg-home__caption__title">Kepler.Gl</div>
+ <div className="kg-home__caption__description">
+ <span>Kepler is a powerful </span>
+ <span className="t-bold">web-based </span>
+ <span>geospatial data analysis tool. Built on a </span>
+ <span className="t-bold">high performance </span>
+ <span>rendering engine and designed for </span>
+ <span className="t-bold">large-scale </span>
+ <span>data sets.</span>
+ </div>
+ {isPalm ? <StyledImgContainer
+ style={{
+ width: `${imgW}px`,
+ height: `${imgW * imgRatio}px`}}
+ >
+ {IMAGES_S.map(src => (
+ <img key={src} style={{width: '100%', height: '100%', display: 'block', position: 'absolute', top: 0}}
+ src={`${CLOUDFRONT}${KEPLER_GL_BUCKET}${src}`}/>))}
+ </StyledImgContainer> : null}
+ <div className="kg-home__caption__bottom">
+ <div className="kg-home__caption__bottom__title">Coming soon in April 2018</div>
+ <Button large>
+ <a target="_blank" rel="noopener noreferrer"
+ href="http://t.uber.com/join-kepler.gl"
+ >Keep Me Updated</a>
+ </Button>
+ </div>
+ </StyledCaption>
+ {!isPalm ? <StyledImgContainer style={{
+ width: `${imgW}px`,
+ height: `${imgW * imgRatio}px`,
+ minWidth: `${imgMinW}px`,
+ minHeight: `${imgMinW * imgRatio}px`
+ }}>
+ {IMAGES.map(src => (
+ <img key={src} style={{width: '100%', height: '100%', position: 'absolute', top: 0}}
+ src={`${CLOUDFRONT}${KEPLER_GL_BUCKET}${src}`}/>
+ ))}
+ </StyledImgContainer> : null}
+ </StyledHomeContent>
+ <StyledFooter>
+ <div>Created By</div>
+ <StyledLogo className="fg">
+ <a target="_blank" rel="noopener noreferrer" href="http://vis.gl">VIS.GL</a>
+ </StyledLogo>
+ </StyledFooter>
+ </StyledHome>
+ );
+ }
+}
+
+export default Home;
diff --git a/website/src/main.js b/website/src/main.js
new file mode 100644
index 000000000..17090a047
--- /dev/null
+++ b/website/src/main.js
@@ -0,0 +1,21 @@
+// import 'babel-polyfill';
+// import 'babel-register';
+
+import React from 'react';
+import ReactDOM from 'react-dom';
+import {Provider} from 'react-redux';
+import store from './reducers';
+import Routes from './routes';
+import document from 'global/document';
+
+require('./static/favicon.png');
+
+const el = document.createElement('div');
+document.body.appendChild(el);
+
+ReactDOM.render(
+ <Provider store={store} >
+ <Routes />
+ </Provider>,
+ el
+);
diff --git a/website/src/reducers/app.js b/website/src/reducers/app.js
new file mode 100644
index 000000000..c72434293
--- /dev/null
+++ b/website/src/reducers/app.js
@@ -0,0 +1,7 @@
+import {handleActions} from 'redux-actions';
+
+const DEFAULT_APP_STATE = {};
+
+export default handleActions({
+ INIT: (state, action) => ({...state, ready: true})
+}, DEFAULT_APP_STATE);
diff --git a/website/src/reducers/index.js b/website/src/reducers/index.js
new file mode 100644
index 000000000..ed463964e
--- /dev/null
+++ b/website/src/reducers/index.js
@@ -0,0 +1,10 @@
+import {createStore, combineReducers} from 'redux';
+import appReducer from './app';
+import {routerReducer } from 'react-router-redux'
+
+export default createStore(
+ combineReducers({
+ app: appReducer,
+ routing: routerReducer
+ })
+);
diff --git a/website/src/routes.js b/website/src/routes.js
new file mode 100644
index 000000000..8e3156384
--- /dev/null
+++ b/website/src/routes.js
@@ -0,0 +1,16 @@
+import React from 'react';
+import {Router, Route, IndexRoute, browserHistory} from 'react-router';
+import {syncHistoryWithStore} from 'react-router-redux';
+import store from './reducers';
+
+import Home from './components/home';
+import App from './components/app';
+
+// eslint-disable-next-line react/display-name
+export default () => (
+ <Router history={syncHistoryWithStore(browserHistory, store)}>
+ <Route path="/" component={App}>
+ <IndexRoute component={Home} />
+ </Route>
+ </Router>
+);
diff --git a/website/src/styles.js b/website/src/styles.js
new file mode 100644
index 000000000..865fefe35
--- /dev/null
+++ b/website/src/styles.js
@@ -0,0 +1,57 @@
+import {css} from 'styled-components';
+
+export const breakPoints = {
+ palm: 588,
+ desk: 768
+};
+
+export const media = {
+ palm: (...args) => css`
+ @media (max-width: ${breakPoints.palm}px) {
+ ${css(...args)}
+ }
+ `,
+
+ portable: (...args) => css`
+ @media (max-width: ${breakPoints.desk}px) {
+ ${css(...args)}
+ }
+ `,
+
+ desk: (...args) => css`
+ @media (min-width: ${breakPoints.desk + 1}px) {
+ ${css(...args)}
+ }
+ `
+};
+
+export const errorColor = '#F9042C';
+
+export const theme = {
+ textColor: '#FFFFFF',
+ labelColor: '#D0D0D0',
+ mapBackground: '#0f1d28',
+ footerColor: '#C0C0C0',
+ // button:
+ primaryBtnBgd: '#0F9668',
+ primaryBtnActBgd: '#13B17B',
+ primaryBtnColor: '#FFFFFF',
+ primaryBtnActColor: '#FFFFFF',
+ primaryBtnBgdHover: '#13B17B',
+ primaryBtnRadius: '2px',
+ secondaryBtnBgd: '#6A7485',
+ secondaryBtnActBgd: '#A0A7B4',
+ secondaryBtnColor: '#FFFFFF',
+ secondaryBtnActColor: '#FFFFFF',
+ secondaryBtnBgdHover: '#A0A7B4',
+ linkBtnBgd: 'transparent',
+ linkBtnActBgd: 'transparent',
+ linkBtnColor: '#A0A7B4',
+ linkBtnActColor: '#3A414C',
+ linkBtnActBgdHover: 'transparent',
+ negativeBtnBgd: errorColor,
+ negativeBtnActBgd: '#FF193E',
+ negativeBtnBgdHover: '#FF193E',
+ negativeBtnColor: '#FFFFFF',
+ negativeBtnActColor: '#FFFFFF'
+};
diff --git a/website/webpack.config.js b/website/webpack.config.js
new file mode 100644
index 000000000..457a1d371
--- /dev/null
+++ b/website/webpack.config.js
@@ -0,0 +1,102 @@
+const {resolve, join} = require('path');
+const webpack = require('webpack');
+
+const rootDir = join(__dirname, '..');
+const libSources = join(rootDir, 'src');
+
+// Otherwise modules imported from outside this directory does not compile
+// Seems to be a Babel bug
+// https://github.com/babel/babel-loader/issues/149#issuecomment-191991686
+const BABEL_CONFIG = {
+ presets: [
+ 'es2015',
+ 'stage-2',
+ 'react'
+ ].map(name => require.resolve(`babel-preset-${name}`))
+};
+
+const COMMON_CONFIG = {
+
+ entry: ['./src/main'],
+
+ module: {
+ rules: [
+ {
+ // Compile ES2015 using bable
+ test: /\.js$/,
+ loader: 'babel-loader',
+ options: BABEL_CONFIG,
+ include: [resolve('..'), libSources],
+ exclude: [/node_modules/]
+ }, {
+ test: /\.(eot|svg|ico|ttf|woff|woff2|gif|jpe?g|png)$/,
+ loader: 'url-loader'
+ }, {
+ test: /\.(svg|ico|gif|jpe?g|png)$/,
+ loader: 'file-loader?name=[name].[ext]'
+ }
+ ]
+ },
+
+ node: {
+ fs: 'empty'
+ },
+
+ plugins: [
+ new webpack.DefinePlugin({
+ MapboxAccessToken: `"${process.env.MapboxAccessToken}"` // eslint-disable-line
+ })
+ ]
+
+};
+
+const addDevConfig = config => {
+
+ config.module.rules.push({
+ // Unfortunately, webpack doesn't import library sourcemaps on its own...
+ test: /\.js$/,
+ use: ['source-map-loader'],
+ enforce: 'pre'
+ });
+
+ return Object.assign(config, {
+
+ devtool: 'source-maps',
+
+ plugins: config.plugins.concat([
+ // new webpack.HotModuleReplacementPlugin(),
+ new webpack.NoEmitOnErrorsPlugin()
+ ])
+
+ });
+
+};
+
+const addProdConfig = config => {
+
+ return Object.assign(config, {
+ output: {
+ path: resolve(__dirname, './dist'),
+ filename: 'bundle.js'
+ }
+ });
+};
+
+module.exports = env => {
+ env = env || {};
+
+ let config = COMMON_CONFIG;
+
+ if (env.local) {
+ config = addDevConfig(config);
+ }
+
+ if (env.prod) {
+ config = addProdConfig(config);
+ }
+
+ // Enable to debug config
+ // console.warn(JSON.stringify(config, null, 2));
+
+ return config;
+};