diff --git a/package-lock.json b/package-lock.json index 885ea64..130377c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -917,6 +917,11 @@ "integrity": "sha512-FhlMa34NHp9K5MY1Uz8yb+ZvuX0pnvn3jScRSNAb75KHGB8d3rEU6hqMs3Z2vjuytcMfRg6c5CHMc3wtYyD2/A==", "optional": true }, + "@types/cookie": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.3.2.tgz", + "integrity": "sha512-aHQA072E10/8iUQsPH7mQU/KUyQBZAGzTVRCUvnSz8mSvbrYsP4xEO2RSA0Pjltolzi0j8+8ixrm//Hr4umPzw==" + }, "@types/form-data": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-2.2.1.tgz", @@ -936,6 +941,14 @@ "@types/request": "*" } }, + "@types/hoist-non-react-statics": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.0.1.tgz", + "integrity": "sha512-3wTz66vV+WatOAjMST+hKCmo01KYPFgnsu+QeLcn0FuwPCoymX6aj1a4RvFCdVsfh2m0hfTPhE/zTv4M28ho1Q==", + "requires": { + "@types/react": "*" + } + }, "@types/jss": { "version": "9.5.5", "resolved": "https://registry.npmjs.org/@types/jss/-/jss-9.5.5.tgz", @@ -961,6 +974,11 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.36.tgz", "integrity": "sha512-SL6KhfM7PTqiFmbCW3eVNwVBZ+88Mrzbuvn9olPsfv43mbiWaFY+nRcz/TGGku0/lc2FepdMbImdMY1JrQ+zbw==" }, + "@types/object-assign": { + "version": "4.0.30", + "resolved": "http://registry.npmjs.org/@types/object-assign/-/object-assign-4.0.30.tgz", + "integrity": "sha1-iUk3HVqZ9Dge4PHfCpt6GH4H5lI=" + }, "@types/prop-types": { "version": "15.5.5", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.5.5.tgz", @@ -5661,7 +5679,7 @@ }, "core-js": { "version": "2.5.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.5.tgz", + "resolved": "http://registry.npmjs.org/core-js/-/core-js-2.5.5.tgz", "integrity": "sha1-sU3ek2xkDAV5prUMq8wTLdYSfjs=" }, "firebase": { @@ -12494,6 +12512,26 @@ "schedule": "^0.4.0" } }, + "react-cookie": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/react-cookie/-/react-cookie-3.0.7.tgz", + "integrity": "sha512-c4lGOqIPC54kUocE7kbuqZNeIdXtZGzXQMA7BSWhaJ/5tWeoW5fJ7mF/pR+rU5fYDF9kktTHCIbovwSsNYblOg==", + "requires": { + "@types/hoist-non-react-statics": "^3.0.1", + "hoist-non-react-statics": "^3.0.0", + "universal-cookie": "^3.0.7" + }, + "dependencies": { + "hoist-non-react-statics": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.2.0.tgz", + "integrity": "sha512-3IascCRfaEkbmHjJnUxWSspIUE1okLPjGTMVXW8zraUo1t3yg1BadKAxAGILHwgoBzmMnzrgeeaDGBvpuPz6dA==", + "requires": { + "react-is": "^16.3.2" + } + } + } + }, "react-dev-utils": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-5.0.2.tgz", @@ -12577,6 +12615,11 @@ "resize-observer-polyfill": "^1.5.0" } }, + "react-is": { + "version": "16.6.3", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.6.3.tgz", + "integrity": "sha512-u7FDWtthB4rWibG/+mFbVd5FvdI20yde86qKGx4lVUTWmPlSWQ4QxbBIrrs+HnXGbxOUlUzTAP/VDmvCwaP2yA==" + }, "react-jss": { "version": "8.6.1", "resolved": "https://registry.npmjs.org/react-jss/-/react-jss-8.6.1.tgz", @@ -14675,6 +14718,17 @@ "crypto-random-string": "^1.0.0" } }, + "universal-cookie": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/universal-cookie/-/universal-cookie-3.0.7.tgz", + "integrity": "sha512-wfZRbaEzFTDbP64fzTfGDfokB3pWkDNjtsuRAZQWaiuj/Up+3/0AEvN4IhFHPK24iGNtGJ6PNIxv1GQzMSiyMw==", + "requires": { + "@types/cookie": "^0.3.1", + "@types/object-assign": "^4.0.30", + "cookie": "^0.3.1", + "object-assign": "^4.1.0" + } + }, "universal-deep-strict-equal": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/universal-deep-strict-equal/-/universal-deep-strict-equal-1.2.2.tgz", diff --git a/package.json b/package.json index 13674b8..af07e07 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "material-ui-icons": "^1.0.0-beta.36", "moment": "^2.22.2", "react": "^16.5.1", + "react-cookie": "^3.0.7", "react-dom": "^16.5.1", "react-image-gallery": "^0.8.12", "react-quiz-component": "0.2.0", diff --git a/public/index.html b/public/index.html index d949bd5..d8401c9 100644 --- a/public/index.html +++ b/public/index.html @@ -1,14 +1,15 @@ - + + @@ -31,26 +32,26 @@ work correctly both with client-side routing and a non-root public URL. Learn how to configure a non-root public URL by running `npm run build`. --> + Marten Tracker + - - - React App - - +
+ - - + + + \ No newline at end of file diff --git a/public/manifest.json b/public/manifest.json index ef19ec2..c946c57 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -1,6 +1,6 @@ { - "short_name": "React App", - "name": "Create React App Sample", + "short_name": "Marten Tracker", + "name": "American Marten Tracker", "icons": [ { "src": "favicon.ico", @@ -12,4 +12,4 @@ "display": "standalone", "theme_color": "#000000", "background_color": "#ffffff" -} +} \ No newline at end of file diff --git a/public/mapicons/cage.png b/public/map-icons/cage.png similarity index 100% rename from public/mapicons/cage.png rename to public/map-icons/cage.png diff --git a/public/mapicons/marten-icon.png b/public/map-icons/marten-icon.png similarity index 100% rename from public/mapicons/marten-icon.png rename to public/map-icons/marten-icon.png diff --git a/public/mapicons/other-icon.png b/public/map-icons/other-icon.png similarity index 100% rename from public/mapicons/other-icon.png rename to public/map-icons/other-icon.png diff --git a/public/mapicons/paws.png b/public/map-icons/paws.png similarity index 100% rename from public/mapicons/paws.png rename to public/map-icons/paws.png diff --git a/public/mapicons/photo-icon.png b/public/map-icons/photo-icon.png similarity index 100% rename from public/mapicons/photo-icon.png rename to public/map-icons/photo-icon.png diff --git a/public/mapicons/tire-icon.png b/public/map-icons/tire-icon.png similarity index 100% rename from public/mapicons/tire-icon.png rename to public/map-icons/tire-icon.png diff --git a/public/quizimages/advanced/question1.jpg b/public/quiz-images/advanced/question1.jpg similarity index 100% rename from public/quizimages/advanced/question1.jpg rename to public/quiz-images/advanced/question1.jpg diff --git a/public/quizimages/advanced/question10.jpg b/public/quiz-images/advanced/question10.jpg similarity index 100% rename from public/quizimages/advanced/question10.jpg rename to public/quiz-images/advanced/question10.jpg diff --git a/public/quizimages/advanced/question11.jpg b/public/quiz-images/advanced/question11.jpg similarity index 100% rename from public/quizimages/advanced/question11.jpg rename to public/quiz-images/advanced/question11.jpg diff --git a/public/quizimages/advanced/question12.jpg b/public/quiz-images/advanced/question12.jpg similarity index 100% rename from public/quizimages/advanced/question12.jpg rename to public/quiz-images/advanced/question12.jpg diff --git a/public/quizimages/advanced/question13.jpg b/public/quiz-images/advanced/question13.jpg similarity index 100% rename from public/quizimages/advanced/question13.jpg rename to public/quiz-images/advanced/question13.jpg diff --git a/public/quizimages/advanced/question14.jpg b/public/quiz-images/advanced/question14.jpg similarity index 100% rename from public/quizimages/advanced/question14.jpg rename to public/quiz-images/advanced/question14.jpg diff --git a/public/quizimages/advanced/question15.jpg b/public/quiz-images/advanced/question15.jpg similarity index 100% rename from public/quizimages/advanced/question15.jpg rename to public/quiz-images/advanced/question15.jpg diff --git a/public/quizimages/advanced/question16.jpg b/public/quiz-images/advanced/question16.jpg similarity index 100% rename from public/quizimages/advanced/question16.jpg rename to public/quiz-images/advanced/question16.jpg diff --git a/public/quizimages/advanced/question17.jpg b/public/quiz-images/advanced/question17.jpg similarity index 100% rename from public/quizimages/advanced/question17.jpg rename to public/quiz-images/advanced/question17.jpg diff --git a/public/quizimages/advanced/question18.jpg b/public/quiz-images/advanced/question18.jpg similarity index 100% rename from public/quizimages/advanced/question18.jpg rename to public/quiz-images/advanced/question18.jpg diff --git a/public/quizimages/advanced/question19.jpg b/public/quiz-images/advanced/question19.jpg similarity index 100% rename from public/quizimages/advanced/question19.jpg rename to public/quiz-images/advanced/question19.jpg diff --git a/public/quizimages/advanced/question2.jpg b/public/quiz-images/advanced/question2.jpg similarity index 100% rename from public/quizimages/advanced/question2.jpg rename to public/quiz-images/advanced/question2.jpg diff --git a/public/quizimages/advanced/question20.jpg b/public/quiz-images/advanced/question20.jpg similarity index 100% rename from public/quizimages/advanced/question20.jpg rename to public/quiz-images/advanced/question20.jpg diff --git a/public/quizimages/advanced/question3.jpg b/public/quiz-images/advanced/question3.jpg similarity index 100% rename from public/quizimages/advanced/question3.jpg rename to public/quiz-images/advanced/question3.jpg diff --git a/public/quizimages/advanced/question4.jpg b/public/quiz-images/advanced/question4.jpg similarity index 100% rename from public/quizimages/advanced/question4.jpg rename to public/quiz-images/advanced/question4.jpg diff --git a/public/quizimages/advanced/question5.jpg b/public/quiz-images/advanced/question5.jpg similarity index 100% rename from public/quizimages/advanced/question5.jpg rename to public/quiz-images/advanced/question5.jpg diff --git a/public/quizimages/advanced/question6.jpg b/public/quiz-images/advanced/question6.jpg similarity index 100% rename from public/quizimages/advanced/question6.jpg rename to public/quiz-images/advanced/question6.jpg diff --git a/public/quizimages/advanced/question7.jpg b/public/quiz-images/advanced/question7.jpg similarity index 100% rename from public/quizimages/advanced/question7.jpg rename to public/quiz-images/advanced/question7.jpg diff --git a/public/quizimages/advanced/question8.jpg b/public/quiz-images/advanced/question8.jpg similarity index 100% rename from public/quizimages/advanced/question8.jpg rename to public/quiz-images/advanced/question8.jpg diff --git a/public/quizimages/advanced/question9.jpg b/public/quiz-images/advanced/question9.jpg similarity index 100% rename from public/quizimages/advanced/question9.jpg rename to public/quiz-images/advanced/question9.jpg diff --git a/public/quizimages/easy/question1.jpg b/public/quiz-images/easy/question1.jpg similarity index 100% rename from public/quizimages/easy/question1.jpg rename to public/quiz-images/easy/question1.jpg diff --git a/public/quizimages/easy/question10.jpg b/public/quiz-images/easy/question10.jpg similarity index 100% rename from public/quizimages/easy/question10.jpg rename to public/quiz-images/easy/question10.jpg diff --git a/public/quizimages/easy/question11.jpg b/public/quiz-images/easy/question11.jpg similarity index 100% rename from public/quizimages/easy/question11.jpg rename to public/quiz-images/easy/question11.jpg diff --git a/public/quizimages/easy/question12.jpg b/public/quiz-images/easy/question12.jpg similarity index 100% rename from public/quizimages/easy/question12.jpg rename to public/quiz-images/easy/question12.jpg diff --git a/public/quizimages/easy/question13.jpg b/public/quiz-images/easy/question13.jpg similarity index 100% rename from public/quizimages/easy/question13.jpg rename to public/quiz-images/easy/question13.jpg diff --git a/public/quizimages/easy/question14.jpg b/public/quiz-images/easy/question14.jpg similarity index 100% rename from public/quizimages/easy/question14.jpg rename to public/quiz-images/easy/question14.jpg diff --git a/public/quizimages/easy/question15.jpg b/public/quiz-images/easy/question15.jpg similarity index 100% rename from public/quizimages/easy/question15.jpg rename to public/quiz-images/easy/question15.jpg diff --git a/public/quizimages/easy/question16.jpg b/public/quiz-images/easy/question16.jpg similarity index 100% rename from public/quizimages/easy/question16.jpg rename to public/quiz-images/easy/question16.jpg diff --git a/public/quizimages/easy/question17.jpg b/public/quiz-images/easy/question17.jpg similarity index 100% rename from public/quizimages/easy/question17.jpg rename to public/quiz-images/easy/question17.jpg diff --git a/public/quizimages/easy/question18.jpg b/public/quiz-images/easy/question18.jpg similarity index 100% rename from public/quizimages/easy/question18.jpg rename to public/quiz-images/easy/question18.jpg diff --git a/public/quizimages/easy/question19.jpg b/public/quiz-images/easy/question19.jpg similarity index 100% rename from public/quizimages/easy/question19.jpg rename to public/quiz-images/easy/question19.jpg diff --git a/public/quizimages/easy/question2.jpg b/public/quiz-images/easy/question2.jpg similarity index 100% rename from public/quizimages/easy/question2.jpg rename to public/quiz-images/easy/question2.jpg diff --git a/public/quizimages/easy/question20.jpg b/public/quiz-images/easy/question20.jpg similarity index 100% rename from public/quizimages/easy/question20.jpg rename to public/quiz-images/easy/question20.jpg diff --git a/public/quizimages/easy/question3.jpg b/public/quiz-images/easy/question3.jpg similarity index 100% rename from public/quizimages/easy/question3.jpg rename to public/quiz-images/easy/question3.jpg diff --git a/public/quizimages/easy/question4.jpg b/public/quiz-images/easy/question4.jpg similarity index 100% rename from public/quizimages/easy/question4.jpg rename to public/quiz-images/easy/question4.jpg diff --git a/public/quizimages/easy/question5.jpg b/public/quiz-images/easy/question5.jpg similarity index 100% rename from public/quizimages/easy/question5.jpg rename to public/quiz-images/easy/question5.jpg diff --git a/public/quizimages/easy/question6.jpg b/public/quiz-images/easy/question6.jpg similarity index 100% rename from public/quizimages/easy/question6.jpg rename to public/quiz-images/easy/question6.jpg diff --git a/public/quizimages/easy/question7.jpg b/public/quiz-images/easy/question7.jpg similarity index 100% rename from public/quizimages/easy/question7.jpg rename to public/quiz-images/easy/question7.jpg diff --git a/public/quizimages/easy/question8.jpg b/public/quiz-images/easy/question8.jpg similarity index 100% rename from public/quizimages/easy/question8.jpg rename to public/quiz-images/easy/question8.jpg diff --git a/public/quizimages/easy/question9.jpg b/public/quiz-images/easy/question9.jpg similarity index 100% rename from public/quizimages/easy/question9.jpg rename to public/quiz-images/easy/question9.jpg diff --git a/public/quizimages/intermediate/question1.jpg b/public/quiz-images/intermediate/question1.jpg similarity index 100% rename from public/quizimages/intermediate/question1.jpg rename to public/quiz-images/intermediate/question1.jpg diff --git a/public/quizimages/intermediate/question10.jpg b/public/quiz-images/intermediate/question10.jpg similarity index 100% rename from public/quizimages/intermediate/question10.jpg rename to public/quiz-images/intermediate/question10.jpg diff --git a/public/quizimages/intermediate/question11.jpg b/public/quiz-images/intermediate/question11.jpg similarity index 100% rename from public/quizimages/intermediate/question11.jpg rename to public/quiz-images/intermediate/question11.jpg diff --git a/public/quizimages/intermediate/question12.jpg b/public/quiz-images/intermediate/question12.jpg similarity index 100% rename from public/quizimages/intermediate/question12.jpg rename to public/quiz-images/intermediate/question12.jpg diff --git a/public/quizimages/intermediate/question13.jpg b/public/quiz-images/intermediate/question13.jpg similarity index 100% rename from public/quizimages/intermediate/question13.jpg rename to public/quiz-images/intermediate/question13.jpg diff --git a/public/quizimages/intermediate/question14.jpg b/public/quiz-images/intermediate/question14.jpg similarity index 100% rename from public/quizimages/intermediate/question14.jpg rename to public/quiz-images/intermediate/question14.jpg diff --git a/public/quizimages/intermediate/question15.jpg b/public/quiz-images/intermediate/question15.jpg similarity index 100% rename from public/quizimages/intermediate/question15.jpg rename to public/quiz-images/intermediate/question15.jpg diff --git a/public/quizimages/intermediate/question16.jpg b/public/quiz-images/intermediate/question16.jpg similarity index 100% rename from public/quizimages/intermediate/question16.jpg rename to public/quiz-images/intermediate/question16.jpg diff --git a/public/quizimages/intermediate/question17.jpg b/public/quiz-images/intermediate/question17.jpg similarity index 100% rename from public/quizimages/intermediate/question17.jpg rename to public/quiz-images/intermediate/question17.jpg diff --git a/public/quizimages/intermediate/question18.jpg b/public/quiz-images/intermediate/question18.jpg similarity index 100% rename from public/quizimages/intermediate/question18.jpg rename to public/quiz-images/intermediate/question18.jpg diff --git a/public/quizimages/intermediate/question19.jpg b/public/quiz-images/intermediate/question19.jpg similarity index 100% rename from public/quizimages/intermediate/question19.jpg rename to public/quiz-images/intermediate/question19.jpg diff --git a/public/quizimages/intermediate/question2.jpg b/public/quiz-images/intermediate/question2.jpg similarity index 100% rename from public/quizimages/intermediate/question2.jpg rename to public/quiz-images/intermediate/question2.jpg diff --git a/public/quizimages/intermediate/question20.jpg b/public/quiz-images/intermediate/question20.jpg similarity index 100% rename from public/quizimages/intermediate/question20.jpg rename to public/quiz-images/intermediate/question20.jpg diff --git a/public/quizimages/intermediate/question3.jpg b/public/quiz-images/intermediate/question3.jpg similarity index 100% rename from public/quizimages/intermediate/question3.jpg rename to public/quiz-images/intermediate/question3.jpg diff --git a/public/quizimages/intermediate/question4.jpg b/public/quiz-images/intermediate/question4.jpg similarity index 100% rename from public/quizimages/intermediate/question4.jpg rename to public/quiz-images/intermediate/question4.jpg diff --git a/public/quizimages/intermediate/question5.jpg b/public/quiz-images/intermediate/question5.jpg similarity index 100% rename from public/quizimages/intermediate/question5.jpg rename to public/quiz-images/intermediate/question5.jpg diff --git a/public/quizimages/intermediate/question6.jpg b/public/quiz-images/intermediate/question6.jpg similarity index 100% rename from public/quizimages/intermediate/question6.jpg rename to public/quiz-images/intermediate/question6.jpg diff --git a/public/quizimages/intermediate/question7.jpg b/public/quiz-images/intermediate/question7.jpg similarity index 100% rename from public/quizimages/intermediate/question7.jpg rename to public/quiz-images/intermediate/question7.jpg diff --git a/public/quizimages/intermediate/question8.jpg b/public/quiz-images/intermediate/question8.jpg similarity index 100% rename from public/quizimages/intermediate/question8.jpg rename to public/quiz-images/intermediate/question8.jpg diff --git a/public/quizimages/intermediate/question9.jpg b/public/quiz-images/intermediate/question9.jpg similarity index 100% rename from public/quizimages/intermediate/question9.jpg rename to public/quiz-images/intermediate/question9.jpg diff --git a/readme.md b/readme.md index 97519ac..b560172 100644 --- a/readme.md +++ b/readme.md @@ -24,5 +24,6 @@ The application allows for users to post marten sightings. They can attach photo * Material-UI * Google API * Netlify +* Disqus * Flamelink CMS * EmailJS diff --git a/src/App.js b/src/App.js index bd3131f..2f0c3bd 100644 --- a/src/App.js +++ b/src/App.js @@ -1,6 +1,7 @@ import React, { Component } from 'react'; import Main from './components/Main'; -import './App.css'; +import './css/App.css'; +import { CookiesProvider } from 'react-cookie'; class App extends Component { componentDidMount() { @@ -9,11 +10,13 @@ class App extends Component { render() { return ( -
-
-
+ +
+
+
+
); } } -export default App; +export default App; \ No newline at end of file diff --git a/src/components/Main.js b/src/components/Main.js index d3bde39..94e145c 100644 --- a/src/components/Main.js +++ b/src/components/Main.js @@ -1,5 +1,5 @@ import React from 'react'; -import PropTypes from 'prop-types'; +import PropTypes, { instanceOf } from 'prop-types'; import { withStyles } from '@material-ui/core/styles'; import Drawer from '@material-ui/core/Drawer'; import AppBar from '@material-ui/core/AppBar'; @@ -32,7 +32,10 @@ import CssBaseline from '@material-ui/core/CssBaseline'; import ExpandLess from '@material-ui/icons/ExpandLess'; import ExpandMore from '@material-ui/icons/ExpandMore'; import Collapse from '@material-ui/core/Collapse'; -import FlameLinkCollectionGallery from '../components/FlameLinkCollectionGallery'; +import FlameLinkCollectionGallery from '../components/flamelink/FlameLinkCollectionGallery'; +import { MuiThemeProvider, createMuiTheme } from '@material-ui/core/styles'; +import Switch from '@material-ui/core/Switch'; +import { withCookies, Cookies } from 'react-cookie'; const drawerWidth = 240; @@ -72,23 +75,71 @@ const styles = theme => ({ }); class ResponsiveDrawer extends React.Component { - state = { - mobileOpen: false, - key: 'Home', - open: false, - open2: false, - }; + componentWillMount() { + const { cookies } = this.props; + + var newName, newTheme, newChecked; + + if (cookies.get('themeName') === undefined) { + newName = 'light' + newTheme = createMuiTheme({ + typography: { + useNextVariants: true, + }, + palette: { + type: 'light' + } + }); + newChecked = true; + + cookies.set('themeName', newName, { path: '/' }); + } else { + if (cookies.get('themeName') === 'light') { + newName = 'light' + newTheme = createMuiTheme({ + typography: { + useNextVariants: true, + }, + palette: { + type: 'light' + } + }); + newChecked = true; + } else { + newName = 'dark' + newTheme = createMuiTheme({ + typography: { + useNextVariants: true, + }, + palette: { + type: 'dark' + } + }); + newChecked = false; + } + } + + this.setState({ + mobileOpen: false, + key: 'Home', + open: false, + open2: false, + theme: newTheme, + themeName: newName, + themeChecked: newChecked + }); + } handleDrawerToggle = () => { this.setState(state => ({ mobileOpen: !state.mobileOpen })); } handleClick = () => { - this.setState(state => ({ open: !state.open })); + this.setState(state => ({ open: !state.open, open2: false })); } handleClick2 = () => { - this.setState(state => ({ open2: !state.open2 })); + this.setState(state => ({ open2: !state.open2, open: false })); } nav = (text) => { @@ -97,11 +148,50 @@ class ResponsiveDrawer extends React.Component { }); } + handleChange = name => event => { + const { cookies } = this.props; + + this.setState({ [name]: event.target.checked }); + + var newTheme, newName; + + if (this.state.themeName === 'light') { + newTheme = createMuiTheme({ + typography: { + useNextVariants: true, + }, + palette: { + type: 'dark' + } + }); + + newName = 'dark'; + } else { + newTheme = createMuiTheme({ + typography: { + useNextVariants: true, + }, + palette: { + type: 'light' + } + }); + + newName = 'light'; + } + + this.setState({ + themeName: newName, + theme: newTheme + }) + + cookies.set('themeName', newName, { path: '/' }); + }; + render() { - const { classes, theme } = this.props; + const { classes } = this.props; const drawer = ( -
+
@@ -174,84 +264,91 @@ class ResponsiveDrawer extends React.Component { -
+
); return ( -
- - - - - - - - Marten Tracker - - - - -
-
- {this.state.key === 'Home' && } - {this.state.key === 'Report' && } - {this.state.key === 'Map' && } - {this.state.key === 'List' && } - {this.state.key === 'About' && } - {this.state.key === 'Contact' && } - {this.state.key === 'Easy-Quiz' && } - {this.state.key === 'Intermediate-Quiz' && } - {this.state.key === 'Advanced-Quiz' && } - {this.state.key === 'Gallery1' && } - {this.state.key === 'Gallery2' && } - {this.state.key === 'Gallery3' && } - {this.state.key === 'Gallery4' && } -
-
+ +
+ + + + + + + + Marten Tracker + + + + + +
+
+ {this.state.key === 'Home' && } + {this.state.key === 'Report' && } + {this.state.key === 'Map' && } + {this.state.key === 'List' && } + {this.state.key === 'About' && } + {this.state.key === 'Contact' && } + {this.state.key === 'Easy-Quiz' && } + {this.state.key === 'Intermediate-Quiz' && } + {this.state.key === 'Advanced-Quiz' && } + {this.state.key === 'Gallery1' && } + {this.state.key === 'Gallery2' && } + {this.state.key === 'Gallery3' && } + {this.state.key === 'Gallery4' && } +
+
+
); } } ResponsiveDrawer.propTypes = { classes: PropTypes.object.isRequired, - // Injected by the documentation to work in an iframe. - // You won't need it on your project. container: PropTypes.object, theme: PropTypes.object.isRequired, + cookies: instanceOf(Cookies).isRequired, }; -export default withStyles(styles, { withTheme: true })(ResponsiveDrawer); \ No newline at end of file +export default withStyles(styles, { withTheme: true })(withCookies(ResponsiveDrawer)); \ No newline at end of file diff --git a/src/components/SightingMap.js b/src/components/SightingMap.js index bf3aafa..abc06b8 100644 --- a/src/components/SightingMap.js +++ b/src/components/SightingMap.js @@ -2,7 +2,7 @@ import React, { Component, Fragment } from 'react'; import { Map, InfoWindow, Marker, GoogleApiWrapper } from 'google-maps-react'; import moment from 'moment'; import Typography from '@material-ui/core/Typography'; -import firebase from '../firebase.js'; +import firebase from '../utilities/firebase.js'; // Google Maps API Key const API_KEY = 'AIzaSyAZ_0J01bA6wCbIPK4UBq2RUBC-hIqG4mM'; @@ -216,22 +216,22 @@ export class MapContainer extends Component { switch(type) { case 'visual': - pinIcon = '/mapicons/marten-icon.png'; + pinIcon = '/map-icons/marten-icon.png'; break; case 'roadkill': - pinIcon = '/mapicons/tire-icon.png'; + pinIcon = '/map-icons/tire-icon.png'; break; case 'viewed_tracks': - pinIcon = '/mapicons/paws.png'; + pinIcon = '/map-icons/paws.png'; break; case 'trapped': - pinIcon = '/mapicons/cage.png'; + pinIcon = '/map-icons/cage.png'; break; case 'photo': - pinIcon = '/mapicons/photo-icon.png'; + pinIcon = '/map-icons/photo-icon.png'; break; case 'other': - pinIcon = '/mapicons/other-icon.png'; + pinIcon = '/map-icons/other-icon.png'; break; default: break; diff --git a/src/components/FlameLinkCollection.js b/src/components/flamelink/FlameLinkCollection.js similarity index 93% rename from src/components/FlameLinkCollection.js rename to src/components/flamelink/FlameLinkCollection.js index ab1f13e..afc8312 100644 --- a/src/components/FlameLinkCollection.js +++ b/src/components/flamelink/FlameLinkCollection.js @@ -1,5 +1,5 @@ import React, { Component} from 'react'; -import flamelinkApp from '../flamelink.js'; +import flamelinkApp from '../../utilities/flamelink.js'; import FlameLinkCollectionComponentCreations from './FlameLinkCollectionComponentCreations'; class FlameLinkCollection extends Component { diff --git a/src/components/FlameLinkCollectionComponentCreations.js b/src/components/flamelink/FlameLinkCollectionComponentCreations.js similarity index 100% rename from src/components/FlameLinkCollectionComponentCreations.js rename to src/components/flamelink/FlameLinkCollectionComponentCreations.js diff --git a/src/components/FlameLinkCollectionGallery.js b/src/components/flamelink/FlameLinkCollectionGallery.js similarity index 77% rename from src/components/FlameLinkCollectionGallery.js rename to src/components/flamelink/FlameLinkCollectionGallery.js index 77860ea..eb0f8ed 100644 --- a/src/components/FlameLinkCollectionGallery.js +++ b/src/components/flamelink/FlameLinkCollectionGallery.js @@ -3,10 +3,10 @@ import Typography from '@material-ui/core/Typography'; import Grid from '@material-ui/core/Grid'; import { withStyles } from '@material-ui/core/styles'; import RenderGallery from './RenderGallery'; -import flamelinkApp from '../flamelink.js'; +import flamelinkApp from '../../utilities/flamelink.js'; import FlameLinkCollectionGalleryContent from './FlameLinkCollectionGalleryContent'; import "react-image-gallery/styles/css/image-gallery.css"; -import '../css/FlameLink.css'; +import '../../css/FlameLink.css'; const styles = theme => ({ flamelinkItem: { @@ -16,14 +16,28 @@ const styles = theme => ({ }, flamelinkGallery: { - marginRight: "auto", - marginLeft: "auto", + marginRight: 'auto', + marginLeft: 'auto', + backgroundImage: 'url(../images/galleryBackgroundImage.png)', + overflow: 'hidden', + minHeight: 180, + minWidth: 300, + width: 'auto', + height: 'auto', }, flamelinkGalleryContainer: { backgroundColor: 'black', marginTop: 20, }, + flamelinkGalleryInnerContainer: { + maxHeight: 1000, + minHeight: 180, + height: 'auto', + width: 'auto', + marginRight: 'auto', + marginLeft: 'auto', + }, }); class FlameLinkCollectionGallery extends Component { @@ -51,7 +65,7 @@ class FlameLinkCollectionGallery extends Component { schemaDetails: '', schemaContent: '', schemaDescription: '', - } + }; flamelinkApp.schemas.getFields(this.props.galleryName, { fields: ['title', 'key', 'type', 'gridColumns', 'description', 'options'] }) .then(result => this.setState({ @@ -111,8 +125,12 @@ class FlameLinkCollectionGallery extends Component { {this.state.schemaDescription} - - + + +
+ +
+
diff --git a/src/components/FlameLinkCollectionGalleryContent.js b/src/components/flamelink/FlameLinkCollectionGalleryContent.js similarity index 83% rename from src/components/FlameLinkCollectionGalleryContent.js rename to src/components/flamelink/FlameLinkCollectionGalleryContent.js index ceeba0f..249dc36 100644 --- a/src/components/FlameLinkCollectionGalleryContent.js +++ b/src/components/flamelink/FlameLinkCollectionGalleryContent.js @@ -1,6 +1,6 @@ import { Component } from 'react'; -import flamelinkApp from '../flamelink.js'; -import '../css/FlameLink.css'; +import flamelinkApp from '../../utilities/flamelink.js'; +import '../../css/FlameLink.css'; class FlameLinkCollectionGalleryContent extends Component { constructor(props) { diff --git a/src/components/FlameLinkCollectionStructure.js b/src/components/flamelink/FlameLinkCollectionStructure.js similarity index 98% rename from src/components/FlameLinkCollectionStructure.js rename to src/components/flamelink/FlameLinkCollectionStructure.js index 95aadca..bed944f 100644 --- a/src/components/FlameLinkCollectionStructure.js +++ b/src/components/flamelink/FlameLinkCollectionStructure.js @@ -2,7 +2,7 @@ import React, { Component} from 'react'; import Grid from '@material-ui/core/Grid'; import Typography from '@material-ui/core/Typography'; import { withStyles } from '@material-ui/core/styles'; -import flamelinkApp from '../flamelink.js'; +import flamelinkApp from '../../utilities/flamelink.js'; import FlameLinkImage from './FlameLinkImage'; import FlameLinkFieldSet from './FlameLinkFieldSet'; diff --git a/src/components/FlameLinkComponentCreations.js b/src/components/flamelink/FlameLinkComponentCreations.js similarity index 100% rename from src/components/FlameLinkComponentCreations.js rename to src/components/flamelink/FlameLinkComponentCreations.js diff --git a/src/components/FlameLinkFieldSet.js b/src/components/flamelink/FlameLinkFieldSet.js similarity index 100% rename from src/components/FlameLinkFieldSet.js rename to src/components/flamelink/FlameLinkFieldSet.js diff --git a/src/components/FlameLinkFieldSetContent.js b/src/components/flamelink/FlameLinkFieldSetContent.js similarity index 100% rename from src/components/FlameLinkFieldSetContent.js rename to src/components/flamelink/FlameLinkFieldSetContent.js diff --git a/src/components/FlameLinkImage.js b/src/components/flamelink/FlameLinkImage.js similarity index 83% rename from src/components/FlameLinkImage.js rename to src/components/flamelink/FlameLinkImage.js index acad0e6..87d54dc 100644 --- a/src/components/FlameLinkImage.js +++ b/src/components/flamelink/FlameLinkImage.js @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import Typography from '@material-ui/core/Typography'; -import flamelinkApp from '../flamelink.js'; -import '../css/FlameLink.css'; +import flamelinkApp from '../../utilities/flamelink.js'; +import '../../css/FlameLink.css'; class FlameLinkImage extends Component { constructor() { diff --git a/src/components/FlameLinkStructure.js b/src/components/flamelink/FlameLinkStructure.js similarity index 97% rename from src/components/FlameLinkStructure.js rename to src/components/flamelink/FlameLinkStructure.js index 93e391d..dc6482e 100644 --- a/src/components/FlameLinkStructure.js +++ b/src/components/flamelink/FlameLinkStructure.js @@ -2,7 +2,7 @@ import React, { Component} from 'react'; import Grid from '@material-ui/core/Grid'; import Typography from '@material-ui/core/Typography'; import { withStyles } from '@material-ui/core/styles'; -import flamelinkApp from '../flamelink.js'; +import flamelinkApp from '../../utilities/flamelink.js'; import FlameLinkImage from './FlameLinkImage'; import FlameLinkFieldSet from './FlameLinkFieldSet'; diff --git a/src/components/RenderGallery.js b/src/components/flamelink/RenderGallery.js similarity index 76% rename from src/components/RenderGallery.js rename to src/components/flamelink/RenderGallery.js index ce87837..7f98e70 100644 --- a/src/components/RenderGallery.js +++ b/src/components/flamelink/RenderGallery.js @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import ImageGallery from 'react-image-gallery'; import "react-image-gallery/styles/css/image-gallery.css"; -import '../css/FlameLink.css'; +import '../../css/FlameLink.css'; class RenderGallery extends Component { constructor() { @@ -9,9 +9,9 @@ class RenderGallery extends Component { this.state = { showThumbnails: false, - showIndex: true, - showBullets: true, mounted: false, + autoPlay: true, + slideInterval: 6000, } } @@ -28,9 +28,9 @@ class RenderGallery extends Component { ); } diff --git a/src/components/ContactForm.js b/src/components/forms/ContactForm.js similarity index 99% rename from src/components/ContactForm.js rename to src/components/forms/ContactForm.js index b009805..28ccef3 100644 --- a/src/components/ContactForm.js +++ b/src/components/forms/ContactForm.js @@ -1,7 +1,7 @@ import React, { Fragment } from 'react'; import PropTypes from 'prop-types'; import Grid from '@material-ui/core/Grid'; -import emailjs from '../emailjs.js' +import emailjs from '../../utilities/emailjs.js' import { withStyles } from '@material-ui/core/styles'; import TextField from '@material-ui/core/TextField'; import CheckCircleIcon from '@material-ui/icons/CheckCircle'; diff --git a/src/components/ReportForm.js b/src/components/forms/ReportForm.js similarity index 99% rename from src/components/ReportForm.js rename to src/components/forms/ReportForm.js index 9057b89..e61beb1 100644 --- a/src/components/ReportForm.js +++ b/src/components/forms/ReportForm.js @@ -9,8 +9,8 @@ import Snackbar from '@material-ui/core/Snackbar'; import IconButton from '@material-ui/core/IconButton'; import CloseIcon from '@material-ui/icons/Close'; import Button from '@material-ui/core/Button'; -import firebase from '../firebase.js'; -import GoogleMap from '../components/ReportMap'; +import firebase from '../../utilities/firebase.js'; +import GoogleMap from './ReportMap'; import Modal from '@material-ui/core/Modal'; import Typography from '@material-ui/core/Typography'; diff --git a/src/components/ReportMap.js b/src/components/forms/ReportMap.js similarity index 100% rename from src/components/ReportMap.js rename to src/components/forms/ReportMap.js diff --git a/src/components/SightingDetail.js b/src/components/list/SightingDetail.js similarity index 87% rename from src/components/SightingDetail.js rename to src/components/list/SightingDetail.js index fb3f6a5..cb6f335 100644 --- a/src/components/SightingDetail.js +++ b/src/components/list/SightingDetail.js @@ -2,13 +2,19 @@ import React, { Component, Fragment } from 'react'; import Disqus from 'disqus-react'; import moment from 'moment'; import SightingDetailMap from './SightingDetailMap'; +import Typography from '@material-ui/core/Typography'; +import { withStyles } from '@material-ui/core/styles'; +import PropTypes from 'prop-types'; + +const styles = theme => ({ +}); /** * Types of sightings. Label is what is * viewed in the application, value is * what is stored in the database. */ - const sightingTypes = [ +const sightingTypes = [ { value: 'visual', label: 'Visual', @@ -143,18 +149,24 @@ class SightingDetail extends Component { return ( +

Type: {this.getType(this.props.detail.type)}

When: {this.formatDate(this.props.detail.date)}, {this.getTime(this.props.detail.time)}

Where: {this.props.detail.lat} degrees N, and {this.props.detail.lng} degrees E

I am confident of my sighting: {this.getConfidence(this.props.detail.confidence)}

-
+

{`${this.props.detail.desc}`}

- + +
); } } -export default SightingDetail; \ No newline at end of file +SightingDetail.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(SightingDetail); \ No newline at end of file diff --git a/src/components/SightingDetailMap.js b/src/components/list/SightingDetailMap.js similarity index 100% rename from src/components/SightingDetailMap.js rename to src/components/list/SightingDetailMap.js diff --git a/src/components/ViewSightings.js b/src/components/list/ViewSightings.js similarity index 65% rename from src/components/ViewSightings.js rename to src/components/list/ViewSightings.js index ec5d3c2..368ea6e 100644 --- a/src/components/ViewSightings.js +++ b/src/components/list/ViewSightings.js @@ -1,6 +1,6 @@ import React, { Component, Fragment } from 'react'; import Grid from '@material-ui/core/Grid'; -import firebase from '../firebase.js'; +import firebase from '../../utilities/firebase.js'; import List from '@material-ui/core/List'; import ListItem from '@material-ui/core/ListItem'; import ListItemText from '@material-ui/core/ListItemText'; @@ -64,6 +64,24 @@ class ViewSightings extends Component { clicked: false }; + componentDidUpdate(props) { + if (this.props.themeName !== props.themeName) { + this.setState({ + selectedSighting: { + id: null, + lat: null, + lng: null, + desc: null, + type: null, + confidence: null, + date: null, + time: null + }, + clicked: false + }); + } + } + render() { return ( @@ -71,20 +89,20 @@ class ViewSightings extends Component { - { - this.state.sightings.map((sighting) => { - return ( - this.getDetail(sighting.id, sighting.lat, sighting.lng, sighting.desc, sighting.type, sighting.confidence, sighting.date, sighting.time)}> - - - ); - }) - } + { + this.state.sightings.map((sighting) => { + return ( + this.getDetail(sighting.id, sighting.lat, sighting.lng, sighting.desc, sighting.type, sighting.confidence, sighting.date, sighting.time)}> + + + ); + }) + } - {this.state.clicked === true && } + {this.state.clicked === true && } diff --git a/src/App.css b/src/css/App.css similarity index 91% rename from src/App.css rename to src/css/App.css index d1e1bd6..6a79e73 100644 --- a/src/App.css +++ b/src/css/App.css @@ -20,6 +20,13 @@ body { margin: 0 auto; } +#disqus_thread a, +.comments .nav ul li a, +.comments .nav ul li div a +{ + color: #7986cb +} + .sighting-list { height: calc(50vh - 64px); overflow-y: scroll; diff --git a/src/index.css b/src/css/index.css similarity index 100% rename from src/index.css rename to src/css/index.css diff --git a/src/emailjs.js b/src/emailjs.js deleted file mode 100644 index b2c9193..0000000 --- a/src/emailjs.js +++ /dev/null @@ -1,5 +0,0 @@ -import * as emailjs from 'emailjs-com' - -emailjs.init("user_4d5R86dmu6vgeJP4euxSA"); - -export default emailjs; \ No newline at end of file diff --git a/src/images/galleryBackgroundImage.png b/src/images/galleryBackgroundImage.png new file mode 100644 index 0000000..7e9bebc Binary files /dev/null and b/src/images/galleryBackgroundImage.png differ diff --git a/src/images/marten-icon.png b/src/images/marten-icon.png deleted file mode 100644 index 20e396d..0000000 Binary files a/src/images/marten-icon.png and /dev/null differ diff --git a/src/images/tire-icon.png b/src/images/tire-icon.png deleted file mode 100644 index ae18fac..0000000 Binary files a/src/images/tire-icon.png and /dev/null differ diff --git a/src/index.js b/src/index.js index 6efd2d7..c7183e0 100644 --- a/src/index.js +++ b/src/index.js @@ -1,7 +1,7 @@ import React from 'react'; import ReactDOM from 'react-dom'; -import './index.css'; -import App from './App'; +import './css/index.css'; +import App from './App.js'; import registerServiceWorker from './registerServiceWorker'; ReactDOM.render(, document.getElementById('root')); diff --git a/src/pages/About.js b/src/pages/About.js index 9b46421..88d18da 100644 --- a/src/pages/About.js +++ b/src/pages/About.js @@ -1,6 +1,6 @@ import React, { Component, Fragment } from 'react'; -import FlameLinkComponentCreations from '../components/FlameLinkComponentCreations'; -import flamelinkApp from '../flamelink.js'; +import FlameLinkComponentCreations from '../components/flamelink/FlameLinkComponentCreations'; +import flamelinkApp from '../utilities/flamelink.js'; class About extends Component { constructor() { diff --git a/src/pages/Contact.js b/src/pages/Contact.js index 20d4407..377c05f 100644 --- a/src/pages/Contact.js +++ b/src/pages/Contact.js @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import ContactForm from '../components/ContactForm.js' +import ContactForm from '../components/forms/ContactForm.js' class Contact extends Component { componentDidMount() { diff --git a/src/pages/Home.js b/src/pages/Home.js index 53844f9..0e09315 100644 --- a/src/pages/Home.js +++ b/src/pages/Home.js @@ -1,7 +1,7 @@ import React, { Component } from 'react'; -import FlameLinkComponentCreations from '../components/FlameLinkComponentCreations'; -import FlameLinkCollectionGallery from '../components/FlameLinkCollectionGallery'; -import flamelinkApp from '../flamelink'; +import FlameLinkComponentCreations from '../components/flamelink/FlameLinkComponentCreations'; +import FlameLinkCollectionGallery from '../components/flamelink/FlameLinkCollectionGallery'; +import flamelinkApp from '../utilities/flamelink'; import Grid from '@material-ui/core/Grid'; class Home extends Component { diff --git a/src/pages/Info.js b/src/pages/Info.js index c058d29..5ce36b5 100644 --- a/src/pages/Info.js +++ b/src/pages/Info.js @@ -1,5 +1,5 @@ import React, { Component, Fragment } from 'react'; -import FlameLinkComponentCreations from '../components/FlameLinkComponentCreations'; +import FlameLinkComponentCreations from '../components/flamelink/FlameLinkComponentCreations'; import flamelinkApp from '../flamelink.js'; class Info extends Component { diff --git a/src/pages/Report.js b/src/pages/Report.js index 3989544..e822766 100644 --- a/src/pages/Report.js +++ b/src/pages/Report.js @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import ReportForm from '../components/ReportForm'; +import ReportForm from '../components/forms/ReportForm'; class Report extends Component { componentDidMount() { diff --git a/src/pages/SightingList.js b/src/pages/SightingList.js index 8fb460d..accad13 100644 --- a/src/pages/SightingList.js +++ b/src/pages/SightingList.js @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import ViewSightings from '../components/ViewSightings.js'; +import ViewSightings from '../components/list/ViewSightings.js'; class Sighting extends Component { componentDidMount() { @@ -8,7 +8,7 @@ class Sighting extends Component { render() { return ( - + ); } } diff --git a/src/quiz/advancedQuiz.js b/src/quiz/advancedQuiz.js index e7bb4a5..a57db95 100644 --- a/src/quiz/advancedQuiz.js +++ b/src/quiz/advancedQuiz.js @@ -4,7 +4,7 @@ const advancedQuiz = { "quizTitle": "Trail Cam Quiz: Advanced", "questions": [ { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "American marten", @@ -15,7 +15,7 @@ const advancedQuiz = { "correctAnswer": "1" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "American marten", @@ -26,7 +26,7 @@ const advancedQuiz = { "correctAnswer": "1" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "American marten", @@ -37,7 +37,7 @@ const advancedQuiz = { "correctAnswer": "1" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "American Robin", @@ -48,7 +48,7 @@ const advancedQuiz = { "correctAnswer": "1" }, { - "question": What is in the marten's mouth?

, + "question": What is in the marten's mouth?

, "questionType": "text", "answers": [ "American Woodcock", @@ -59,7 +59,7 @@ const advancedQuiz = { "correctAnswer": "1" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "Black bear", @@ -70,7 +70,7 @@ const advancedQuiz = { "correctAnswer": "1" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "Black bear", @@ -81,7 +81,7 @@ const advancedQuiz = { "correctAnswer": "1" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "Coyote", @@ -92,7 +92,7 @@ const advancedQuiz = { "correctAnswer": "1" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "Eastern chipmunk", @@ -103,7 +103,7 @@ const advancedQuiz = { "correctAnswer": "1" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "Eastern chipmunk", @@ -114,7 +114,7 @@ const advancedQuiz = { "correctAnswer": "1" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "American marten", @@ -125,7 +125,7 @@ const advancedQuiz = { "correctAnswer": "2" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "American marten", @@ -136,7 +136,7 @@ const advancedQuiz = { "correctAnswer": "4" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "Hermit Thrush", @@ -147,7 +147,7 @@ const advancedQuiz = { "correctAnswer": "3" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "American beaver", @@ -158,7 +158,7 @@ const advancedQuiz = { "correctAnswer": "3" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "American badger", @@ -169,7 +169,7 @@ const advancedQuiz = { "correctAnswer": "2" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "Eastern fox squirrel", @@ -180,7 +180,7 @@ const advancedQuiz = { "correctAnswer": "4" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "American Woodcock", @@ -191,7 +191,7 @@ const advancedQuiz = { "correctAnswer": "4" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "Eastern fox squirrel", @@ -202,7 +202,7 @@ const advancedQuiz = { "correctAnswer": "3" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "House mouse", @@ -213,7 +213,7 @@ const advancedQuiz = { "correctAnswer": "3" }, { - "question": What is in the marten's mouth?

, + "question": What is in the marten's mouth?

, "questionType": "text", "answers": [ "Eastern chipmunk", diff --git a/src/quiz/easyQuiz.js b/src/quiz/easyQuiz.js index 209eb24..40e526e 100644 --- a/src/quiz/easyQuiz.js +++ b/src/quiz/easyQuiz.js @@ -4,7 +4,7 @@ const easyQuiz = { "quizTitle": "Trail Cam Quiz: Easy", "questions": [ { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "Black bear", @@ -15,7 +15,7 @@ const easyQuiz = { "correctAnswer": "1" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "American beaver", @@ -26,7 +26,7 @@ const easyQuiz = { "correctAnswer": "3" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "American badger", @@ -37,7 +37,7 @@ const easyQuiz = { "correctAnswer": "2" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "Eastern fox squirrel", @@ -48,7 +48,7 @@ const easyQuiz = { "correctAnswer": "3" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "American Crow", @@ -59,7 +59,7 @@ const easyQuiz = { "correctAnswer": "3" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "American marten", @@ -70,7 +70,7 @@ const easyQuiz = { "correctAnswer": "1" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "American marten", @@ -81,7 +81,7 @@ const easyQuiz = { "correctAnswer": "1" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "American Robin", @@ -92,7 +92,7 @@ const easyQuiz = { "correctAnswer": "1" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "Black bear", @@ -103,7 +103,7 @@ const easyQuiz = { "correctAnswer": "1" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "Bobcat", @@ -114,7 +114,7 @@ const easyQuiz = { "correctAnswer": "1" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "Coyote", @@ -125,7 +125,7 @@ const easyQuiz = { "correctAnswer": "1" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "Eastern chipmunk", @@ -136,7 +136,7 @@ const easyQuiz = { "correctAnswer": "1" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "Eastern chipmunk", @@ -147,7 +147,7 @@ const easyQuiz = { "correctAnswer": "1" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "Raccoon", @@ -158,7 +158,7 @@ const easyQuiz = { "correctAnswer": "1" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "American beaver", @@ -169,7 +169,7 @@ const easyQuiz = { "correctAnswer": "3" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "American badger", @@ -180,7 +180,7 @@ const easyQuiz = { "correctAnswer": "2" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "American badger", @@ -191,7 +191,7 @@ const easyQuiz = { "correctAnswer": "3" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "Elk", @@ -202,7 +202,7 @@ const easyQuiz = { "correctAnswer": "4" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "Elk", @@ -213,7 +213,7 @@ const easyQuiz = { "correctAnswer": "4" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "Elk", diff --git a/src/quiz/intermediateQuiz.js b/src/quiz/intermediateQuiz.js index c9c16ea..348465a 100644 --- a/src/quiz/intermediateQuiz.js +++ b/src/quiz/intermediateQuiz.js @@ -4,7 +4,7 @@ const intermediateQuiz = { "quizTitle": "Trail Cam Quiz: Intermediate", "questions": [ { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "American badger", @@ -15,7 +15,7 @@ const intermediateQuiz = { "correctAnswer": "1" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "American marten", @@ -26,7 +26,7 @@ const intermediateQuiz = { "correctAnswer": "1" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "American marten", @@ -37,7 +37,7 @@ const intermediateQuiz = { "correctAnswer": "1" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "American marten", @@ -48,7 +48,7 @@ const intermediateQuiz = { "correctAnswer": "1" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "American Robin", @@ -59,7 +59,7 @@ const intermediateQuiz = { "correctAnswer": "1" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "Black bear", @@ -70,7 +70,7 @@ const intermediateQuiz = { "correctAnswer": "1" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "Bobcat", @@ -81,7 +81,7 @@ const intermediateQuiz = { "correctAnswer": "1" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "Bobcat", @@ -92,7 +92,7 @@ const intermediateQuiz = { "correctAnswer": "1" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "American Crow", @@ -103,7 +103,7 @@ const intermediateQuiz = { "correctAnswer": "1" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "Coyote", @@ -114,7 +114,7 @@ const intermediateQuiz = { "correctAnswer": "1" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "Eastern chipmunk", @@ -125,7 +125,7 @@ const intermediateQuiz = { "correctAnswer": "3" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "Eastern chipmunk", @@ -136,7 +136,7 @@ const intermediateQuiz = { "correctAnswer": "3" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "American beaver", @@ -147,7 +147,7 @@ const intermediateQuiz = { "correctAnswer": "3" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "American badger", @@ -158,7 +158,7 @@ const intermediateQuiz = { "correctAnswer": "2" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "American badger", @@ -169,7 +169,7 @@ const intermediateQuiz = { "correctAnswer": "2" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "Coyote", @@ -180,7 +180,7 @@ const intermediateQuiz = { "correctAnswer": "4" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "Eastern fox squirrel", @@ -191,7 +191,7 @@ const intermediateQuiz = { "correctAnswer": "4" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "Eastern chipmunk", @@ -202,7 +202,7 @@ const intermediateQuiz = { "correctAnswer": "4" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "American Woodcock", @@ -213,7 +213,7 @@ const intermediateQuiz = { "correctAnswer": "4" }, { - "question": What animal is this?

, + "question": What animal is this?

, "questionType": "text", "answers": [ "Elk", diff --git a/src/utilities/emailjs.js b/src/utilities/emailjs.js new file mode 100644 index 0000000..fde8ec1 --- /dev/null +++ b/src/utilities/emailjs.js @@ -0,0 +1,5 @@ +import * as emailjs from 'emailjs-com'; + +emailjs.init("user_4d5R86dmu6vgeJP4euxSA"); + +export default emailjs; \ No newline at end of file diff --git a/src/firebase.js b/src/utilities/firebase.js similarity index 100% rename from src/firebase.js rename to src/utilities/firebase.js diff --git a/src/flamelink.js b/src/utilities/flamelink.js similarity index 100% rename from src/flamelink.js rename to src/utilities/flamelink.js