diff --git a/package-lock.json b/package-lock.json index 25759d3..9b2289c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3012,11 +3012,13 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true + "bundled": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -3029,15 +3031,18 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "concat-map": { "version": "0.0.1", - "bundled": true + "bundled": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -3140,7 +3145,8 @@ }, "inherits": { "version": "2.0.3", - "bundled": true + "bundled": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -3150,6 +3156,7 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -3162,17 +3169,20 @@ "minimatch": { "version": "3.0.4", "bundled": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "bundled": true + "bundled": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -3189,6 +3199,7 @@ "mkdirp": { "version": "0.5.1", "bundled": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -3261,7 +3272,8 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true + "bundled": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -3271,6 +3283,7 @@ "once": { "version": "1.4.0", "bundled": true, + "optional": true, "requires": { "wrappy": "1" } @@ -3376,6 +3389,7 @@ "string-width": { "version": "1.0.2", "bundled": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", diff --git a/public/index.html b/public/index.html index 32755c6..7a97d4e 100644 --- a/public/index.html +++ b/public/index.html @@ -20,17 +20,10 @@ - - -
+ diff --git a/src/components/app.jsx b/src/components/app.jsx index efe3ba6..11dae3b 100644 --- a/src/components/app.jsx +++ b/src/components/app.jsx @@ -5,6 +5,7 @@ import Loadable from 'react-loadable'; //other stuff import Footer from './panels/footer.jsx'; import GA from './utilities/google_analytics.jsx'; +import GAdverts from './utilities/google_adverts.jsx'; //lazy route loading (with error handling) const LazyRoute = (props) => { @@ -54,6 +55,7 @@ export default class App extends React.Component { render() { return (
+ { GA.init() && } diff --git a/src/components/pages/home.jsx b/src/components/pages/home.jsx index 36d6e49..a4c0e86 100644 --- a/src/components/pages/home.jsx +++ b/src/components/pages/home.jsx @@ -39,7 +39,7 @@ class Home extends React.Component { if (this.state.tagline === 'rainbow') { return (

I hope this CSS rainbow effect works in all browsers!

); } - return (

); + return (
); } return ( diff --git a/src/components/panels/markdown.jsx b/src/components/panels/markdown.jsx index e1c142e..694cb21 100644 --- a/src/components/panels/markdown.jsx +++ b/src/components/panels/markdown.jsx @@ -6,9 +6,9 @@ class Markdown extends React.Component { constructor(props) { super(props); - if (this.props.source) { + if (props.source !== undefined) { this.state = { - data: this.props.source + data: props.source }; } else { this.state = { diff --git a/src/components/utilities/google_adverts.jsx b/src/components/utilities/google_adverts.jsx new file mode 100644 index 0000000..e55f9c3 --- /dev/null +++ b/src/components/utilities/google_adverts.jsx @@ -0,0 +1,27 @@ +import React from 'react'; + +class GoogleAdverts extends React.Component { + comonentDidMount() { + (adsbygoogle = window.adsbygoogle || []).push({}); + } + + shouldComponentUpdate() { + return false; + } + + render() { + return ( +
+ +
+ ); + } +}; + +export default GoogleAdverts;