Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
sixmachine-6 authored Apr 21, 2024
1 parent c71aa05 commit edc5a09
Show file tree
Hide file tree
Showing 34 changed files with 784 additions and 0 deletions.
14 changes: 14 additions & 0 deletions build/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"files": {
"main.css": "/static/css/main.55fce0cf.css",
"main.js": "/static/js/main.80e13698.js",
"static/media/KFOlCnqEu92Fr1MmEU9fBBc4.woff2": "/static/media/KFOlCnqEu92Fr1MmEU9fBBc4.2d241905f5d9b81989af.woff2",
"index.html": "/index.html",
"main.55fce0cf.css.map": "/static/css/main.55fce0cf.css.map",
"main.80e13698.js.map": "/static/js/main.80e13698.js.map"
},
"entrypoints": [
"static/css/main.55fce0cf.css",
"static/js/main.80e13698.js"
]
}
Binary file added build/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions build/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><link href="https://unpkg.com/[email protected]/css/boxicons.min.css" rel="stylesheet"/><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"/><link rel="manifest" href="/manifest.json"/><title>React App</title><script defer="defer" src="/static/js/main.80e13698.js"></script><link href="/static/css/main.55fce0cf.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
Binary file added build/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 build/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 build/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"
}
3 changes: 3 additions & 0 deletions build/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
2 changes: 2 additions & 0 deletions build/static/css/main.55fce0cf.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions build/static/css/main.55fce0cf.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions build/static/js/main.80e13698.js

Large diffs are not rendered by default.

72 changes: 72 additions & 0 deletions build/static/js/main.80e13698.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @remix-run/router v1.15.3
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/

/**
* React Router DOM v6.22.3
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/

/**
* React Router v6.22.3
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/
1 change: 1 addition & 0 deletions build/static/js/main.80e13698.js.map

Large diffs are not rendered by default.

Binary file not shown.
17 changes: 17 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { BrowserRouter, Route, Routes } from "react-router-dom";
import Homepage from "./pages/Homepage";
import { MovieContextProvider } from "./context/moviesContext";
import MovieDetails from "./pages/MovieDetails";

export default function App() {
return (
<MovieContextProvider>
<BrowserRouter>
<Routes>
<Route path="/" element={<Homepage />} />
<Route path="/:id" element={<MovieDetails />} />
</Routes>
</BrowserRouter>
</MovieContextProvider>
);
}
Binary file added src/KFOlCnqEu92Fr1MmEU9fBBc4.woff2
Binary file not shown.
26 changes: 26 additions & 0 deletions src/components/ChangePage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { useMovies } from "../context/moviesContext";
import styles from "./ChangePage.module.css";
function ChangePage() {
const { page, setPage } = useMovies();
return (
<div className={styles.page}>
<button
className={styles.button}
disabled={page === 0}
onClick={() => setPage(page - 1)}
>
&larr;
</button>
<p>{page}/ 10</p>
<button
className={styles.button}
disabled={page === 10}
onClick={() => setPage(page + 1)}
>
&rarr;
</button>
</div>
);
}

export default ChangePage;
18 changes: 18 additions & 0 deletions src/components/ChangePage.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.page {
display: flex;
width: 100%;
justify-content: center;
align-items: center;
font-size: 2rem;
}

.button {
height: 4rem;
width: 5rem;
background: #ffcb38;
border: none;
color: black;
font-size: 3rem;
margin: 1rem;
font-weight: bold;
}
25 changes: 25 additions & 0 deletions src/components/Filters.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { useMovies } from "../context/moviesContext";
import styles from "./Filters.module.css";
function Filters() {
const { genres, getGenre, selectedGenre, deleteGenre, setFilters } =
useMovies();
console.log(genres);
return (
<div className={styles.listItems}>
<i className="bx bx-cut" onClick={() => setFilters(false)}></i>
<h2 className={styles.filter}>Filters by Genre</h2>
<ul className={styles.selectedList}>
{selectedGenre &&
selectedGenre.map((el) => (
<li onClick={() => deleteGenre(el)}>{el.name}</li>
))}
</ul>
<ul className={styles.list}>
{genres &&
genres.map((el) => <li onClick={() => getGenre(el)}>{el.name}</li>)}
</ul>
</div>
);
}

export default Filters;
88 changes: 88 additions & 0 deletions src/components/Filters.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
.listItems {
height: 100%;
width: 50%;
background: #f8f9fb;
position: fixed;
top: 0;
right: 0;
z-index: 1;
padding-top: 4rem;
border-left: 3px solid #64ba87;
font-size: 2rem;
}

.filter {
text-align: center;
width: 14rem;
margin: 0 auto;
height: 3rem;
padding-top: 1rem;
font-size: 1.6rem;
background: #f8f9fb;
border-radius: 27px;
outline: 3px solid #ffcb38;
}

.selectedList {
width: 100%;
list-style: none;
border-radius: 8px;
background: #eceff1;
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
margin-top: 2rem;
}

.selectedList li {
height: 2rem;
min-width: 6rem;
font-size: 1.5rem;
margin: 0.5rem;
padding: 0.3rem 0.5rem;
background: #9cdcb3;
border: 2px solid #9cdcb3;
color: #02782f;
text-align: center;
border-radius: 12px;
margin-bottom: 1rem;
}

.list {
list-style: none;
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
padding-top: 1rem;
overflow: scroll;
}

.list li {
height: 2rem;
min-width: 4rem;
font-size: 1.5rem;
margin: 0.5rem;
padding: 0.3rem 0.5rem;
background: #ffcb38;
border: 2px solid #ffcb38;
text-align: center;
border-radius: 12px;
}

.listItems i {
position: relative;
top: -2rem;
height: 3rem;
width: 3rem;
background: #ffcb38;
border: none;
color: black;
font-size: 2.9rem;
margin: 1rem;
text-align: center;
padding: 1rem;
font-weight: bold;
border-radius: 50%;
}
Loading

0 comments on commit edc5a09

Please sign in to comment.