Skip to content

Commit

Permalink
frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
joshi008 committed Oct 11, 2020
1 parent 16014e9 commit 8f16326
Show file tree
Hide file tree
Showing 143 changed files with 25,096 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# sunhacks-project
Nothing
15,441 changes: 15,441 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

39 changes: 39 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "open-react-template",
"version": "0.1.0",
"private": true,
"dependencies": {
"@material-ui/core": "^4.11.0",
"classnames": "^2.2.6",
"lodash": "^4.17.20",
"node-sass": "^4.14.1",
"package.json": "^2.0.1",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-ga": "^2.7.0",
"react-router-dom": "^5.1.2",
"react-scripts": "^3.4.3"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {}
}
Binary file added public/favicon.ico
Binary file not shown.
33 changes: 33 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8" />
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="Web site created using create-react-app" />
<link rel="apple-touch-icon" href="logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
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`.
-->
<title>Open - React Template</title>
</head>

<body class="has-animations">
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root" class="body-wrap"></div>
</body>

</html>
Binary file added public/logo192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/logo512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions public/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
2 changes: 2 additions & 0 deletions public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Empty file added src/App.css
Empty file.
63 changes: 63 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import React, { useRef, useEffect, Suspense } from 'react';
import { useLocation, Switch } from 'react-router-dom';
import AppRoute from './utils/AppRoute';
import ScrollReveal from './utils/ScrollReveal';
import ReactGA from 'react-ga';

// Layouts
import LayoutDefault from './layouts/LayoutDefault';

// Views
import Home from './views/Home';

import Login from "./Screens/authentication/Login/Login";
import Signup from "./Screens/authentication/Signup/Signup";
import Dash from "./Screens/Dasboard/Dash";

import AddCourse from "./Screens/AddCourse/AddCourse";
import UserList from './Components1/UserList/UserList';


// Initialize Google Analytics
ReactGA.initialize(process.env.REACT_APP_GA_CODE);

const trackPage = page => {
ReactGA.set({ page });
ReactGA.pageview(page);
};

const App = () => {



const childRef = useRef();
let location = useLocation();

useEffect(() => {
const page = location.pathname;
document.body.classList.add('is-loaded')
childRef.current.init();
trackPage(page);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [location]);

return (
<ScrollReveal
ref={childRef}
children={() => (
<Switch>
<AppRoute exact path="/" component={Home} layout={LayoutDefault} />
<AppRoute exact path="/login" component={Login} />
<AppRoute exact path="/signup" component={Signup} />
<AppRoute exact path="/dashboard" component={Dash} />
<AppRoute exact path="/addcourse" component={AddCourse} />
<AppRoute exact path="/allusers" component={UserList} />

</Switch>
)} />

);
return
}

export default App;
18 changes: 18 additions & 0 deletions src/App.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { Router } from 'react-router-dom';
import { createMemoryHistory } from 'history'
import App from './App';

const history = createMemoryHistory();

it('renders without crashing', () => {
const div = document.createElement('div');
ReactDOM.render(
<Router history={history}>
<App />
</Router>,
div
);
ReactDOM.unmountComponentAtNode(div);
});
45 changes: 45 additions & 0 deletions src/Components1/AddComp/AddComp.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
.back {
background-color: white;
border-radius: 20rem;
box-shadow: 1rem;
max-width: 100%;
max-height: 100%;
height: max-content;
}

.btn {
color: yellow;
background-color: yellow;
}

.add-app {
display: flex;
flex-direction: column;
align-items: center;
justify-content: start;
width: 45%;
min-height: 600px;
background: #909fe4;
text-align: center;
margin: 2% auto;
border-radius: 10px;
padding-bottom: 32px;
transition: 1;
}

.add-container {
display: flex;
flex-direction: row;
position: relative;
}

@media only screen and (max-width: 900px) {
.add-app {
width: 80%;
}
}
@media only screen and (max-width: 600px) {
.add-app {
width: 90%;
}
}
67 changes: 67 additions & 0 deletions src/Components1/AddComp/AddComp.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import React from 'react'
import TextField from '@material-ui/core/TextField';
import "./AddComp.css"
import { Button } from '@material-ui/core';
import List from '../List/List'
import Card from '../Card/Card'

function AddComp() {

const inputProps = {
step: 300,
};



return (

<div className="add-app">
<h1>Add a new Roadmap and devote to social cause!</h1>

<TextField
variant="outlined"
margin="normal"
required

id="name_project"
label="Name of Roadmap"
name="text"
autoComplete="name"
autoFocus
/>

<Card></Card>

<Button
style={{
borderRadius: 35,
backgroundColor: "#21b6ae",
padding: "9px 15px",
fontSize: "18px"
}}
variant="contained"
>
Add Check-List
</Button>
<Button
style={{
borderRadius: 35,
backgroundColor: "#21b6ae",
padding: "9px 15px",
fontSize: "18px"
}}
variant="contained"
>
Add course
</Button>

<List></List>

</div>



)
}

export default AddComp
Loading

0 comments on commit 8f16326

Please sign in to comment.