Skip to content

Commit

Permalink
Merge pull request #2357 from Niraj1608/movie
Browse files Browse the repository at this point in the history
 Movie Recommending App #249
  • Loading branch information
iamrahulmahato authored Nov 9, 2024
2 parents ddc46f3 + d102b8b commit 98917e7
Show file tree
Hide file tree
Showing 27 changed files with 613 additions and 0 deletions.
35 changes: 35 additions & 0 deletions movie recommendation app/app.js
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");
});
Binary file added movie recommendation app/img/1.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added movie recommendation app/img/10.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added movie recommendation app/img/11.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added movie recommendation app/img/12.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added movie recommendation app/img/13.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added movie recommendation app/img/14.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added movie recommendation app/img/15.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added movie recommendation app/img/16.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added movie recommendation app/img/17.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added movie recommendation app/img/18.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added movie recommendation app/img/19.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added movie recommendation app/img/2.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added movie recommendation app/img/3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added movie recommendation app/img/4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added movie recommendation app/img/5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added movie recommendation app/img/6.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added movie recommendation app/img/7.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added movie recommendation app/img/8.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added movie recommendation app/img/9.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added movie recommendation app/img/f-1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added movie recommendation app/img/f-2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added movie recommendation app/img/f-t-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added movie recommendation app/img/f-t-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added movie recommendation app/img/profile.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
304 changes: 304 additions & 0 deletions movie recommendation app/index.html

Large diffs are not rendered by default.

274 changes: 274 additions & 0 deletions movie recommendation app/style.css
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;
}
}

0 comments on commit 98917e7

Please sign in to comment.