Skip to content

Commit 0e1415e

Browse files
authored
Add files via upload
0 parents  commit 0e1415e

22 files changed

+11427
-0
lines changed

README.md

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Getting Started with Create React App
2+
3+
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
4+
5+
## Available Scripts
6+
7+
In the project directory, you can run:
8+
9+
### `yarn start`
10+
11+
Runs the app in the development mode.\
12+
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
13+
14+
The page will reload when you make changes.\
15+
You may also see any lint errors in the console.
16+
17+
### `yarn test`
18+
19+
Launches the test runner in the interactive watch mode.\
20+
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
21+
22+
### `yarn build`
23+
24+
Builds the app for production to the `build` folder.\
25+
It correctly bundles React in production mode and optimizes the build for the best performance.
26+
27+
The build is minified and the filenames include the hashes.\
28+
Your app is ready to be deployed!
29+
30+
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
31+
32+
### `yarn eject`
33+
34+
**Note: this is a one-way operation. Once you `eject`, you can't go back!**
35+
36+
If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
37+
38+
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
39+
40+
You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
41+
42+
## Learn More
43+
44+
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
45+
46+
To learn React, check out the [React documentation](https://reactjs.org/).
47+
48+
### Code Splitting
49+
50+
This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
51+
52+
### Analyzing the Bundle Size
53+
54+
This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
55+
56+
### Making a Progressive Web App
57+
58+
This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
59+
60+
### Advanced Configuration
61+
62+
This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
63+
64+
### Deployment
65+
66+
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
67+
68+
### `yarn build` fails to minify
69+
70+
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)

package.json

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"name": "games",
3+
"version": "0.1.0",
4+
"private": true,
5+
"dependencies": {
6+
"@testing-library/jest-dom": "^5.14.1",
7+
"@testing-library/react": "^13.0.0",
8+
"@testing-library/user-event": "^13.2.1",
9+
"antd": "^5.8.4",
10+
"axios": "^0.27.2",
11+
"bootstrap": "^5.2.0",
12+
"bootstrap-icons": "^1.9.1",
13+
"react": "^18.2.0",
14+
"react-dom": "^18.2.0",
15+
"react-reveal": "^1.2.2",
16+
"react-router-dom": "^6.3.0",
17+
"react-scripts": "5.0.1",
18+
"styled-components": "^5.3.5",
19+
"web-vitals": "^2.1.0"
20+
},
21+
"scripts": {
22+
"start": "react-scripts start",
23+
"build": "react-scripts build",
24+
"test": "react-scripts test",
25+
"eject": "react-scripts eject"
26+
},
27+
"eslintConfig": {
28+
"extends": [
29+
"react-app",
30+
"react-app/jest"
31+
]
32+
},
33+
"browserslist": {
34+
"production": [
35+
">0.2%",
36+
"not dead",
37+
"not op_mini all"
38+
],
39+
"development": [
40+
"last 1 chrome version",
41+
"last 1 firefox version",
42+
"last 1 safari version"
43+
]
44+
}
45+
}

public/icon.png

40.3 KB
Loading

public/index.html

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<link rel="shortcut icon" href="./icon.png" type="image/x-icon" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1" />
7+
<meta name="theme-color" content="#000000" />
8+
<meta
9+
name="description"
10+
content="Web site created using create-react-app"
11+
/>
12+
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
13+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
14+
<style>
15+
body::-webkit-scrollbar {
16+
height: 0;
17+
width: 7px;
18+
background: #3e3e3e;
19+
}
20+
body::-webkit-scrollbar-thumb {
21+
border-radius: 10px;
22+
background: #000;
23+
}
24+
</style>
25+
<title>Games</title>
26+
</head>
27+
<body>
28+
<noscript>You need to enable JavaScript to run this app.</noscript>
29+
<div id="root"></div>
30+
</body>
31+
</html>

public/logo192.png

5.22 KB
Loading

public/logo512.png

9.44 KB
Loading

public/manifest.json

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
"src": "logo192.png",
12+
"type": "image/png",
13+
"sizes": "192x192"
14+
},
15+
{
16+
"src": "logo512.png",
17+
"type": "image/png",
18+
"sizes": "512x512"
19+
}
20+
],
21+
"start_url": ".",
22+
"display": "standalone",
23+
"theme_color": "#000000",
24+
"background_color": "#ffffff"
25+
}

public/robots.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# https://www.robotstxt.org/robotstxt.html
2+
User-agent: *
3+
Disallow:

src/App.jsx

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { Routes, Route } from "react-router-dom";
2+
import Home from "./pages/home";
3+
import Game from "./pages/game";
4+
import { Block } from "./style";
5+
6+
const App = () => {
7+
return (
8+
<Block>
9+
<Routes>
10+
<Route path="/" element={<Home />} />
11+
<Route path="/game/:id" element={<Game />} />
12+
</Routes>
13+
</Block>
14+
);
15+
};
16+
17+
export default App;

src/components/card/index.jsx

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import React from "react";
2+
import { GameCard } from "./style";
3+
import { Fade, Zoom } from "react-reveal";
4+
import { useNavigate } from "react-router-dom";
5+
6+
const Card = ({ item }) => {
7+
const navigate = useNavigate();
8+
9+
return (
10+
<GameCard>
11+
<Zoom top>
12+
<img src={item?.thumbnail} />
13+
</Zoom>
14+
<Fade>
15+
<div className="text">
16+
<h4 className="name">
17+
<Fade> {item?.title} </Fade>
18+
</h4>
19+
<p>
20+
<Fade> {item?.genre} </Fade>
21+
</p>
22+
<Fade right>
23+
<button onClick={() => navigate(`/game/${item?.id}`)}>
24+
<i className="bi bi-steam"> </i> Steam
25+
</button>
26+
</Fade>
27+
</div>
28+
</Fade>
29+
</GameCard>
30+
);
31+
};
32+
33+
export default Card;

src/components/card/style.jsx

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import styled from "styled-components";
2+
3+
export const GameCard = styled.div`
4+
margin: 20px 0;
5+
height: 400px;
6+
width: 250px;
7+
border-radius: 5px;
8+
background: #212121;
9+
box-shadow: 15px 15px 30px #191919, -15px -15px 30px #292929;
10+
color: white;
11+
overflow: hidden;
12+
&:hover {
13+
transform: translateY(-20px) !important;
14+
}
15+
img {
16+
width: 100%;
17+
}
18+
.text {
19+
width: 100%;
20+
height: 400px;
21+
padding: 20px;
22+
p {
23+
height: 50px;
24+
margin: 10px 0;
25+
}
26+
button {
27+
position: relative;
28+
bottom: 0;
29+
outline: none;
30+
border: none;
31+
background: #313131;
32+
border-radius: 5px;
33+
height: 40px;
34+
color: white;
35+
width: 150px;
36+
}
37+
h4 {
38+
height: 70px;
39+
color: white;
40+
}
41+
}
42+
`;

src/components/loader/index.jsx

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import React from "react";
2+
import { Block } from "./style";
3+
4+
const Loader = () => {
5+
return (
6+
<Block>
7+
<div className="spinner"></div>
8+
</Block>
9+
);
10+
};
11+
12+
export default Loader;

src/components/loader/style.jsx

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import styled from "styled-components";
2+
3+
export const Block = styled.div`
4+
background: #1e1e1e;
5+
height: 100vh;
6+
width: 100%;
7+
.spinner {
8+
position: absolute;
9+
top: 50%;
10+
left: 50%;
11+
transform: translate(-50%, -50%);
12+
margin: -37.5px -37.5px;
13+
width: 75px;
14+
height: 75px;
15+
border-radius: 50%;
16+
background-color: transparent;
17+
border: 4px solid #222;
18+
border-top-color: #009688;
19+
border-bottom-color: #009688;
20+
animation: 1s spin linear infinite;
21+
}
22+
@keyframes spin {
23+
from {
24+
-webkit-transform: rotate(0deg);
25+
transform: rotate(0deg);
26+
}
27+
to {
28+
-webkit-transform: rotate(360deg);
29+
transform: rotate(360deg);
30+
}
31+
}
32+
`;

src/index.jsx

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import React from "react";
2+
import ReactDOM from "react-dom/client";
3+
import "bootstrap/dist/css/bootstrap.css";
4+
import "bootstrap-icons/font/bootstrap-icons.css";
5+
import { BrowserRouter } from "react-router-dom";
6+
import App from "./App";
7+
8+
const root = ReactDOM.createRoot(document.getElementById("root"));
9+
root.render(
10+
<BrowserRouter>
11+
<App />
12+
</BrowserRouter>
13+
);

0 commit comments

Comments
 (0)