-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
JunHyeong Kim
committed
Sep 21, 2024
1 parent
85fac06
commit 20de8e2
Showing
16 changed files
with
18,931 additions
and
12,442 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import PropTypes from "prop-types"; | ||
import { Link } from "react-router-dom"; | ||
import React from "react"; | ||
import styles from "../css/Home.module.css"; | ||
|
||
function Movie({ id, img, genres = [], title, score, content }) { | ||
console.log("movie rendered"); | ||
return ( | ||
<div className={styles.item} key={id}> | ||
<img className={styles.image} src={img} alt={title} /> | ||
<div className={styles.info}> | ||
<Link to={`/detail/${id}`} className={styles.title}> | ||
{title} | ||
</Link> | ||
<p className={styles.genres}>{genres.join(", ")}</p> | ||
<p className={styles.rating}>Rating: {score}</p> | ||
<p className={styles.content}> | ||
content:{" "} | ||
{content.length > 200 ? `${content.slice(0, 200)}...` : content} | ||
</p> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
Movie.propTypes = { | ||
genres: PropTypes.array, | ||
img: PropTypes.string.isRequired, | ||
title: PropTypes.string.isRequired, | ||
score: PropTypes.number.isRequired, | ||
content: PropTypes.string.isRequired, | ||
id: PropTypes.number.isRequired, | ||
}; | ||
|
||
export default Movie; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
.movie_detail { | ||
max-width: 800px; | ||
margin: auto; | ||
padding: 20px; | ||
color: white; | ||
} | ||
|
||
.movie_background { | ||
height: 300px; | ||
background-size: cover; | ||
background-position: center; | ||
border-radius: 10px; | ||
margin-bottom: 20px; | ||
} | ||
|
||
.movie_info { | ||
background-color: rgba(0, 0, 0, 0.7); | ||
padding: 20px; | ||
border-radius: 10px; | ||
} | ||
|
||
.movie_cover { | ||
width: 100%; | ||
max-width: 300px; | ||
border-radius: 10px; | ||
} | ||
|
||
.more_info { | ||
display: inline-block; | ||
margin-top: 10px; | ||
padding: 10px 15px; | ||
background-color: #e50914; | ||
color: white; | ||
border-radius: 5px; | ||
text-decoration: none; | ||
} | ||
|
||
.more-info:hover { | ||
background-color: #f62134; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
.list { | ||
max-width: 1200px; | ||
margin: auto; | ||
padding: 20px; | ||
display: flex; | ||
flex-wrap: wrap; | ||
gap: 20px; | ||
} | ||
|
||
.item { | ||
background-color: rgba(0, 0, 0, 0.7); | ||
border-radius: 10px; | ||
overflow: hidden; | ||
width: calc(33.333% - 20px); | ||
transition: transform 0.2s; | ||
} | ||
|
||
.item:hover { | ||
transform: scale(1.05); | ||
} | ||
|
||
.image { | ||
width: 100%; | ||
height: auto; | ||
} | ||
|
||
.info { | ||
padding: 15px; | ||
color: white; | ||
} | ||
|
||
.title { | ||
font-size: 1.5em; | ||
margin: 0; | ||
} | ||
|
||
.genres { | ||
font-size: 0.9em; | ||
color: #ccc; | ||
} | ||
|
||
.rating { | ||
font-weight: bold; | ||
} | ||
|
||
.loader { | ||
border: 8px solid rgba(243, 243, 243, 0.7); | ||
border-top: 8px solid #3498db; | ||
border-radius: 50%; | ||
width: 60px; | ||
height: 60px; | ||
animation: spin 1s linear infinite; | ||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); | ||
} | ||
|
||
@keyframes spin { | ||
0% { | ||
transform: rotate(0deg); | ||
} | ||
100% { | ||
transform: rotate(360deg); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,6 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom/client'; | ||
import './index.css'; | ||
import App from './App'; | ||
import reportWebVitals from './reportWebVitals'; | ||
import React from "react"; | ||
import ReactDOM from "react-dom/client"; | ||
import App from "./App"; | ||
|
||
const root = ReactDOM.createRoot(document.getElementById('root')); | ||
root.render( | ||
<React.StrictMode> | ||
<App /> | ||
</React.StrictMode> | ||
); | ||
|
||
// If you want to start measuring performance in your app, pass a function | ||
// to log results (for example: reportWebVitals(console.log)) | ||
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals | ||
reportWebVitals(); | ||
const root = ReactDOM.createRoot(document.getElementById("root")); | ||
root.render(<App />); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.