Skip to content

Commit 7c44444

Browse files
Upgrade website (visgl#1137)
* Upgrade website * fix CI
1 parent 978dd0a commit 7c44444

File tree

14 files changed

+100
-25
lines changed

14 files changed

+100
-25
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Contributing to react-map-gl
1+
# Contributing to react-map-gl
22

33
**Thanks for taking the time to contribute!**
44

docs/contributing.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../CONTRIBUTING.md

docs/get-started/adding-custom-data.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ There are a couple of [additional overlays](https://github.com/visgl/react-map-g
8080

8181
Third party overlays can also be created. For example, the [heatmap-overlay](https://github.com/vicapow/react-map-gl-heatmap-overlay) uses [webgl-heatmap](https://github.com/vicapow/webgl-heatmap) to create geographic heatmaps.
8282

83-
<img width=200 src="https://cloud.githubusercontent.com/assets/499192/11028150/33f34640-86bc-11e5-9678-3fa1798394d5.gif" />
83+
<img width="200" src="https://cloud.githubusercontent.com/assets/499192/11028150/33f34640-86bc-11e5-9678-3fa1798394d5.gif" />
8484

8585
```js
8686
import HeatmapOverlay from 'react-map-gl-heatmap-overlay';

docs/table-of-contents.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{ "entry": "docs" },
88
{ "entry": "docs/whats-new" },
99
{ "entry": "docs/upgrade-guide" },
10-
{ "entry": "CONTRIBUTING" }
10+
{ "entry": "docs/contributing" }
1111
]
1212
},
1313
{

test/render/test-cases.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default [
4545
latitude: 37.78,
4646
zoom: 12.5
4747
},
48-
mapError: /Unauthorized/
48+
mapError: /access token/
4949
},
5050
{
5151
title: 'Custom tile server',

website/gatsby-config.js

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
const resolve = require('path').resolve;
1+
const {resolve} = require('path');
22
const DOC_TABLE_OF_CONTENTS = require('../docs/table-of-contents.json');
33

4+
const ROOT_DIR = resolve('..');
5+
46
module.exports = {
57
plugins: [
68
{
@@ -10,24 +12,28 @@ module.exports = {
1012

1113
// Folders
1214
DIR_NAME: __dirname,
13-
ROOT_FOLDER: `${__dirname}/../`,
15+
ROOT_FOLDER: ROOT_DIR,
1416

1517
DOCS: DOC_TABLE_OF_CONTENTS,
1618
DOC_FOLDERS: [
17-
`${__dirname}/../docs/`
19+
resolve(ROOT_DIR, 'docs')
20+
],
21+
SOURCE: [
22+
resolve('./static'),
23+
resolve('./src'),
1824
],
19-
SOURCE: [`${__dirname}/static`],
2025

2126
PROJECT_TYPE: 'github',
2227

2328
PROJECT_NAME: 'react-map-gl',
2429
PROJECT_ORG: 'uber',
25-
PROJECT_ORG_LOGO: 'images/uber-logo.png',
30+
PROJECT_ORG_LOGO: 'images/visgl-logo.png',
2631
PROJECT_URL: 'https://github.com/visgl/',
2732
PROJECT_DESC: 'React wrapper for Mapbox GL JS',
28-
PATH_PREFIX: '/react-map-gl/',
33+
PROJECT_IMAGE: 'images/hero-sm.jpg',
34+
PATH_PREFIX: '/react-map-gl',
2935

30-
GA_TRACKING: null,
36+
GA_TRACKING_ID: 'UA-74374017-2',
3137

3238
// For showing star counts and contributors.
3339
// Should be like btoa('YourUsername:YourKey') and should be readonly.
@@ -56,7 +62,7 @@ module.exports = {
5662

5763
LINK_TO_GET_STARTED: '/docs/get-started/get-started',
5864

59-
ADDITIONAL_LINKS: [{name: 'Blog', href: 'http://medium.com/vis-gl', index: 1}],
65+
ADDITIONAL_LINKS: [{name: 'Blog', href: 'http://medium.com/vis-gl', index: 4}],
6066

6167
INDEX_PAGE_URL: resolve(__dirname, './src/home.js'),
6268

@@ -147,6 +153,8 @@ module.exports = {
147153
}
148154
],
149155

156+
THEME_OVERRIDES: require('./src/theme.json'),
157+
150158
STYLESHEETS: [
151159
'https://api.tiles.mapbox.com/mapbox-gl-js/v1.6.0/mapbox-gl.css',
152160
'https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-draw/v1.0.9/mapbox-gl-draw.css',

website/gatsby-node.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ module.exports.onCreateWebpackConfig = function onCreateWebpackConfigOverride(op
2727
}
2828

2929
Object.assign(config.resolve.alias, {
30-
'react-map-gl': resolve(__dirname, '../dist/es6')
30+
'react-map-gl': resolve(__dirname, '../dist/es6'),
31+
react: resolve('node_modules/react'),
32+
'react-dom': resolve('node_modules/react-dom')
3133
}, dependencyAliases);
3234

3335
// turf.js uses mjs

website/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,16 @@
1818
"d3-scale": "^1.0.6",
1919
"gl-matrix": "^3.0.0",
2020
"immutable": "^3.7.5",
21+
"react": "^16.8.6",
22+
"react-dom": "^16.8.6",
2123
"react-map-gl-draw": "^0.17.2",
2224
"styled-components": "^4.3.2"
2325
},
2426
"devDependencies": {
25-
"gatsby": "~2.20.24",
27+
"gatsby": "^2.20.24",
2628
"gatsby-plugin-env-variables": "^1.0.1",
2729
"gatsby-plugin-no-sourcemaps": "^2.1.1",
28-
"gatsby-theme-ocular": "^1.2.0-beta.6",
30+
"gatsby-theme-ocular": "^1.2.1",
2931
"gh-pages": "^2.1.0"
3032
}
3133
}

website/src/home.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,19 @@ const HeroExample = styled.div`
1919
height: 100%;
2020
`;
2121

22+
const ContentContainer = styled.div`
23+
padding: 64px;
24+
25+
@media screen and (max-width: 768px) {
26+
padding: 48px;
27+
}
28+
`;
29+
2230
export default class IndexPage extends React.Component {
2331
render() {
2432
return (
2533
<Home HeroExample={HeroExample}>
26-
<div>
34+
<ContentContainer>
2735
<h2>
2836
react-map-gl makes using Mapbox GL JS in React applications easy.
2937
</h2>
@@ -59,7 +67,7 @@ export default class IndexPage extends React.Component {
5967
WebGL visualizations on top of your Mapbox GL JS based maps.
6068
</p>
6169

62-
</div>
70+
</ContentContainer>
6371
</Home>
6472
);
6573
}

website/src/theme.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"primary400": "#00ADE6",
3+
"mono100": "#FFFFFF",
4+
"mono200": "#f7fcfb",
5+
"mono300": "#ecf7f5",
6+
"mono400": "#e1f0ee",
7+
"mono500": "#cae0dc",
8+
"mono600": "#9ec0bb",
9+
"mono700": "#6f9691",
10+
"mono800": "#486865",
11+
"mono900": "#2b4845",
12+
"mono1000": "#101918"
13+
}

0 commit comments

Comments
 (0)