diff --git a/package-lock.json b/package-lock.json index 885ea64..da5811d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5661,7 +5661,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": { diff --git a/src/App.css b/src/App.css index d1e1bd6..6a79e73 100644 --- a/src/App.css +++ b/src/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/components/Main.js b/src/components/Main.js index d3bde39..15700cf 100644 --- a/src/components/Main.js +++ b/src/components/Main.js @@ -33,6 +33,8 @@ 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 { MuiThemeProvider, createMuiTheme } from '@material-ui/core/styles'; +import Switch from '@material-ui/core/Switch'; const drawerWidth = 240; @@ -77,6 +79,16 @@ class ResponsiveDrawer extends React.Component { key: 'Home', open: false, open2: false, + theme: createMuiTheme({ + typography: { + useNextVariants: true, + }, + palette: { + type: 'light' + } + }), + themeName: 'light', + themeChecked: true }; handleDrawerToggle = () => { @@ -84,11 +96,11 @@ class ResponsiveDrawer extends React.Component { } 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 +109,40 @@ class ResponsiveDrawer extends React.Component { }); } + handleChange = name => event => { + this.setState({ [name]: event.target.checked }); + if (this.state.themeName === 'light') { + this.setState({ + themeName: 'dark', + theme: createMuiTheme({ + typography: { + useNextVariants: true, + }, + palette: { + type: 'dark' + } + }) + }) + } else { + this.setState({ + themeName: 'light', + theme: createMuiTheme({ + typography: { + useNextVariants: true, + }, + palette: { + type: 'light' + } + }) + }) + } + }; + render() { - const { classes, theme } = this.props; + const { classes } = this.props; const drawer = ( -
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}`}