From 1a6179e9319568b6777c6a1c676781bec6ae1d54 Mon Sep 17 00:00:00 2001 From: James Gareth Smith Date: Mon, 9 Jul 2018 09:42:19 +0200 Subject: [PATCH 01/12] set asset prefix --- next.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/next.config.js b/next.config.js index e313a14..ef52ee3 100644 --- a/next.config.js +++ b/next.config.js @@ -1,6 +1,7 @@ const withSass = require('@zeit/next-sass') module.exports = withSass({ + assetPrefix: isProduction ? '/ETHPrize' : '', exportPathMap: function(defaultPathMap) { return { '/': { page: '/' } From ebad4362123ca1d5e66111c499b19e4b332dcfbf Mon Sep 17 00:00:00 2001 From: James Gareth Smith Date: Mon, 9 Jul 2018 09:59:57 +0200 Subject: [PATCH 02/12] setting env with NODE_ENV --- .gitignore | 3 ++- README.md | 2 +- next.config.js | 7 +++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 51bf003..e7fb1a4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /out .next node_modules -.DS_Store \ No newline at end of file +.DS_Store +yarn.lock \ No newline at end of file diff --git a/README.md b/README.md index 07f29f4..bc969b6 100644 --- a/README.md +++ b/README.md @@ -9,4 +9,4 @@ ETHPrize single page React website `npm run deploy` to deploy to `https://nona-creative.github.io/ETHPrize` -`yarn lint` runs the eslinter +`npm lint` runs the eslinter diff --git a/next.config.js b/next.config.js index ef52ee3..dd0dd53 100644 --- a/next.config.js +++ b/next.config.js @@ -1,7 +1,10 @@ -const withSass = require('@zeit/next-sass') +const withSass = require('@zeit/next-sass'); + +const dev = process && process.env && process.env.NODE_ENV === 'development'; + module.exports = withSass({ - assetPrefix: isProduction ? '/ETHPrize' : '', + assetPrefix: dev ? '' : '/ETHPrize', exportPathMap: function(defaultPathMap) { return { '/': { page: '/' } From ddaeae82dcddc98951b025c753605487f3d56181 Mon Sep 17 00:00:00 2001 From: Sharyn Date: Mon, 9 Jul 2018 10:40:49 +0200 Subject: [PATCH 03/12] Setting up Github pages repo for deployment --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 51472ce..85a434b 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ }, "config": { "deployToGit": { - "repository": "git@github.com:Nona-Creative/ETHPrize.git", + "repository": "git@github.com:Nona-Creative/nona-creative.github.io-ETHprize.git", "branch": "master", "folder": "out", "script": "npm run prod-build", From e657b8fb0bad0c739e79417352fa982144d75f4d Mon Sep 17 00:00:00 2001 From: Sharyn Date: Mon, 9 Jul 2018 10:44:42 +0200 Subject: [PATCH 04/12] Updating Readme --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 07f29f4..15342fd 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,11 @@ ETHPrize single page React website ## Setting up - `git clone git@github.com:Nona-Creative/ETHPrize.git` - `npm install` +- `npm run dev` runs the site at `localhost:3000` +- `yarn lint` runs the eslinter -`npm run dev` runs the site at `localhost:3000` - -`npm run deploy` to deploy to `https://nona-creative.github.io/ETHPrize` - -`yarn lint` runs the eslinter +## Deploy to staging +- Make sure `master` branch is up to date with develop +- `npm run deploy` to deploy +- This pushes compiled code to a second repo at `https://github.com/Nona-Creative/nona-creative.github.io-ETHprize` +- View staging Github page at `https://nona-creative.github.io/ETHPrize` From af7ea409cce1ddc253cf35375d8fba11700c7130 Mon Sep 17 00:00:00 2001 From: Sharyn Date: Mon, 9 Jul 2018 10:45:50 +0200 Subject: [PATCH 05/12] Editing Readme --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 15342fd..8f51001 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,8 @@ ETHPrize single page React website - `yarn lint` runs the eslinter ## Deploy to staging -- Make sure `master` branch is up to date with develop +- Make sure `master` branch is up to date with `develop` branch - `npm run deploy` to deploy -- This pushes compiled code to a second repo at `https://github.com/Nona-Creative/nona-creative.github.io-ETHprize` +- This pushes the compiled code to a second repo at `https://github +.com/Nona-Creative/nona-creative.github.io-ETHprize` - View staging Github page at `https://nona-creative.github.io/ETHPrize` From f56a32f23d6ac12717544734ad4aa745c9887753 Mon Sep 17 00:00:00 2001 From: Sharyn Date: Mon, 9 Jul 2018 10:47:08 +0200 Subject: [PATCH 06/12] Formatting --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 8f51001..182c4de 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,5 @@ ETHPrize single page React website ## Deploy to staging - Make sure `master` branch is up to date with `develop` branch - `npm run deploy` to deploy -- This pushes the compiled code to a second repo at `https://github -.com/Nona-Creative/nona-creative.github.io-ETHprize` +- This pushes the compiled code to a second repo at `https://github.com/Nona-Creative/nona-creative.github.io-ETHprize` - View staging Github page at `https://nona-creative.github.io/ETHPrize` From 05272af60dfbc478aa5e40008f246879b0dea947 Mon Sep 17 00:00:00 2001 From: Sharyn Date: Mon, 9 Jul 2018 10:48:30 +0200 Subject: [PATCH 07/12] Editing Readme --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 182c4de..aff39f4 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,6 @@ ETHPrize single page React website - `yarn lint` runs the eslinter ## Deploy to staging -- Make sure `master` branch is up to date with `develop` branch - `npm run deploy` to deploy - This pushes the compiled code to a second repo at `https://github.com/Nona-Creative/nona-creative.github.io-ETHprize` - View staging Github page at `https://nona-creative.github.io/ETHPrize` From 3a9c9b052ad3a05544ed920410f3c254486c415e Mon Sep 17 00:00:00 2001 From: Sharyn Date: Mon, 9 Jul 2018 11:07:56 +0200 Subject: [PATCH 08/12] Fixing paths --- components/resources/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/resources/index.js b/components/resources/index.js index bbc45da..f730659 100644 --- a/components/resources/index.js +++ b/components/resources/index.js @@ -1,8 +1,8 @@ import React from 'react'; import Parser from 'html-react-parser'; import Slider from 'react-slick'; -import Modal from '../../components/modal'; -import WordCloud from '../../components/wordCloud'; +import Modal from '../modal'; +import WordCloud from '../wordCloud'; import Data from '../../data/resources/wordclouds'; import './style.scss'; From bb6600318bd5ee276c2dcd436a2f913d4c56e638 Mon Sep 17 00:00:00 2001 From: Sharyn Date: Mon, 9 Jul 2018 11:22:49 +0200 Subject: [PATCH 09/12] Updating staging URL in Readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index aff39f4..3bce4d1 100644 --- a/README.md +++ b/README.md @@ -10,4 +10,4 @@ ETHPrize single page React website ## Deploy to staging - `npm run deploy` to deploy - This pushes the compiled code to a second repo at `https://github.com/Nona-Creative/nona-creative.github.io-ETHprize` -- View staging Github page at `https://nona-creative.github.io/ETHPrize` +- View staging Github page at `https://nona-creative.github.io/nona-creative.github.io-ETHprize/` From 165a675600918ab4e808cc6ccebc26c3f9eec7e4 Mon Sep 17 00:00:00 2001 From: Sharyn Date: Mon, 9 Jul 2018 11:40:27 +0200 Subject: [PATCH 10/12] Updating staging URL in Readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3bce4d1..1d89228 100644 --- a/README.md +++ b/README.md @@ -10,4 +10,4 @@ ETHPrize single page React website ## Deploy to staging - `npm run deploy` to deploy - This pushes the compiled code to a second repo at `https://github.com/Nona-Creative/nona-creative.github.io-ETHprize` -- View staging Github page at `https://nona-creative.github.io/nona-creative.github.io-ETHprize/` +- View staging Github page at `https://nona-creative.github.io/nona-creative.github.io-ETHprize` From 4e1e7cf90a56a5741c75ab90477f2d0529320aaa Mon Sep 17 00:00:00 2001 From: James Gareth Smith Date: Mon, 9 Jul 2018 13:18:51 +0200 Subject: [PATCH 11/12] test fix for fonts --- assets/styles/base/fonts.scss | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/assets/styles/base/fonts.scss b/assets/styles/base/fonts.scss index ab7ea55..16cb9e5 100644 --- a/assets/styles/base/fonts.scss +++ b/assets/styles/base/fonts.scss @@ -1,11 +1,11 @@ @font-face { font-family: 'bebas_neuebold'; - src: url('/static/fonts/bebasneue_bold-webfont.eot'); - src: url('/static/fonts/bebasneue_bold-webfont.eot?#iefix') format('embedded-opentype'), - url('/static/fonts/bebasneue_bold-webfont.woff2') format('woff2'), - url('/static/fonts/bebasneue_bold-webfont.woff') format('woff'), - url('/static/fonts/bebasneue_bold-webfont.ttf') format('truetype'), - url('/static/fonts/bebasneue_bold-webfont.svg#bebas_neuebold') format('svg'); + src: url('static/fonts/bebasneue_bold-webfont.eot'); + src: url('static/fonts/bebasneue_bold-webfont.eot?#iefix') format('embedded-opentype'), + url('static/fonts/bebasneue_bold-webfont.woff2') format('woff2'), + url('static/fonts/bebasneue_bold-webfont.woff') format('woff'), + url('static/fonts/bebasneue_bold-webfont.ttf') format('truetype'), + url('static/fonts/bebasneue_bold-webfont.svg#bebas_neuebold') format('svg'); font-weight: normal; font-style: normal; } From f8bedec3ea77476fdfd9adfba5f7eb7ab2dbb0bd Mon Sep 17 00:00:00 2001 From: James Gareth Smith Date: Mon, 9 Jul 2018 13:40:21 +0200 Subject: [PATCH 12/12] hardcoded repo to get staging working for client review --- assets/styles/base/fonts.scss | 12 ++++++------ pages/_document.js | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/assets/styles/base/fonts.scss b/assets/styles/base/fonts.scss index 16cb9e5..d62f8d6 100644 --- a/assets/styles/base/fonts.scss +++ b/assets/styles/base/fonts.scss @@ -1,11 +1,11 @@ @font-face { font-family: 'bebas_neuebold'; - src: url('static/fonts/bebasneue_bold-webfont.eot'); - src: url('static/fonts/bebasneue_bold-webfont.eot?#iefix') format('embedded-opentype'), - url('static/fonts/bebasneue_bold-webfont.woff2') format('woff2'), - url('static/fonts/bebasneue_bold-webfont.woff') format('woff'), - url('static/fonts/bebasneue_bold-webfont.ttf') format('truetype'), - url('static/fonts/bebasneue_bold-webfont.svg#bebas_neuebold') format('svg'); + src: url('/nona-creative.github.io-ETHprize/static/fonts/bebasneue_bold-webfont.eot'); + src: url('/nona-creative.github.io-ETHprize/static/fonts/bebasneue_bold-webfont.eot?#iefix') format('embedded-opentype'), + url('/nona-creative.github.io-ETHprize/static/fonts/bebasneue_bold-webfont.woff2') format('woff2'), + url('/nona-creative.github.io-ETHprize/static/fonts/bebasneue_bold-webfont.woff') format('woff'), + url('/nona-creative.github.io-ETHprize/static/fonts/bebasneue_bold-webfont.ttf') format('truetype'), + url('/nona-creative.github.io-ETHprize/static/fonts/bebasneue_bold-webfont.svg#bebas_neuebold') format('svg'); font-weight: normal; font-style: normal; } diff --git a/pages/_document.js b/pages/_document.js index 50993e4..684849d 100644 --- a/pages/_document.js +++ b/pages/_document.js @@ -8,7 +8,7 @@ export default class MyDocument extends Document { - +