Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified bun.lockb
Binary file not shown.
19,326 changes: 19,326 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,25 @@
"preview": "vite preview"
},
"dependencies": {
"@tailwindcss/vite": "^4.1.11",
"react": "^19.0.0-rc-4c2e457c7c-20240522",
"react-dom": "^19.0.0-rc-4c2e457c7c-20240522",
"react-icons": "^5.2.1",
"styled-component": "^2.8.0",
"styled-components": "^6.1.11"
},
"devDependencies": {
"@tailwindcss/postcss": "^4.1.11",
"@types/react": "^18.2.66",
"@types/react-dom": "^18.2.22",
"@vitejs/plugin-react": "^4.2.1",
"autoprefixer": "^10.4.19",
"autoprefixer": "^10.4.21",
"eslint": "^8.57.0",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.6",
"postcss": "^8.4.38",
"tailwindcss": "^3.4.4",
"postcss": "^8.5.6",
"tailwindcss": "^4.1.11",
"vite": "^5.2.0"
}
}
5 changes: 3 additions & 2 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export default {
// ✅ New way
module.exports = {
plugins: {
tailwindcss: {},
'@tailwindcss/postcss': {},
autoprefixer: {},
},
}
9 changes: 5 additions & 4 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
//subscribe to Thapa Technical Youtube Channel - https://www.youtube.com/thapatechnical

import { ReactMemo } from "./hooks/Memo/ReactMemo";
// import NetflixCard from "./components/NetfilxCard";
import NetfilxCards2 from "./components/NetflixCards2";
// import { ReactMemo } from "./hooks/Memo/ReactMemo";

export const App = () => {
return (
<>
<ReactMemo />
{/* <NetflixCard /> */}
<NetfilxCards2 />
</>
);
};
36 changes: 36 additions & 0 deletions src/components/NetfilxCard.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import seriesData from "../api/seriesData.json";

const NetflixCard = () => {
const age = 20; // example age; make sure to define it or pass as prop

return (
<ul>
{seriesData.map((currElem) => (
<li key={currElem.id}>
<div>
<img width='40%' height='40%' src={currElem.img_url} alt="drama pic" />
</div>
<h2>Name: {currElem.name}</h2>
<h2>Rating: {currElem.rating}</h2>
<p>Summary: {currElem.description}</p>
<p>Genre: {currElem.genre}</p>
{age >= 16 ? (
<button>
<a
href={currElem.watch_url}
target="_blank"
rel="noopener noreferrer"
>
Watch Now
</a>
</button>
) : (
<button disabled>Age Restricted</button>
)}
</li>
))}
</ul>
);
};

export default NetflixCard;
69 changes: 69 additions & 0 deletions src/components/NetflixCard.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
ul {
display: flex;
flex-wrap: wrap;
gap: 20px;
list-style: none;
padding: 0;
justify-content: center;
}

li {
background-color: #1c1c1c;
color: #fff;
border-radius: 12px;
padding: 16px;
width: 300px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
transition: transform 0.2s;
}

li:hover {
transform: scale(1.03);
}

img {
width: 100%;
height: 180px;
object-fit: cover;
border-radius: 8px;
}

h2 {
font-size: 1.2rem;
margin: 8px 0;
}

p {
font-size: 0.95rem;
margin: 4px 0;
}

button {
margin-top: 12px;
padding: 10px 16px;
background: linear-gradient(135deg, #e50914, #b20710);
color: white;
border: none;
border-radius: 8px;
font-weight: 600;
font-size: 0.95rem;
cursor: pointer;
transition: background 0.3s ease, transform 0.2s;
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

button:hover {
background: linear-gradient(135deg, #ff0f1f, #c70012);
transform: translateY(-2px);
}

button a {
color: white;
text-decoration: none;
}

button[disabled] {
background-color: gray;
cursor: not-allowed;
opacity: 0.7;
}
17 changes: 17 additions & 0 deletions src/components/NetflixCardContent.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const NetflixCardContent = (props) => {
const age = 33;
return (<>
<li key={props.currElem.id}>
<div>
<img src={props.currElem.img_url} alt="card image" width='40%' height='40%' />
</div>
<h2>Name: {props.currElem.name}</h2>
<h2>Rating: {props.currElem.rating} </h2>
<p>Summary: {props.currElem.description} </p>
<p>Genre: {props.currElem.genre} </p>
{age >= 16 ? <button><a href={props.currElem.watch_url} target="_blank" rel="noopener noreferrer">Watch Now</a></button> : <button disabled>Age Restricton</button>}
</li>

</>)
}
export default NetflixCardContent;
21 changes: 21 additions & 0 deletions src/components/NetflixCards2.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import seriesData from '../api/seriesData.json'
// import './NetflixCard.css';
import NetflixCardContent from './NetflixCardContent';

const NetfilxCards2 = () => {
return (
<>
<ul>
{
seriesData.map((currElem) => {
return (<NetflixCardContent key={currElem.id} currElem={currElem} />)
})
}

</ul>
</>
)
}
export default NetfilxCards2;


6 changes: 2 additions & 4 deletions src/index.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@import "tailwindcss";

/* ? This file contains global CSS styles that apply to the entire application. It allows you to define styles that should be applied globally, affecting all components within the app */
/* base rule */
/* base rule */
6 changes: 5 additions & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from "@tailwindcss/vite";


// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
plugins: [react(), tailwindcss()],
})