Repository navigation
Expand file tree
/
Copy pathmovies.js
More file actions
97 lines (90 loc) · 1.75 KB
/
Copy pathmovies.js
File metadata and controls
97 lines (90 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
// movies.js
const movies = [
{
title: "Bhola",
image: "assets/Bholaa.png"
},
{
title: "RRR",
image: "assets/RRR.png"
},
{
title: "Pathaan",
image: "assets/Pathaan.png"
},
{
title: "Chaava",
image: "assets/Chaava.png"
},
{
title: "Baaghi 3",
image: "assets/Baaghi 3.png"
},
{
title: "Baazigar",
image: "assets/Baazigar.png"
},
{
title: "DevDas",
image: "assets/Devdas.png"
},
{
title: "Ek Tha Tiger",
image: "assets/EkThaTiger.png"
},
{
title: "Half Girlfriend",
image: "assets/half.png"
},
{
title: "Tu Jhooti Mai Makaar",
image: "assets/jhooti.png"
},
{
title: "Kabir Singh",
image: "assets/KabirSingh.png"
},
{
title: "Mother India",
image: "assets/MotherIndia.png"
},
{
title: "Om Shanti Om",
image: "assets/OmShantiOm.png"
},
{
title: "Padmaavati",
image: "assets/Padmaavat.png"
},
{
title: "Saiyaara",
image: "assets/Saiyaara.png"
},
{
title: "Sholay",
image: "assets/Sholay.png"
},
{
title: "Sonu Ke Titu Ki Sweety",
image: "assets/Sonu.png"
},
{
title: "Tanhaji",
image: "assets/Tanhaji.png"
}
];
const container = document.getElementById('moviesContainer');
movies.forEach(movie => {
const card = document.createElement('div');
card.className = 'movie-card';
card.innerHTML = `
<img src="${movie.image}" alt="${movie.title}" />
<p>${movie.title}</p>
`;
container.appendChild(card);
});
// Redirect to login if user is not signed in
const currentUser = JSON.parse(localStorage.getItem("netflixCurrentUser"));
if (!currentUser || !currentUser.email) {
window.location.href = "login.html"; // or "signin.html", depending on your filename
}