├── .gitignore ├── README.md ├── babel.config.js ├── db.json ├── netflixpage.png ├── package-lock.json ├── package.json ├── public ├── default.png ├── favicon.ico ├── index.html └── logo.png └── src ├── App.vue ├── assets ├── logo.png ├── narcosvideo.mp4 ├── outside.mp4 ├── style.css └── theplat.mp4 ├── components ├── Home │ ├── backgroundMovie.vue │ ├── movieList.vue │ ├── movieListItem.vue │ ├── navBar.vue │ ├── navBarItem.vue │ ├── netflixOriginalContent.vue │ ├── secondItem.vue │ ├── sliderHome.vue │ ├── sliderHomeFive.vue │ ├── sliderHomeFour.vue │ ├── sliderHomeThree.vue │ └── sliderHomeTwo.vue ├── NewPopular │ ├── dayPopularTv.vue │ ├── weekPopular.vue │ └── weekPopularTv.vue ├── filmler │ └── backgroundFilm.vue ├── footer │ └── footers.vue ├── modal │ └── modals.vue ├── register │ └── login.vue ├── series │ ├── backgroundSeries.vue │ ├── diziler.vue │ ├── myList.vue │ ├── netflix.vue │ ├── onerilenBreaking.vue │ └── onerilenDiziler.vue └── signUp │ └── signUp.vue ├── main.js ├── router └── index.js ├── store ├── index.js └── modules │ └── users │ └── index.js ├── utils └── securedAxios.js └── views ├── Home.vue ├── List.vue ├── Login.vue ├── Movies.vue ├── NewAndPopular.vue ├── Register.vue ├── Search.vue └── Series.vue /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

Vue Netflix Clone www.netflix.com

2 |

3 | 4 | Projeyi kendimi geliştirmek amacıyla yaptım gelişimimde yararlı oldu. Projemi geliştirmeye devam etmekteyim bu süreçte yardımcı olmaktan çekinmeyin aşağıdaki adreslerden bana ulaşabilirsiniz. 5 | 6 | It was useful in developing the project. I continue to develop my project from different addresses below to assist me in this process.www.linkedin.com/in/yusuftaskiran08 7 | 8 | 9 | ## TODO 10 | - Code structure should be arranged as clean code ✖️ 11 | - Login processes should use firabase instead of db.json ✖️ 12 | - Browser must be made compatible ✖️ 13 | ## The programs I use in my project 14 | - Vue.js 15 | - Vuex 16 | - Bootstrap 17 | - Axios 18 | - Swiper.Js 19 | - The movie db api 20 | - Youtube iframe api 21 | - Vue neat modal 22 | 23 | 24 | ## Project setup 25 | ``` 26 | npm install 27 | ``` 28 | ## Json-server setup 29 | 30 | json-server --watch db.json 31 | 32 | ### Compiles and hot-reloads for development 33 | ``` 34 | npm run serve 35 | ``` 36 | 37 | ### Compiles and minifies for production 38 | ``` 39 | npm run build 40 | ``` 41 | 42 | ### Customize configuration 43 | See [Configuration Reference](https://cli.vuejs.org/config/). 44 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "presets": [ 3 | "@vue/cli-plugin-babel/preset" 4 | ] 5 | } -------------------------------------------------------------------------------- /db.json: -------------------------------------------------------------------------------- 1 | { 2 | "users": [ 3 | { 4 | "full_name": "yusuftask", 5 | "email": "yusuftask@", 6 | "password": "12345", 7 | "id": 1 8 | } 9 | ], 10 | "favorites": [ 11 | { 12 | "adult": false, 13 | "backdrop_path": "/vQJ3yBdF91tzd73G8seL5bOxfvG.jpg", 14 | "genre_ids": [ 15 | 53, 16 | 27, 17 | 18 18 | ], 19 | "id": 599281, 20 | "original_language": "en", 21 | "original_title": "Fear of Rain", 22 | "overview": "A teenage girl living with schizophrenia begins to suspect her neighbor has kidnapped a child. Her parents try desperately to help her live a normal life, without exposing their own tragic secrets, and the only person who believes her is Caleb – a boy she isn’t even sure exists.", 23 | "popularity": 1181.031, 24 | "poster_path": "/b2shaNA4F8zNIwoRYr33lPTiFfl.jpg", 25 | "release_date": "2021-02-12", 26 | "title": "Fear of Rain", 27 | "video": false, 28 | "vote_average": 7.3, 29 | "vote_count": 83, 30 | "isFavorite": true 31 | }, 32 | { 33 | "adult": false, 34 | "backdrop_path": "/srYya1ZlI97Au4jUYAktDe3avyA.jpg", 35 | "genre_ids": [ 36 | 14, 37 | 28, 38 | 12 39 | ], 40 | "id": 464052, 41 | "original_language": "en", 42 | "original_title": "Wonder Woman 1984", 43 | "overview": "Wonder Woman comes into conflict with the Soviet Union during the Cold War in the 1980s and finds a formidable foe by the name of the Cheetah.", 44 | "popularity": 1657.673, 45 | "poster_path": "/8UlWHLMpgZm9bx6QYh0NFoq67TZ.jpg", 46 | "release_date": "2020-12-16", 47 | "title": "Wonder Woman 1984", 48 | "video": false, 49 | "vote_average": 6.9, 50 | "vote_count": 3895, 51 | "isFavorite": true 52 | } 53 | ] 54 | } -------------------------------------------------------------------------------- /netflixpage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yusuftask08/Netflix/d7a3cd551b67975b2cb06a9096286f39dd9bbf47/netflixpage.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-netflix-clone", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build" 8 | }, 9 | "dependencies": { 10 | "@vue/compiler-sfc": "^3.0.5", 11 | "axios": "^0.21.1", 12 | "swiper": "^6.4.11", 13 | "vue": "^3.0.0", 14 | "vue-neat-modal": "^1.3.2", 15 | "vue-router": "^4.0.0-0", 16 | "vuex": "^4.0.0", 17 | "youtube-vue3": "^0.1.10" 18 | }, 19 | "devDependencies": { 20 | "@vue/cli-plugin-babel": "~4.5.0", 21 | "@vue/cli-plugin-router": "~4.5.0", 22 | "@vue/cli-plugin-vuex": "~4.5.0", 23 | "@vue/cli-service": "~4.5.0", 24 | "sass": "^1.32.6", 25 | "sass-loader": "^10.1.1" 26 | }, 27 | "browserslist": [ 28 | "> 1%", 29 | "last 2 versions", 30 | "not dead" 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /public/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yusuftask08/Netflix/d7a3cd551b67975b2cb06a9096286f39dd9bbf47/public/default.png -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yusuftask08/Netflix/d7a3cd551b67975b2cb06a9096286f39dd9bbf47/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Vue Netflix - Clone 11 | 12 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 23 |
24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /public/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yusuftask08/Netflix/d7a3cd551b67975b2cb06a9096286f39dd9bbf47/public/logo.png -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 16 | -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yusuftask08/Netflix/d7a3cd551b67975b2cb06a9096286f39dd9bbf47/src/assets/logo.png -------------------------------------------------------------------------------- /src/assets/narcosvideo.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yusuftask08/Netflix/d7a3cd551b67975b2cb06a9096286f39dd9bbf47/src/assets/narcosvideo.mp4 -------------------------------------------------------------------------------- /src/assets/outside.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yusuftask08/Netflix/d7a3cd551b67975b2cb06a9096286f39dd9bbf47/src/assets/outside.mp4 -------------------------------------------------------------------------------- /src/assets/style.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap'); 2 | @import url('https://fonts.googleapis.com/css2?family=Open+Sans&family=Roboto&display=swap'); 3 | 4 | * { 5 | font-family: 'Roboto', sans-serif; 6 | -webkit-user-select: none; 7 | -moz-user-select: -moz-none; 8 | -o-user-select: none; 9 | user-select: none; 10 | } 11 | 12 | /* Movie Backgrounds */ 13 | .nextReleasesContainer { 14 | width: 100%; 15 | height: 700px; 16 | position: relative; 17 | background: #1414147e; 18 | display: flex; 19 | align-items: center; 20 | 21 | } 22 | 23 | .nextReleasesContainer>.videoContainer { 24 | position: absolute; 25 | top: 0; 26 | left: 0; 27 | z-index: -1; 28 | width: 100%; 29 | height: 100%; 30 | /* background-image: linear-gradient(to bottom, rgb(27, 27, 27), rgb(0, 0, 0)); */ 31 | overflow: hidden; 32 | } 33 | 34 | .nextReleasesContainer>.videoContainer>video { 35 | width: 100%; 36 | } 37 | 38 | .containerReleases { 39 | width: 500px; 40 | margin-left: 50px; 41 | } 42 | 43 | .containerReleases h1 { 44 | color: #ffffff; 45 | text-shadow: black 0.1em 0.1em 0.2em; 46 | font-size: 50px; 47 | font-family: Arial, Helvetica, sans-serif; 48 | margin-bottom: 30px; 49 | position: relative; 50 | margin-left: -3px; 51 | } 52 | 53 | .containerReleases p { 54 | color: #e9e9e9; 55 | font-family: 'Netflix Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; 56 | text-shadow: #e9e9e9 0em 0em 0em; 57 | font-size: 16px; 58 | margin-bottom: 30px; 59 | text-align: justify; 60 | } 61 | 62 | .containerReleases button { 63 | border: none; 64 | background: rgba(78, 78, 78, 0.562); 65 | color: #e9e9e9; 66 | font-size: 15px; 67 | font-weight: bold; 68 | text-align: center; 69 | transition: transform 0.5s; 70 | border-radius: 4px; 71 | } 72 | 73 | .containerReleases button:hover { 74 | border: none; 75 | cursor: pointer; 76 | background: rgba(78, 78, 78, 0.2); 77 | color: #fff; 78 | 79 | } 80 | 81 | .containerReleases button span { 82 | padding-left: 10px; 83 | } 84 | 85 | #buttonPlay { 86 | width: 130px; 87 | height: 44px; 88 | margin-right: 20px; 89 | background-color: #fff; 90 | color: black; 91 | 92 | } 93 | 94 | .izlemeyeDevam { 95 | position: absolute; 96 | top: 500px; 97 | left: 50; 98 | } 99 | 100 | #buttonInfo { 101 | width: 200px; 102 | height: 44px; 103 | font: bold; 104 | } 105 | 106 | @media only screen and (max-width: 900px) { 107 | .nextReleasesContainer { 108 | height: 50vh; 109 | } 110 | } 111 | 112 | 113 | /* Movie Backgrounds */ 114 | 115 | /* Navbar SecondItem */ 116 | .secondItem { 117 | display: flex; 118 | justify-content: flex-start; 119 | align-items: center; 120 | margin-left: auto; 121 | } 122 | 123 | .navbar-brand { 124 | font-size: 2rem; 125 | font-weight: bold; 126 | } 127 | 128 | .navbar-linear { 129 | /* background-color: linear-gradient(to bottom, rgba(167, 167, 167, 0.13), rgba(0, 0, 0, 0.486)); */ 130 | position: fixed; 131 | width: 100%; 132 | z-index: 4; 133 | margin-top: 0 !important; 134 | background: linear-gradient(to bottom, #000, #0003 70%, #0000); 135 | transition: background .5s; 136 | 137 | } 138 | 139 | .nav-item { 140 | font-size: 15px; 141 | color: #e5e5e5; 142 | } 143 | 144 | /* Navbar SecondItem */ 145 | 146 | 147 | /* Card css */ 148 | 149 | 150 | .container-card { 151 | background-color: #141414 !important; 152 | display: flex; 153 | /* width: 100%; */ 154 | margin-left: 50px; 155 | 156 | } 157 | 158 | .row { 159 | margin-left: -15px; 160 | } 161 | 162 | .text-span { 163 | color: #fff; 164 | margin-left: 55px; 165 | font-size: 25px; 166 | margin-top: 60px !important; 167 | } 168 | 169 | img { 170 | -webkit-user-drag: none; 171 | -moz-user-drag: none; 172 | -o-user-drag: none; 173 | } 174 | 175 | img { 176 | pointer-events: none; 177 | } 178 | 179 | 180 | .originalCard { 181 | padding: 0 !important; 182 | width: 21rem !important; 183 | height: 500px !important; 184 | top: 0px; 185 | border: none !important; 186 | overflow: hidden; 187 | 188 | } 189 | 190 | .originalCard img { 191 | object-fit: fill !important; 192 | align-items: center; 193 | 194 | } 195 | 196 | .originalCard:hover { 197 | transform: scale(1.2); 198 | cursor: pointer; 199 | border: none; 200 | transition: 0.7s ease-in-out; 201 | } 202 | 203 | .film_info_original_card { 204 | position: absolute; 205 | display: flex; 206 | justify-content: center; 207 | width: 370px; 208 | height: 50px; 209 | opacity: -1; 210 | } 211 | 212 | .title { 213 | margin-top: 15px; 214 | margin-left: -15px; 215 | } 216 | 217 | .originalCard:hover .film_info_original_card { 218 | bottom: 0%; 219 | width: 370px; 220 | height: 135px; 221 | transition: 700ms all; 222 | opacity: 1; 223 | background: linear-gradient(to top, #000, #0003 70%, #0000); 224 | } 225 | 226 | .swiper-container-pointer-events { 227 | touch-action: none !important; 228 | } 229 | 230 | .list-icon-left_original i { 231 | padding: 20px; 232 | border: 2px solid #fff !important; 233 | border-radius: 50%; 234 | color: #dbdbdb; 235 | cursor: pointer; 236 | transition: 300ms all; 237 | margin-right: 35px !important; 238 | margin-top: 15px; 239 | background: transparent; 240 | } 241 | 242 | .list-icon-left_original i:hover { 243 | background-color: #212529; 244 | } 245 | 246 | .movie_card { 247 | padding: 0 !important; 248 | width: 12rem; 249 | margin-top: 10px; 250 | top: 0px; 251 | border: none !important; 252 | overflow: hidden; 253 | position: relative; 254 | 255 | /* box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.2), 0 4px 15px 0 rgba(0, 0, 0, 0.19); */ 256 | } 257 | 258 | .search_movie_card { 259 | padding: 0 !important; 260 | width: 10rem; 261 | margin-top: 10px; 262 | top: 0px; 263 | border: none !important; 264 | overflow: hidden; 265 | position: relative; 266 | 267 | } 268 | 269 | 270 | 271 | .icerik { 272 | padding-top: 150px; 273 | } 274 | 275 | .icerik a { 276 | color: #fff; 277 | } 278 | 279 | .icerik a:hover { 280 | color: red; 281 | } 282 | 283 | .movie_card:hover { 284 | z-index: 3; 285 | cursor: pointer; 286 | border: none; 287 | transition: 0.7s ease-in-out; 288 | } 289 | 290 | .swiper-container { 291 | height: 400px !important; 292 | padding-top: 20px !important; 293 | } 294 | 295 | .movie_card img { 296 | height: 100%; 297 | width: 100%; 298 | object-fit: cover; 299 | } 300 | 301 | .list-icon-left i { 302 | margin-right: 0px !important; 303 | font-size: 12px !important; 304 | padding: 12px; 305 | border: 2px solid #fff !important; 306 | border-radius: 50%; 307 | color: #dbdbdb; 308 | cursor: pointer; 309 | transition: transform 300ms all; 310 | margin-right: 10px !important; 311 | margin-top: 5px; 312 | background-color: #212529; 313 | } 314 | 315 | .list-icon-left { 316 | justify-content: center; 317 | } 318 | 319 | .swiper-button-prev, 320 | .swiper-button-next { 321 | top: 45% !important; 322 | } 323 | 324 | .film_info { 325 | position: absolute; 326 | transition: 700ms all; 327 | bottom: -50%; 328 | display: flex; 329 | justify-content: center; 330 | width: 200px; 331 | height: 50px; 332 | 333 | 334 | } 335 | 336 | .movie_card:hover .film_info { 337 | bottom: 0%; 338 | transition: 700ms all; 339 | width: 200px; 340 | height: 50px; 341 | background: linear-gradient(to top, #000, #0003 70%, #0000); 342 | 343 | } 344 | 345 | .vue-neat-modal-wrapper { 346 | z-index: 999 !important; 347 | } 348 | 349 | /* ToolTip css */ 350 | .toolTip { 351 | position: relative; 352 | display: inline-block; 353 | border-bottom: 1px dotted black; 354 | } 355 | 356 | .toolTip .toolTiptext { 357 | visibility: hidden; 358 | width: 122px; 359 | background-color: #fff; 360 | color: black; 361 | text-align: center; 362 | border-radius: 6px; 363 | padding: 10px 0; 364 | position: absolute; 365 | bottom: 110%; 366 | margin-bottom: 5px; 367 | left: 50%; 368 | margin-left: -60px; 369 | white-space: nowrap; 370 | 371 | } 372 | 373 | .toolTip .toolTiptext-sm { 374 | visibility: hidden; 375 | width: 85px; 376 | background-color: #fff; 377 | color: black; 378 | text-align: center; 379 | border-radius: 6px; 380 | padding: 10px 0; 381 | position: absolute; 382 | bottom: 110%; 383 | margin-bottom: 5px; 384 | left: 40%; 385 | margin-left: -40px; 386 | white-space: nowrap; 387 | } 388 | 389 | .tool-span { 390 | font-size: 15px; 391 | } 392 | 393 | .toolTip .toolTiptext::after { 394 | content: ""; 395 | position: absolute; 396 | top: 100%; 397 | left: 50%; 398 | margin-left: -5px; 399 | border-width: 5px; 400 | border-style: solid; 401 | border-color: #fff transparent transparent transparent; 402 | } 403 | 404 | .toolTip .toolTiptext-sm::after { 405 | content: ""; 406 | position: absolute; 407 | top: 100%; 408 | left: 50%; 409 | margin-left: -5px; 410 | border-width: 5px; 411 | border-style: solid; 412 | border-color: #fff transparent transparent transparent; 413 | } 414 | 415 | 416 | .toolTip:hover .toolTiptext { 417 | visibility: visible; 418 | transition: 300ms all; 419 | 420 | } 421 | 422 | .toolTip:hover .toolTiptext-sm { 423 | visibility: visible; 424 | transition: 300ms all; 425 | 426 | } 427 | 428 | .tool-span-sm { 429 | font-size: 12px; 430 | z-index: 1; 431 | position: absolute; 432 | } 433 | 434 | /* ToolTip css */ 435 | 436 | .play_button { 437 | background-color: #E50914; 438 | position: absolute; 439 | width: 60px; 440 | height: 60px; 441 | border-radius: 50%; 442 | right: 0px; 443 | bottom: 0px; 444 | font-size: 27px; 445 | padding-left: 21px; 446 | padding-top: 16px; 447 | /* color: #FFFFFF; */ 448 | cursor: pointer; 449 | } 450 | 451 | 452 | /* Card sss */ 453 | 454 | .container-fluid { 455 | margin: 0px ! important; 456 | padding: 0px ! important; 457 | 458 | } 459 | 460 | .header { 461 | width: 100%; 462 | } 463 | 464 | /* top10css */ 465 | 466 | .scrollbar { 467 | height: 450px; 468 | overflow-x: scroll; 469 | overflow-y: hidden; 470 | scrollbar-color: red yellow; 471 | } 472 | 473 | /* Card hover */ 474 | .container-card { 475 | display: flex; 476 | margin-top: 50px; 477 | } 478 | 479 | .container-card-original { 480 | display: flex; 481 | margin-top: 50px; 482 | } 483 | 484 | .item { 485 | position: relative; 486 | display: block; 487 | transition: 500ms; 488 | } 489 | 490 | 491 | 492 | .item:hover~.item, 493 | .item:focus~.item { 494 | transform: translateX(25%); 495 | } 496 | 497 | 498 | 499 | /* yedek */ 500 | -------------------------------------------------------------------------------- /src/assets/theplat.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yusuftask08/Netflix/d7a3cd551b67975b2cb06a9096286f39dd9bbf47/src/assets/theplat.mp4 -------------------------------------------------------------------------------- /src/components/Home/backgroundMovie.vue: -------------------------------------------------------------------------------- 1 | 36 | 74 | 86 | -------------------------------------------------------------------------------- /src/components/Home/movieList.vue: -------------------------------------------------------------------------------- 1 | 41 | 101 | 117 | -------------------------------------------------------------------------------- /src/components/Home/movieListItem.vue: -------------------------------------------------------------------------------- 1 | 42 | -------------------------------------------------------------------------------- /src/components/Home/navBar.vue: -------------------------------------------------------------------------------- 1 | 27 | 28 | 29 | 56 | 62 | -------------------------------------------------------------------------------- /src/components/Home/navBarItem.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/components/Home/netflixOriginalContent.vue: -------------------------------------------------------------------------------- 1 | 64 | 65 | 156 | -------------------------------------------------------------------------------- /src/components/Home/secondItem.vue: -------------------------------------------------------------------------------- 1 | 86 | 123 | 156 | 157 | -------------------------------------------------------------------------------- /src/components/Home/sliderHome.vue: -------------------------------------------------------------------------------- 1 | 64 | 65 | 157 | 162 | 163 | -------------------------------------------------------------------------------- /src/components/Home/sliderHomeFive.vue: -------------------------------------------------------------------------------- 1 | 64 | 65 | 154 | 155 | -------------------------------------------------------------------------------- /src/components/Home/sliderHomeFour.vue: -------------------------------------------------------------------------------- 1 | 64 | 65 | 155 | 156 | 157 | -------------------------------------------------------------------------------- /src/components/Home/sliderHomeThree.vue: -------------------------------------------------------------------------------- 1 | 64 | 65 | 155 | 156 | 157 | -------------------------------------------------------------------------------- /src/components/Home/sliderHomeTwo.vue: -------------------------------------------------------------------------------- 1 | 69 | 70 | 160 | 161 | -------------------------------------------------------------------------------- /src/components/NewPopular/dayPopularTv.vue: -------------------------------------------------------------------------------- 1 | 63 | 64 | 153 | 154 | -------------------------------------------------------------------------------- /src/components/NewPopular/weekPopular.vue: -------------------------------------------------------------------------------- 1 | 64 | 65 | 154 | 155 | -------------------------------------------------------------------------------- /src/components/NewPopular/weekPopularTv.vue: -------------------------------------------------------------------------------- 1 | 67 | 68 | 157 | 158 | -------------------------------------------------------------------------------- /src/components/filmler/backgroundFilm.vue: -------------------------------------------------------------------------------- 1 | 35 | 79 | 91 | -------------------------------------------------------------------------------- /src/components/footer/footers.vue: -------------------------------------------------------------------------------- 1 | 42 | -------------------------------------------------------------------------------- /src/components/modal/modals.vue: -------------------------------------------------------------------------------- 1 | 289 | 290 | 345 | 346 | -------------------------------------------------------------------------------- /src/components/register/login.vue: -------------------------------------------------------------------------------- 1 | 99 | 119 | -------------------------------------------------------------------------------- /src/components/series/backgroundSeries.vue: -------------------------------------------------------------------------------- 1 | 28 | -------------------------------------------------------------------------------- /src/components/series/diziler.vue: -------------------------------------------------------------------------------- 1 | 59 | -------------------------------------------------------------------------------- /src/components/series/myList.vue: -------------------------------------------------------------------------------- 1 | 61 | 122 | 133 | -------------------------------------------------------------------------------- /src/components/series/netflix.vue: -------------------------------------------------------------------------------- 1 | 52 | -------------------------------------------------------------------------------- /src/components/series/onerilenBreaking.vue: -------------------------------------------------------------------------------- 1 | 52 | -------------------------------------------------------------------------------- /src/components/series/onerilenDiziler.vue: -------------------------------------------------------------------------------- 1 | 52 | -------------------------------------------------------------------------------- /src/components/signUp/signUp.vue: -------------------------------------------------------------------------------- 1 | 103 | 121 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import { 2 | createApp 3 | } from 'vue' 4 | import App from './App.vue' 5 | import router from './router' 6 | import store from './store' 7 | import "./assets/style.css" 8 | // GLOBAL Component Registration 9 | import modals from "@/components/modal/modals"; 10 | import navBar from "@/components/Home/navBar"; 11 | 12 | import 'vue-neat-modal/dist/vue-neat-modal.css' 13 | import { 14 | Modal 15 | } from 'vue-neat-modal' 16 | 17 | 18 | 19 | 20 | const app = createApp(App); 21 | app.use(store); 22 | app.use(router); 23 | app.use(VueYouTubeIframe); 24 | app.component("modals", modals); 25 | app.component('AppModal', Modal); 26 | app.component('navBar', navBar); 27 | 28 | app.mount("#app"); -------------------------------------------------------------------------------- /src/router/index.js: -------------------------------------------------------------------------------- 1 | import { 2 | createRouter, 3 | createWebHistory 4 | } from 'vue-router' 5 | import Home from '../views/Home.vue' 6 | import store from "../store" 7 | 8 | const util = require('util'); 9 | const routes = [{ 10 | path: '/', 11 | name: 'Home', 12 | component: Home 13 | }, 14 | { 15 | path: '/List', 16 | name: 'List', 17 | 18 | component: () => 19 | import( /* webpackChunkName: "about" */ '@/views/List.vue') 20 | }, 21 | { 22 | path: '/Movies', 23 | name: 'Movies', 24 | 25 | component: () => 26 | import( /* webpackChunkName: "about" */ '@/views/Movies.vue') 27 | }, 28 | { 29 | path: '/NewAndPopular', 30 | name: 'NewAndPopular', 31 | 32 | component: () => 33 | import( /* webpackChunkName: "about" */ '@/views/NewAndPopular.vue') 34 | }, 35 | { 36 | path: '/Series', 37 | name: 'Series', 38 | 39 | component: () => 40 | import( /* webpackChunkName: "about" */ '@/views/Series.vue') 41 | }, { 42 | path: '/Search', 43 | name: 'Search', 44 | 45 | component: () => 46 | import( /* webpackChunkName: "about" */ '@/views/Search.vue') 47 | }, 48 | { 49 | path: '/Login', 50 | name: 'Login', 51 | 52 | component: () => 53 | import( /* webpackChunkName: "about" */ '@/views/Login.vue') 54 | }, 55 | { 56 | path: '/Register', 57 | name: 'Register', 58 | 59 | component: () => 60 | import( /* webpackChunkName: "about" */ '@/views/Register.vue') 61 | }, 62 | ] 63 | 64 | const router = createRouter({ 65 | history: createWebHistory(), 66 | routes 67 | }) 68 | router.beforeEach((to, from, next) => { 69 | let user = null; 70 | const authenticatedPages = ["Home", "Movies", "List", "NewAndPopular", "Series", "Search"]; 71 | // local storage üzerinde user varmı? 72 | if (localStorage?.user) user = JSON.parse(localStorage?.user) 73 | // localstorage üzerinde user varsa store u güncelle 74 | if (user !== null && typeof user === 'object') { 75 | store.commit("users/setUser", user) 76 | }; 77 | // is isAuthenticated bilgisini store üzerinden almak 78 | const isAuthenticated = store.getters["users/isAuthenticated"] 79 | if (isAuthenticated) store.dispatch("users/setFavorites"); 80 | 81 | 82 | // rules... 83 | //eğer giriş yapmamışsa ve user ile ilgili bölümlere sokma login sayfasına yönlendir 84 | if (!isAuthenticated && authenticatedPages.indexOf(to.name) > -1) next({ 85 | name: "Login" 86 | }); 87 | if (isAuthenticated && (to.name === "Login" || to.name === "Register")) 88 | next({ 89 | name: "Home" 90 | }); 91 | 92 | next(); 93 | 94 | 95 | 96 | }) 97 | export default router -------------------------------------------------------------------------------- /src/store/index.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | import { 3 | createStore 4 | } from 'vuex' 5 | import users from "./modules/users" 6 | export default createStore({ 7 | state: { 8 | movies: [], 9 | baseURL: "https://api.themoviedb.org/3/search/movie", 10 | apiKey: "", 11 | property: "language=en-US&query=", 12 | propert: "page=1", 13 | 14 | }, 15 | mutations: { 16 | setMovies(state, pMovies) { 17 | state.movies = pMovies; 18 | }, 19 | 20 | }, 21 | getters: { 22 | movieItemList: state => state.movies, 23 | }, 24 | actions: { 25 | searchMovie({ 26 | commit, 27 | state 28 | }, searchKey) { 29 | axios 30 | .get(`${state.baseURL}?api_key=${state.apiKey}&${state.property}${searchKey}&${state.propert}&append_to_response=credits,detail 31 | `) 32 | .then((movie_list_response) => { 33 | console.log("SearchList", movie_list_response); 34 | commit("setMovies", movie_list_response.data.results || []) 35 | 36 | 37 | 38 | }); 39 | } 40 | }, 41 | modules: { 42 | users, 43 | } 44 | }) -------------------------------------------------------------------------------- /src/store/modules/users/index.js: -------------------------------------------------------------------------------- 1 | import { 2 | appAxios 3 | } from "@/utils/securedAxios" 4 | import router from "@/router" 5 | export default { 6 | namespaced: true, 7 | state: { 8 | user: null, 9 | }, 10 | mutations: { 11 | setUser(state, pUser) { 12 | state.user = pUser 13 | }, 14 | logout(state) { 15 | state.user = null; 16 | localStorage.clear(); 17 | router.push({ 18 | name: "Home " 19 | }); 20 | }, 21 | 22 | }, 23 | actions: { 24 | register({ 25 | commit 26 | }, pUser) { 27 | appAxios.post("/users", pUser).then(register_response => { 28 | console.log('register :>> ', register_response); 29 | commit("setUser", register_response); 30 | }); 31 | }, 32 | Loggin({ 33 | commit 34 | }, pUser) { 35 | appAxios.get(`/users?email=${pUser.email}&password=${pUser.password}`).then(login_response => { 36 | console.log('login_response :>> ', login_response); 37 | if (login_response?.status === 200 && 38 | login_response?.data?.length > 0) { 39 | 40 | } 41 | commit("setUser", login_response?.data[0]); 42 | localStorage.user = JSON.stringify(login_response?.data[0]); 43 | router.push("/") 44 | }); 45 | }, 46 | 47 | }, 48 | getters: { 49 | currentUser: state => state.user, 50 | isAuthenticated: state => state.user !== null, 51 | }, 52 | } -------------------------------------------------------------------------------- /src/utils/securedAxios.js: -------------------------------------------------------------------------------- 1 | import axios from "axios"; 2 | 3 | export const appAxios = axios.create({ 4 | baseURL: "http://localhost:3000", 5 | withCredentials: false, 6 | headers: { 7 | "Content-Type": "application/json" 8 | } 9 | }) -------------------------------------------------------------------------------- /src/views/Home.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 20 | 51 | 52 | -------------------------------------------------------------------------------- /src/views/List.vue: -------------------------------------------------------------------------------- 1 | 7 | 16 | -------------------------------------------------------------------------------- /src/views/Login.vue: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /src/views/Movies.vue: -------------------------------------------------------------------------------- 1 | 12 | -------------------------------------------------------------------------------- /src/views/NewAndPopular.vue: -------------------------------------------------------------------------------- 1 | 11 | 28 | -------------------------------------------------------------------------------- /src/views/Register.vue: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /src/views/Search.vue: -------------------------------------------------------------------------------- 1 | 6 | 16 | 18 | 19 | -------------------------------------------------------------------------------- /src/views/Series.vue: -------------------------------------------------------------------------------- 1 | 13 | 34 | --------------------------------------------------------------------------------