-
Notifications
You must be signed in to change notification settings - Fork 442
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2357 from Niraj1608/movie
Movie Recommending App #249
- Loading branch information
Showing
27 changed files
with
613 additions
and
0 deletions.
There are no files selected for viewing
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 @@ | ||
const arrows = document.querySelectorAll(".arrow"); | ||
const movieLists = document.querySelectorAll(".movie-list"); | ||
|
||
arrows.forEach((arrow, i) => { | ||
const itemNumber = movieLists[i].querySelectorAll("img").length; | ||
let clickCounter = 0; | ||
arrow.addEventListener("click", () => { | ||
const ratio = Math.floor(window.innerWidth / 270); | ||
clickCounter++; | ||
if (itemNumber - (4 + clickCounter) + (4 - ratio) >= 0) { | ||
movieLists[i].style.transform = `translateX(${ | ||
movieLists[i].computedStyleMap().get("transform")[0].x.value - 300 | ||
}px)`; | ||
} else { | ||
movieLists[i].style.transform = "translateX(0)"; | ||
clickCounter = 0; | ||
} | ||
}); | ||
|
||
console.log(Math.floor(window.innerWidth / 270)); | ||
}); | ||
|
||
//TOGGLE | ||
|
||
const ball = document.querySelector(".toggle-ball"); | ||
const items = document.querySelectorAll( | ||
".container,.movie-list-title,.navbar-container,.sidebar,.left-menu-icon,.toggle" | ||
); | ||
|
||
ball.addEventListener("click", () => { | ||
items.forEach((item) => { | ||
item.classList.toggle("active"); | ||
}); | ||
ball.classList.toggle("active"); | ||
}); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,274 @@ | ||
* { | ||
margin: 0; | ||
} | ||
|
||
body { | ||
font-family: "Roboto", sans-serif; | ||
} | ||
|
||
.navbar { | ||
width: 100%; | ||
height: 50px; | ||
background-color: black; | ||
position: sticky; | ||
top: 0; | ||
} | ||
|
||
.navbar-container { | ||
display: flex; | ||
align-items: center; | ||
padding: 0 50px; | ||
height: 100%; | ||
color: white; | ||
font-family: "Sen", sans-serif; | ||
} | ||
|
||
.logo-container { | ||
flex: 1; | ||
} | ||
|
||
.logo { | ||
font-size: 30px; | ||
color: #4dbf00; | ||
} | ||
|
||
.menu-container { | ||
flex: 6; | ||
} | ||
|
||
.menu-list { | ||
display: flex; | ||
list-style: none; | ||
} | ||
|
||
.menu-list-item { | ||
margin-right: 30px; | ||
} | ||
|
||
.menu-list-item.active { | ||
font-weight: bold; | ||
} | ||
.profile-container { | ||
flex: 2; | ||
display: flex; | ||
align-items: center; | ||
justify-content: flex-end; | ||
} | ||
|
||
.profile-text-container { | ||
margin: 0 20px; | ||
} | ||
|
||
.profile-picture { | ||
width: 32px; | ||
height: 32px; | ||
border-radius: 50%; | ||
object-fit: cover; | ||
} | ||
|
||
.toggle { | ||
width: 40px; | ||
height: 20px; | ||
background-color: white; | ||
border-radius: 30px; | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-around; | ||
position: relative; | ||
} | ||
|
||
.toggle-icon { | ||
color: goldenrod; | ||
} | ||
|
||
.toggle-ball { | ||
width: 18px; | ||
height: 18px; | ||
background-color: black; | ||
position: absolute; | ||
right: 1px; | ||
border-radius: 50%; | ||
cursor: pointer; | ||
transition: 1s ease all; | ||
} | ||
|
||
.sidebar { | ||
width: 50px; | ||
height: 100%; | ||
background-color: black; | ||
position: fixed; | ||
top: 0; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
padding-top: 60px; | ||
} | ||
|
||
.left-menu-icon { | ||
color: white; | ||
font-size: 20px; | ||
margin-bottom: 40px; | ||
} | ||
|
||
.container { | ||
background-color: #151515; | ||
min-height: calc(100vh - 50px); | ||
color: white; | ||
} | ||
|
||
.content-container { | ||
margin-left: 50px; | ||
} | ||
|
||
.featured-content { | ||
height: 50vh; | ||
padding: 50px; | ||
} | ||
|
||
.featured-title { | ||
width: 200px; | ||
} | ||
|
||
.featured-desc { | ||
width: 500px; | ||
color: lightgray; | ||
margin: 30px 0; | ||
} | ||
|
||
.featured-button { | ||
background-color: #4dbf00; | ||
color: white; | ||
padding: 10px 20px; | ||
border-radius: 10px; | ||
border: none; | ||
outline: none; | ||
font-weight: bold; | ||
} | ||
|
||
.movie-list-container { | ||
padding: 0 20px; | ||
} | ||
|
||
.movie-list-wrapper { | ||
position: relative; | ||
overflow: hidden; | ||
} | ||
|
||
.movie-list { | ||
display: flex; | ||
align-items: center; | ||
height: 300px; | ||
transform: translateX(0); | ||
transition: all 1s ease-in-out; | ||
} | ||
|
||
.movie-list-item { | ||
margin-right: 30px; | ||
position: relative; | ||
} | ||
|
||
.movie-list-item:hover .movie-list-item-img { | ||
transform: scale(1.2); | ||
margin: 0 30px; | ||
opacity: 0.5; | ||
} | ||
|
||
.movie-list-item:hover .movie-list-item-title, | ||
.movie-list-item:hover .movie-list-item-desc, | ||
.movie-list-item:hover .movie-list-item-button { | ||
opacity: 1; | ||
} | ||
|
||
.movie-list-item-img { | ||
transition: all 1s ease-in-out; | ||
width: 270px; | ||
height: 200px; | ||
object-fit: cover; | ||
border-radius: 20px; | ||
} | ||
|
||
.movie-list-item-title { | ||
background-color: #333; | ||
padding: 0 10px; | ||
font-size: 32px; | ||
font-weight: bold; | ||
position: absolute; | ||
top: 10%; | ||
left: 50px; | ||
opacity: 0; | ||
transition: 1s all ease-in-out; | ||
} | ||
|
||
.movie-list-item-desc { | ||
background-color: #333; | ||
padding: 10px; | ||
font-size: 14px; | ||
position: absolute; | ||
top: 30%; | ||
left: 50px; | ||
width: 230px; | ||
opacity: 0; | ||
transition: 1s all ease-in-out; | ||
} | ||
|
||
.movie-list-item-button { | ||
padding: 10px; | ||
background-color: #4dbf00; | ||
color: white; | ||
border-radius: 10px; | ||
outline: none; | ||
border: none; | ||
cursor: pointer; | ||
position: absolute; | ||
bottom: 20px; | ||
left: 50px; | ||
opacity: 0; | ||
transition: 1s all ease-in-out; | ||
} | ||
|
||
.arrow { | ||
font-size: 120px; | ||
position: absolute; | ||
top: 90px; | ||
right: 0; | ||
color: lightgray; | ||
opacity: 0.5; | ||
cursor: pointer; | ||
} | ||
|
||
.container.active { | ||
background-color: white; | ||
} | ||
|
||
.movie-list-title.active { | ||
color: black; | ||
} | ||
|
||
.navbar-container.active { | ||
background-color: white; | ||
|
||
color: black; | ||
} | ||
|
||
.sidebar.active{ | ||
background-color: white; | ||
} | ||
|
||
.left-menu-icon.active{ | ||
color: black; | ||
} | ||
|
||
.toggle.active{ | ||
background-color: black; | ||
} | ||
|
||
.toggle-ball.active{ | ||
background-color: white; | ||
transform: translateX(-20px); | ||
} | ||
|
||
@media only screen and (max-width: 940px){ | ||
.menu-container{ | ||
display: none; | ||
} | ||
} |