diff --git a/src/App.css b/src/App.css
index 9dd2624..145ee45 100644
--- a/src/App.css
+++ b/src/App.css
@@ -3,10 +3,11 @@ body {
}
.report-google-map-container > div {
- height: 92% !important;
width: 50% !important;
}
-.sighting-google-map-container > div {
- height: 92% !important;
+@media (min-width: 960px) {
+ .sighting-google-map-container > div {
+ width: calc(100% - 241px) !important;
+ }
}
\ No newline at end of file
diff --git a/src/components/Main.js b/src/components/Main.js
index 2259d17..815ea15 100644
--- a/src/components/Main.js
+++ b/src/components/Main.js
@@ -1,75 +1,173 @@
import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from '@material-ui/core/styles';
+import Drawer from '@material-ui/core/Drawer';
import AppBar from '@material-ui/core/AppBar';
-import Tabs from '@material-ui/core/Tabs';
-import Tab from '@material-ui/core/Tab';
+import Toolbar from '@material-ui/core/Toolbar';
+import List from '@material-ui/core/List';
+import ListItem from '@material-ui/core/ListItem';
+import ListItemIcon from '@material-ui/core/ListItemIcon';
+import ListItemText from '@material-ui/core/ListItemText';
import Typography from '@material-ui/core/Typography';
+import IconButton from '@material-ui/core/IconButton';
+import Hidden from '@material-ui/core/Hidden';
+import Divider from '@material-ui/core/Divider';
+import MenuIcon from '@material-ui/icons/Menu';
+import HomeIcon from '@material-ui/icons/Home';
+import AssignmentIcon from '@material-ui/icons/Assignment';
+import MapIcon from '@material-ui/icons/Map';
+import ListIcon from '@material-ui/icons/List';
+import SlideshowIcon from '@material-ui/icons/Slideshow';
import Home from '../pages/Home';
import ViewMap from '../pages/ViewMap';
import Quiz from '../pages/Quiz';
import SightingList from '../pages/SightingList';
import Report from '../pages/Report';
-import Info from '../pages/Info';
-function TabContainer(props) {
- return (
-
- {props.children}
-
- );
-}
-
-TabContainer.propTypes = {
- children: PropTypes.node.isRequired,
-};
+const drawerWidth = 240;
const styles = theme => ({
root: {
flexGrow: 1,
- backgroundColor: theme.palette.background.paper,
+ height: '100vh',
+ zIndex: 1,
+ overflow: 'hidden',
+ position: 'relative',
+ display: 'flex',
+ width: '100%',
+ },
+ appBar: {
+ position: 'absolute',
+ marginLeft: drawerWidth,
+ [theme.breakpoints.up('md')]: {
+ width: `calc(100% - ${drawerWidth}px)`,
+ },
+ },
+ navIconHide: {
+ [theme.breakpoints.up('md')]: {
+ display: 'none',
+ },
+ },
+ toolbar: theme.mixins.toolbar,
+ drawerPaper: {
+ width: drawerWidth,
+ [theme.breakpoints.up('md')]: {
+ position: 'relative',
+ },
+ },
+ content: {
+ flexGrow: 1,
+ backgroundColor: theme.palette.background.default,
+ padding: theme.spacing.unit * 3,
},
});
-class SimpleTabs extends React.Component {
+class ResponsiveDrawer extends React.Component {
state = {
- value: 0,
- };
+ mobileOpen: false,
+ key: ''
+ }
- handleChange = (event, value) => {
- this.setState({ value });
- };
+ handleDrawerToggle = () => {
+ this.setState(state => ({ mobileOpen: !state.mobileOpen }));
+ }
+
+ nav = (text) => {
+ this.setState({
+ key: text
+ })
+ }
render() {
- const { classes } = this.props;
- const { value } = this.state;
+ const { classes, theme } = this.props;
- return (
-
-
-
-
-
-
-
-
-
-
-
- {value === 0 &&
}
- {value === 1 &&
}
- {value === 2 &&
}
- {value === 3 &&
}
- {value === 4 &&
}
- {value === 5 &&
}
-
- );
+ const drawer = (
+
+
+
+
+ this.nav('Home')}>
+
+
+
+ this.nav('Report')}>
+
+
+
+ this.nav('Map')}>
+
+
+
+ this.nav('List')}>
+
+
+
+ this.nav('Quiz')}>
+
+
+
+
+
+ );
+
+ return (
+
+
+
+
+
+
+
+ The American Marten
+
+
+
+
+
+ {drawer}
+
+
+
+
+ {drawer}
+
+
+
+ {this.state.key === 'Home' &&
}
+ {this.state.key === 'Report' &&
}
+ {this.state.key === 'Map' &&
}
+ {this.state.key === 'List' &&
}
+ {this.state.key === 'Quiz' &&
}
+
+ );
}
}
-SimpleTabs.propTypes = {
+ResponsiveDrawer.propTypes = {
classes: PropTypes.object.isRequired,
+ theme: PropTypes.object.isRequired,
};
-export default withStyles(styles)(SimpleTabs);
-
+export default withStyles(styles, { withTheme: true })(ResponsiveDrawer);
\ No newline at end of file
diff --git a/src/components/ReportForm.js b/src/components/ReportForm.js
index ac72000..f3a7d3b 100644
--- a/src/components/ReportForm.js
+++ b/src/components/ReportForm.js
@@ -17,6 +17,7 @@ const styles = theme => ({
container: {
display: 'flex',
flexWrap: 'wrap',
+ marginTop: '64px'
},
textField: {
marginLeft: theme.spacing.unit * 2,