setIsSearchItemsShow(false)}
31 | className={`${
32 | !isSearchItemsShow && "hidden"
33 | } fixed z-40 w-full h-full bg-black backdrop-blur-sm dark:bg-opacity-60 bg-opacity-25 `}
34 | />
35 |
setOpenMenu(false)}
37 | className={`${
38 | !openMenu && "hidden"
39 | } fixed z-[51] w-full h-full bg-black lg:hidden backdrop-blur-sm dark:bg-opacity-70 bg-opacity-25 `}
40 | />
41 |
45 |
53 |
54 |
60 |
61 |
62 | } />
63 | }
67 | />
68 | }
72 | />
73 | } />
74 | } />
75 | } />
76 |
77 |
78 |
79 |
80 |
81 | );
82 | };
83 |
84 | export default App;
85 |
--------------------------------------------------------------------------------
/src/components/explore/ItemCard.jsx:
--------------------------------------------------------------------------------
1 | import { useGetMovieDetailsQuery } from "../../redux/services/movieDatabase";
2 | import a from "../../assets/luther-the-fallen-sun-2023-sm.webp";
3 | import { useState } from "react";
4 | import { FaStar } from "react-icons/fa";
5 | import { Link } from "react-router-dom";
6 | import { Spin } from "antd";
7 | const ItemCard = ({ movieId }) => {
8 | console.log(movieId);
9 | const { data, isFetching, error } = useGetMovieDetailsQuery({
10 | movieId: movieId,
11 | });
12 | if (isFetching) {
13 | return (
14 |
19 | );
20 | }
21 | return (
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
34 | Year : {data?.title.year}
35 |
36 |
37 | {data?.title.runningTimeInMinutes || "--"} minutes
38 |
39 |
40 |
41 | {data?.genres.slice(0, 3).map((genre, index) => (
42 |
49 |
50 | {genre}
51 |
52 |
53 | ))}
54 |
55 |
56 |
57 |
58 | Watch Movie
59 |
60 |
61 |
62 |
63 |
64 |
65 |
{data?.title.title}
66 |
67 |
68 |
69 |
{data?.ratings.rating}
70 |
71 |
72 |
73 | );
74 | };
75 |
76 | export default ItemCard;
77 |
--------------------------------------------------------------------------------
/src/components/explore/ExploreItemCard.jsx:
--------------------------------------------------------------------------------
1 | import { Spin } from "antd";
2 | import { Link } from "react-router-dom";
3 | import a from "../../assets/8.gif";
4 | import { useGetMovieDetailsQuery } from "../../redux/services/movieDatabase";
5 | const ExploreItemCard = ({ movieId }) => {
6 | const { data, isFetching, error } = useGetMovieDetailsQuery({
7 | movieId: movieId,
8 | });
9 | if (isFetching) {
10 | return (
11 |
16 | );
17 | }
18 | if (error) {
19 | return (
20 |
25 | );
26 | }
27 | return (
28 |
29 |
30 |
31 |
36 |
37 |
38 |
39 |
40 | {data?.title.title}
41 |
42 |
43 |
48 |
49 | {data?.ratings.rating}{" "}
50 |
51 |
52 |
53 |
54 | {data?.genres.slice(0, 2).map((genre, index) => (
55 |
62 |
63 | {genre}
64 |
65 |
66 | ))}
67 |
68 |
69 |
70 |
71 | Watch Movie
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 | );
80 | };
81 |
82 | export default ExploreItemCard;
83 |
--------------------------------------------------------------------------------
/src/pages/moviePage/MoviePage2.jsx:
--------------------------------------------------------------------------------
1 | import { Link, withRouter } from "react-router-dom";
2 | import { BsPlay } from "react-icons/bs";
3 | import { useGetMovieImgQuery } from "../../redux/services/movieDatabase";
4 | import { Spin } from "antd";
5 | const MoviePage = ({ history }) => {
6 | const movieData = history.location.state?.data;
7 | const { data, fetching, error } = useGetMovieImgQuery({
8 | movieId: movieData?.id.match(/\d+/g)[0],
9 | });
10 | return (
11 |
12 |
13 |
14 |
15 |
20 |
21 |
22 |
23 |
24 |
29 |
30 |
31 |
32 |
33 |
View Trailar
34 |
35 |
36 |
37 |
38 | {movieData?.title.title}
39 |
40 |
41 | {movieData?.title.titleType}
42 |
43 |
44 | {movieData?.genres.slice(0, 5).map((genre, index) => (
45 |
52 |
53 | {genre}
54 |
55 |
56 | ))}
57 |
58 |
59 |
64 |
65 | {movieData?.ratings.rating}
66 |
67 | ( {movieData?.ratings.ratingCount} votes )
68 |
69 |
70 |
71 |
72 |
73 | Year :
74 | {movieData?.title.year}
75 |
76 |
77 | Time :
78 | {movieData?.title.runningTimeInMinutes || "--"} minutes
79 |
80 |
81 |
82 |
83 | Country :
84 |
85 | {movieData?.certificates.US[0].country}
86 |
87 |
88 |
89 |
90 | Author :
91 |
92 | {movieData?.plotSummary?.author}
93 |
94 |
95 |
96 |
97 | summery :
98 |
99 | {movieData?.plotOutline.text}
100 |
101 |
102 |
103 |
104 | {/*
cast
105 |
j
106 |
relate
*/}
107 |
108 |
109 | );
110 | };
111 |
112 | export default withRouter(MoviePage);
113 |
--------------------------------------------------------------------------------
/src/constans/index.js:
--------------------------------------------------------------------------------
1 | import avatar from '../assets/avatar.png'
2 |
3 | import {
4 | AiOutlineHeart,
5 | MdOutlineExplore,
6 | BiGift,
7 | IoNewspaperOutline,
8 | GiCeremonialMask,
9 | MdMonitor,
10 | BiCameraMovie,
11 | AiOutlineSchedule,
12 | } from "../common/icons";
13 |
14 | export const sidbarItem = [
15 | { title: "Explore", icon:
},
16 | { title: "Movies", icon:
},
17 | { title: "Series", icon:
},
18 | { title: "Anime", icon:
},
19 | { title: "Genres", icon:
},
20 | { title: "Favourites", icon:
},
21 | // { title: "News", icon:
},
22 | // { title: "Coming Soon", icon:
},
23 | ];
24 |
25 | export const genres = [
26 | { name: "Action", imgUrl: "https://mobomoviez.fun/images/genres/action.jpg" },
27 | {
28 | name: "Adventure",
29 | imgUrl: "https://mobomoviez.fun/images/genres/adventure.jpg",
30 | },
31 | {
32 | name: "Animation",
33 | imgUrl: "https://mobomoviez.fun/images/genres/animation.jpg",
34 | },
35 | { name: "Comedy", imgUrl: "https://mobomoviez.fun/images/genres/comedy.jpg" },
36 | {
37 | name: "Mystery",
38 | imgUrl: "https://mobomoviez.fun/images/genre/mystery.jpg",
39 | },
40 | { name: "Sport", imgUrl: "https://mobomoviez.fun/images/genres/sport.jpg" },
41 | { name: "Horror", imgUrl: "https://mobomoviez.fun/images/genres/horror.jpg" },
42 | {
43 | name: "Documentary",
44 | imgUrl: "https://mobomoviez.fun/images/genres/documentary.jpg",
45 | },
46 | { name: "War", imgUrl: "https://mobomoviez.fun/images/genres/war.jpg" },
47 | { name: "Drama", imgUrl: "https://mobomoviez.fun/images/genres/drama.jpg" },
48 | { name: "Family", imgUrl: "https://mobomoviez.fun/images/genres/family.jpg" },
49 | {
50 | name: "Fantasy",
51 | imgUrl: "https://mobomoviez.fun/images/genres/fantasy.jpg",
52 | },
53 | {
54 | name: "History",
55 | imgUrl: "https://mobomoviez.fun/images/genres/history.jpg",
56 | },
57 | { name: "Crime", imgUrl: "https://mobomoviez.fun/images/genres/crime.jpg" },
58 | { name: "Music", imgUrl: "https://mobomoviez.fun/images/genres/music.jpg" },
59 | {
60 | name: "Musical",
61 | imgUrl: "https://mobomoviez.fun/images/genres/musical.jpg",
62 | },
63 | {
64 | name: "Biography",
65 | imgUrl: "https://mobomoviez.fun/images/genres/biography.jpg",
66 | },
67 | {
68 | name: "Western",
69 | imgUrl: "https://mobomoviez.fun/images/genres/western.jpg",
70 | },
71 | { name: "Sci-fi", imgUrl: "https://mobomoviez.fun/images/genres/sci-fi.jpg" },
72 | ];
73 | export const trendingItem = [
74 | {id:1630029,
75 | title: "Avatar: The Way of Water",
76 | titleType: "movie",
77 | year: 2022,
78 | genres: ["Action","Adventure", "Fantasy", "Sci-Fi"],
79 | rating:7.8,
80 | time:'3h 12m',
81 | imgUrl:"https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSmGggtpJ4TX3aN3PUaVWUgNODHespRPvKYAyhGUAZSqSOmPiEm",
82 | imgBachGrand:avatar
83 | }, {
84 | id:13833688,
85 | title: "The Whale ",
86 | titleType: "movie",
87 | year: 2022,
88 | genres: ["Drama"],
89 | rating:8.0,
90 | time:'1h 57m',
91 | imgUrl:"https://filmkio.run/wp-content/uploads/2023/01/MV5BZDQ4Njg4YTctNGZkYi00NWU1LWI4OTYtNmNjOWMyMjI1NWYzXkEyXkFqcGdeQXVyMTA3MDk2NDg2._V1_SX500.jpg",
92 | imgBachGrand:'https://filmkio.run/wp-content/uploads/2023/02/the-whale-wallpaper.jpg'
93 | },
94 |
95 | {id:9764362,
96 | title: "The Menu",
97 | titleType: "movie",
98 | year: 2022,
99 | genres: ["Comedy","Horror"],
100 | rating:7.2,
101 | time:'1h 47m',
102 | imgUrl:"https://filmkio.run/wp-content/uploads/2022/10/MV5BMzdjNjI5MmYtODhiNS00NTcyLWEzZmUtYzVmODM5YzExNDE3XkEyXkFqcGdeQXVyMTAyMjQ3NzQ1._V1_SX500.jpg",
103 | imgBachGrand:'https://filmkio.run/wp-content/uploads/2022/10/the-menu-poster.jpg'
104 | }, {
105 | id:10954600,
106 | title: "Ant-Man and the Wasp",
107 | titleType: "movie",
108 | year: 2023,
109 | genres: ["Action","Adventure", "Fantasy", "Sci-Fi"],
110 | rating:7.8,
111 | time:'2h 4m',
112 | imgUrl:"https://mobomoviez.fun/images/movie/2023/tt10954600/thumbnail/ant-man-and-the-wasp-quantumania-2023.jpg",
113 | imgBachGrand:'https://mobomoviez.fun/images/movie/2023/tt10954600/cover/ant-man-and-the-wasp-quantumania-2023-cover.jpg'
114 | }, {
115 | id:8111088,
116 | title: "The Mandalorian",
117 | titleType: "movie",
118 | year: 2019,
119 | genres: ["Action","Adventure", "Fantasy", "Sci-Fi"],
120 | rating:8.7,
121 | time:'2h 36m',
122 | imgUrl:"https://filmkio.run/wp-content/uploads/2022/01/the-mandalorian-poster-210x310.jpg",
123 | imgBachGrand:'https://filmkio.run/wp-content/uploads/2022/01/the-mandalorian-wallpaper.jpg'
124 | },
125 |
126 | ];
127 |
--------------------------------------------------------------------------------
/src/styles/globalStyles.css:
--------------------------------------------------------------------------------
1 |
2 | @font-face{
3 | font-family:"helvetica";
4 | src:url("https://candyfonts.com/wp-data/2018/10/26/11538/HELR45W.ttf") format("woff"),
5 | url("https://candyfonts.com/wp-data/2018/10/26/11538/HELR45W.ttf") format("opentype"),
6 | url("https://candyfonts.com/wp-data/2018/10/26/11538/HELR45W.ttf") format("truetype");
7 | }
8 |
9 | * {
10 | margin: 0;
11 | padding: 0;
12 | box-sizing: border-box;
13 | scroll-behavior: smooth;
14 | font-family: "Eudoxus Sans";
15 | }
16 |
17 |
18 | .IranNastaliq {
19 | font-family: 'IranNastaliq';
20 | }
21 |
22 | .fa {
23 | font-family: 'Vazirmatn';
24 | }
25 |
26 | .en {
27 | font-family: "Eudoxus Sans", sans-serif;
28 |
29 | }
30 |
31 | .gradient-02 {
32 | position: absolute;
33 | width: 200px;
34 | height: 438px;
35 | top: 0px;
36 | right: 0px;
37 |
38 | background: #7aebfb;
39 | filter: blur(190px);
40 | }
41 |
42 | .glassmorphism {
43 | background: rgba(255, 255, 255, 0.25);
44 | box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
45 | backdrop-filter: blur(4px);
46 | -webkit-backdrop-filter: blur(4px);
47 | border: 1px solid rgba(255, 255, 255, 0.18);
48 | }
49 |
50 | .gradient-03 {
51 | /* position: absolute; */
52 | width: 404px;
53 | height: 800px;
54 | left: 20%;
55 | top: 5%;
56 |
57 | background: rgba(149, 66, 232, 0.35);
58 | filter: blur(175px);
59 | transform: rotate(-114.2deg);
60 | }
61 |
62 | .gradient-04 {
63 | position: absolute;
64 | width: 304px;
65 | height: 100vh;
66 | left: 30%;
67 | top: 10%;
68 |
69 | background: rgba(45, 72, 152, 0.75);
70 | filter: blur(200px);
71 | transform: rotate(-53.13deg);
72 | }
73 |
74 | .gradient-05 {
75 | background: linear-gradient(180deg,
76 | rgba(255, 255, 255, 0.04) 0%,
77 | rgba(255, 255, 255, 0) 100%);
78 | }
79 | .lightTheme{
80 | background-color: #f9f9f9;
81 | }
82 |
83 | .gradient-06
84 |
85 | {
86 |
87 | /* ff 3.6+ */
88 | background:-moz-linear-gradient(90deg, rgba(6, 6, 9, 1) 0%, rgba(30, 31, 45, 1) 71%, rgba(35, 28, 44, 1) 100%);
89 |
90 | /* safari 5.1+,chrome 10+ */
91 | background:-webkit-linear-gradient(90deg, rgba(6, 6, 9, 1) 0%, rgba(30, 31, 45, 1) 71%, rgba(35, 28, 44, 1) 100%);
92 |
93 | /* opera 11.10+ */
94 | background:-o-linear-gradient(90deg, rgba(6, 6, 9, 1) 0%, rgba(30, 31, 45, 1) 71%, rgba(35, 28, 44, 1) 100%);
95 |
96 | /* ie 6-9 */
97 | filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#231C2C', endColorstr='#060609', GradientType=0 );
98 |
99 | /* ie 10+ */
100 | background:-ms-linear-gradient(90deg, rgba(6, 6, 9, 1) 0%, rgba(30, 31, 45, 1) 71%, rgba(35, 28, 44, 1) 100%);
101 |
102 | /* global 94%+ browsers support */
103 | background:linear-gradient(90deg, rgba(6, 6, 9, 1) 0%, rgba(30, 31, 45, 1) 71%, rgba(35, 28, 44, 1) 100%);
104 |
105 | }
106 |
107 | .btn {
108 |
109 | /* ff 3.6+ */
110 | background: -moz-linear-gradient(161deg, rgba(38, 147, 250, 1) 0%, rgba(24, 94, 235, 1) 100%);
111 |
112 | /* safari 5.1+,chrome 10+ */
113 | background: -webkit-linear-gradient(161deg, rgba(38, 147, 250, 1) 0%, rgba(24, 94, 235, 1) 100%);
114 |
115 | /* opera 11.10+ */
116 | background: -o-linear-gradient(161deg, rgba(38, 147, 250, 1) 0%, rgba(24, 94, 235, 1) 100%);
117 |
118 | /* ie 6-9 */
119 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#185EEB', endColorstr='#2693FA', GradientType=1);
120 |
121 | /* ie 10+ */
122 | background: -ms-linear-gradient(161deg, rgba(38, 147, 250, 1) 0%, rgba(24, 94, 235, 1) 100%);
123 |
124 | /* global 94%+ browsers support */
125 | background: linear-gradient(161deg, rgba(38, 147, 250, 1) 0%, rgba(24, 94, 235, 1) 100%);
126 |
127 | }
128 |
129 | .gradient-07 {
130 |
131 | /* ff 3.6+ */
132 | background: -moz-linear-gradient(90deg, rgba(43, 42, 62, 1) 0%, rgba(38, 36, 58, 1) 100%);
133 |
134 | /* safari 5.1+,chrome 10+ */
135 | background: -webkit-linear-gradient(90deg, rgba(43, 42, 62, 1) 0%, rgba(38, 36, 58, 1) 100%);
136 |
137 | /* opera 11.10+ */
138 | background: -o-linear-gradient(90deg, rgba(43, 42, 62, 1) 0%, rgba(38, 36, 58, 1) 100%);
139 |
140 | /* ie 6-9 */
141 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#26243A', endColorstr='#2B2A3E', GradientType=0);
142 |
143 | /* ie 10+ */
144 | background: -ms-linear-gradient(90deg, rgba(43, 42, 62, 1) 0%, rgba(38, 36, 58, 1) 100%);
145 |
146 | /* global 94%+ browsers support */
147 | background: linear-gradient(90deg, rgba(43, 42, 62, 1) 0%, rgba(38, 36, 58, 1) 100%);
148 |
149 | }
150 |
151 | .gradient-08 {
152 |
153 | /* ff 3.6+ */
154 | background: -moz-linear-gradient(0deg, rgba(32, 29, 43, 1) 5%, rgba(238, 130, 130, 0.01) 100%);
155 |
156 | /* safari 5.1+,chrome 10+ */
157 | background: -webkit-linear-gradient(0deg, rgba(32, 29, 43, 1) 5%, rgba(238, 130, 130, 0.01) 100%);
158 |
159 | /* opera 11.10+ */
160 | background: -o-linear-gradient(0deg, rgba(32, 29, 43, 1) 5%, rgba(238, 130, 130, 0.01) 100%);
161 |
162 | /* ie 6-9 */
163 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#201D2B', endColorstr='#EE8282', GradientType=1);
164 |
165 | /* ie 10+ */
166 | background: -ms-linear-gradient(0deg, rgba(32, 29, 43, 1) 5%, rgba(238, 130, 130, 0.01) 100%);
167 |
168 | /* global 94%+ browsers support */
169 | background: linear-gradient(0deg, rgba(32, 29, 43, 1) 5%, rgba(238, 130, 130, 0.01) 100%);
170 |
171 | }
--------------------------------------------------------------------------------
/src/pages/moviePage/MoviePage.jsx:
--------------------------------------------------------------------------------
1 | import { Link, withRouter } from "react-router-dom";
2 | import { BsPlay } from "react-icons/bs";
3 | import { useGetMovieImgQuery } from "../../redux/services/movieDatabase";
4 | import { Spin } from "antd";
5 | import { useState } from "react";
6 | import { useEffect } from "react";
7 | import { RxDotFilled } from "react-icons/rx";
8 | import { BiLike, BiDislike } from "react-icons/bi";
9 | import {
10 | AiFillHeart,
11 | AiOutlineHeart,
12 | AiFillLike,
13 | AiFillDislike,
14 | } from "react-icons/ai";
15 | import MoviePageDtailes from "./MoviePageDtailes";
16 | import Trailer from "./Trailer";
17 | import Comments from "./Comments";
18 | import Download from "./Download";
19 | import Details from "./Details";
20 |
21 | const poi = ['Details' , 'Downlaod' ,'Trailer', 'Comments' ]
22 | const MoviePage = ({ history }) => {
23 | const [query, setQuery] = useState('Details')
24 | const movieData = history.location.state?.data;
25 | const { data, fetching, error } = useGetMovieImgQuery({
26 | movieId: movieData?.id.match(/\d+/g)[0],
27 | });
28 | const [windowSize, setWindowSize] = useState(window.innerWidth - 290 + "px");
29 | const [likedd, setlikedd] = useState(false);
30 | useEffect(() => {
31 | const handleWindowResize = () => {
32 | setWindowSize(window.innerWidth - 290 + "px");
33 | console.log(windowSize);
34 | };
35 |
36 | window.addEventListener("resize", handleWindowResize);
37 |
38 | return () => {
39 | window.removeEventListener("resize", handleWindowResize);
40 | };
41 | });
42 | useEffect(() => {
43 | const handleWindowResize = () => {
44 | setWindowSize(window.innerWidth - 290 + "px");
45 | console.log(windowSize);
46 | };
47 |
48 | window.addEventListener("resize", handleWindowResize);
49 |
50 | return () => {
51 | window.removeEventListener("resize", handleWindowResize);
52 | };
53 | }, []);
54 | const genres = ["sfsfgg", "srs", "oduw", "wjnkkkkd"];
55 | return (
56 |
57 | {/*
*/}
58 |
59 |
60 |
61 |
62 |
63 |
64 |
71 |
72 |
73 |
74 |
75 |
View Trailar
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 | Last Of Us SRBtr
85 |
86 |
87 |
2023
88 |
89 |
movie
90 |
91 |
60 min
92 |
93 |
94 |
95 |
96 |
97 | 8.9
98 |
99 | /10
100 |
101 |
338k votes
102 |
103 |
104 | {likedd ? (
105 |
106 | ) : (
107 |
108 | )}
109 |
110 |
111 | {likedd ? (
112 |
113 | ) : (
114 |
115 | )}
116 |
117 |
setlikedd(!likedd)}
120 | >
121 | {likedd ? (
122 |
123 | ) : (
124 |
125 | )}
126 |
127 |
128 |
129 | {genres.slice(0, 5).map((genre, index) => (
130 |
137 |
138 | {genre}
139 |
140 |
141 | ))}
142 |
143 |
144 | Cast :
145 |
146 |
147 | Bryan Cranston , Aaron Paul , Anna Gunn
148 |
149 |
150 |
151 | Country :
152 |
153 |
154 | U.S.A , France
155 |
156 |
157 |
158 | Language :
159 |
160 | English
161 |
162 |
163 |
164 |
165 | Lorem ipsum dolor sit, amet consectetur adipisicing elit.
166 | Fuga, ab! A, ratione quia eaque blanditiis esse adipisci
167 | eveniet nisi ad facilis aut. Reprehenderit maiores
168 | dignissimos a nesciunt harum iste temporibus!
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 | {likedd ? (
178 |
179 | ) : (
180 |
181 | )}
182 |
183 |
184 | {likedd ? (
185 |
186 | ) : (
187 |
188 | )}
189 |
190 |
setlikedd(!likedd)}
194 | >
195 | {likedd ? (
196 |
197 | ) : (
198 |
199 | )}
200 |
201 |
202 |
203 |
204 |
205 |
206 | 8.9
207 |
208 | /10
209 |
210 |
211 |
212 | 338k votes
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 | DOWNLAOD
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 | {poi.map((item , index)=>(
233 |
234 | setQuery(item)}>{item}
237 |
238 |
239 | ))}
240 |
241 |
242 | {query==='Details' && }
243 | {query==='Download' && }
244 | {query==='Comments' && }
245 | {query==='Trailer' && }
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
264 |
265 |
266 |
267 |
268 | {/* */}
269 |
270 |
271 |
272 | );
273 | };
274 |
275 | export default withRouter(MoviePage);
276 |
--------------------------------------------------------------------------------