Skip to content

Commit 7a77ff0

Browse files
committed
add base frontend
1 parent c204a35 commit 7a77ff0

27 files changed

+43898
-0
lines changed

react-books-client/.gitignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
14+
# misc
15+
.DS_Store
16+
.env.local
17+
.env.development.local
18+
.env.test.local
19+
.env.production.local
20+
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*

react-books-client/package-lock.json

Lines changed: 32463 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

react-books-client/package.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"name": "client",
3+
"version": "0.1.0",
4+
"private": true,
5+
"dependencies": {
6+
"@material-ui/core": "3.0.1",
7+
"@material-ui/icons": "3.0.1",
8+
"apollo-boost": "^0.1.28",
9+
"axios": "^0.18.0",
10+
"date-fns": "^1.30.1",
11+
"graphql": "^14.1.1",
12+
"react": "^16.8.2",
13+
"react-apollo": "^2.4.1",
14+
"react-dom": "^16.8.2",
15+
"react-player": "^1.9.3",
16+
"react-router-dom": "^4.3.1",
17+
"react-scripts": "2.1.5"
18+
},
19+
"scripts": {
20+
"start": "react-scripts start",
21+
"build": "react-scripts build",
22+
"test": "react-scripts test",
23+
"eject": "react-scripts eject"
24+
},
25+
"eslintConfig": {
26+
"extends": "react-app"
27+
},
28+
"browserslist": [
29+
">0.2%",
30+
"not dead",
31+
"not ie <= 11",
32+
"not op_mini all"
33+
]
34+
}
3.78 KB
Binary file not shown.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
6+
<meta
7+
name="viewport"
8+
content="width=device-width, initial-scale=1, shrink-to-fit=no"
9+
/>
10+
<meta name="theme-color" content="#000000" />
11+
<!--
12+
manifest.json provides metadata used when your web app is installed on a
13+
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
14+
-->
15+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
16+
<!--
17+
Notice the use of %PUBLIC_URL% in the tags above.
18+
It will be replaced with the URL of the `public` folder during the build.
19+
Only files inside the `public` folder can be referenced from the HTML.
20+
21+
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
22+
work correctly both with client-side routing and a non-root public URL.
23+
Learn how to configure a non-root public URL by running `npm run build`.
24+
-->
25+
<title>ReactTracks</title>
26+
</head>
27+
<body>
28+
<noscript>You need to enable JavaScript to run this app.</noscript>
29+
<div id="root"></div>
30+
<!--
31+
This HTML file is a template.
32+
If you open it directly in the browser, you will see an empty page.
33+
34+
You can add webfonts, meta tags, or analytics to this file.
35+
The build step will place the bundled scripts into the <body> tag.
36+
37+
To begin the development, run `npm start` or `yarn start`.
38+
To create a production bundle, use `npm run build` or `yarn build`.
39+
-->
40+
</body>
41+
</html>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"short_name": "React App",
3+
"name": "Create React App Sample",
4+
"icons": [
5+
{
6+
"src": "favicon.ico",
7+
"sizes": "64x64 32x32 24x24 16x16",
8+
"type": "image/x-icon"
9+
}
10+
],
11+
"start_url": ".",
12+
"display": "standalone",
13+
"theme_color": "#000000",
14+
"background_color": "#ffffff"
15+
}

react-books-client/src/Root.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import React from "react";
2+
import withRoot from "./withRoot";
3+
4+
const Root = () => <div>Root</div>;
5+
6+
export default withRoot(Root);
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
import React from "react";
2+
import withStyles from "@material-ui/core/styles/withStyles";
3+
// import Typography from "@material-ui/core/Typography";
4+
// import Avatar from "@material-ui/core/Avatar";
5+
// import FormControl from "@material-ui/core/FormControl";
6+
// import Paper from "@material-ui/core/Paper";
7+
// import Input from "@material-ui/core/Input";
8+
// import InputLabel from "@material-ui/core/InputLabel";
9+
// import Button from "@material-ui/core/Button";
10+
// import Lock from "@material-ui/icons/Lock";
11+
12+
const Login = ({ classes, setNewUser }) => {
13+
return <div>Login</div>;
14+
};
15+
16+
const styles = theme => ({
17+
root: {
18+
width: "auto",
19+
display: "block",
20+
marginLeft: theme.spacing.unit * 3,
21+
marginRight: theme.spacing.unit * 3,
22+
[theme.breakpoints.up("md")]: {
23+
width: 400,
24+
marginLeft: "auto",
25+
marginRight: "auto"
26+
}
27+
},
28+
paper: {
29+
marginTop: theme.spacing.unit * 8,
30+
display: "flex",
31+
flexDirection: "column",
32+
alignItems: "center",
33+
padding: theme.spacing.unit * 2
34+
},
35+
title: {
36+
marginTop: theme.spacing.unit * 2,
37+
color: theme.palette.secondary.main
38+
},
39+
avatar: {
40+
margin: theme.spacing.unit,
41+
backgroundColor: theme.palette.primary.main
42+
},
43+
form: {
44+
width: "100%",
45+
marginTop: theme.spacing.unit
46+
},
47+
submit: {
48+
marginTop: theme.spacing.unit * 2,
49+
marginBottom: theme.spacing.unit * 2
50+
}
51+
});
52+
53+
export default withStyles(styles)(Login);
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
import React from "react";
2+
import withStyles from "@material-ui/core/styles/withStyles";
3+
// import Typography from "@material-ui/core/Typography";
4+
// import Avatar from "@material-ui/core/Avatar";
5+
// import FormControl from "@material-ui/core/FormControl";
6+
// import Paper from "@material-ui/core/Paper";
7+
// import Input from "@material-ui/core/Input";
8+
// import InputLabel from "@material-ui/core/InputLabel";
9+
// import Button from "@material-ui/core/Button";
10+
// import Dialog from "@material-ui/core/Dialog";
11+
// import DialogActions from "@material-ui/core/DialogActions";
12+
// import DialogContent from "@material-ui/core/DialogContent";
13+
// import DialogContentText from "@material-ui/core/DialogContentText";
14+
// import DialogTitle from "@material-ui/core/DialogTitle";
15+
// import Slide from "@material-ui/core/Slide";
16+
// import Gavel from "@material-ui/icons/Gavel";
17+
// import VerifiedUserTwoTone from "@material-ui/icons/VerifiedUserTwoTone";
18+
19+
const Register = ({ classes }) => {
20+
return <div>Register</div>;
21+
};
22+
23+
const styles = theme => ({
24+
root: {
25+
width: "auto",
26+
display: "block",
27+
marginLeft: theme.spacing.unit * 3,
28+
marginRight: theme.spacing.unit * 3,
29+
[theme.breakpoints.up("md")]: {
30+
width: 400,
31+
marginLeft: "auto",
32+
marginRight: "auto"
33+
}
34+
},
35+
paper: {
36+
marginTop: theme.spacing.unit * 8,
37+
display: "flex",
38+
flexDirection: "column",
39+
alignItems: "center",
40+
padding: theme.spacing.unit * 2
41+
},
42+
title: {
43+
marginTop: theme.spacing.unit * 2,
44+
color: theme.palette.openTitle
45+
},
46+
avatar: {
47+
margin: theme.spacing.unit,
48+
backgroundColor: theme.palette.secondary.main
49+
},
50+
form: {
51+
width: "100%",
52+
marginTop: theme.spacing.unit
53+
},
54+
submit: {
55+
marginTop: theme.spacing.unit * 2,
56+
marginBottom: theme.spacing.unit * 2
57+
},
58+
icon: {
59+
padding: "0px 2px 2px 0px",
60+
verticalAlign: "middle",
61+
color: "green"
62+
}
63+
});
64+
65+
export default withStyles(styles)(Register);
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import React from "react";
2+
import withStyles from "@material-ui/core/styles/withStyles";
3+
// import ExitToApp from "@material-ui/icons/ExitToApp";
4+
// import Typography from "@material-ui/core/Typography";
5+
// import Button from "@material-ui/core/Button";
6+
7+
const Signout = ({ classes }) => {
8+
return <div>Signout</div>;
9+
};
10+
11+
const styles = {
12+
root: {
13+
cursor: "pointer",
14+
display: "flex"
15+
},
16+
buttonIcon: {
17+
marginLeft: "5px"
18+
}
19+
};
20+
21+
export default withStyles(styles)(Signout);

0 commit comments

Comments
 (0)