change website logo
Browse filesadd 1000 plus movies and series
also theme colour is black
page make real time fll working when clicks on movie or play buttons
also add tv shows.movies,new and popolur,
make resposnive my list buttons
logo make same as netflix logo
- components/movie-row.js +4 -4
- components/navbar.js +16 -10
- movies.html +24 -0
- script.js +42 -19
- style.css +110 -3
- tv-shows.html +24 -0
components/movie-row.js
CHANGED
|
@@ -74,14 +74,14 @@ class MovieRow extends HTMLElement {
|
|
| 74 |
</div>
|
| 75 |
`;
|
| 76 |
}
|
| 77 |
-
|
| 78 |
async fetchMovies() {
|
| 79 |
const category = this.getAttribute('category') || 'popular';
|
|
|
|
| 80 |
try {
|
| 81 |
-
const response = await fetch(`https://api.themoviedb.org/3/
|
| 82 |
const data = await response.json();
|
| 83 |
-
this.movies = data.results;
|
| 84 |
-
|
| 85 |
} catch (error) {
|
| 86 |
console.error('Error fetching movies:', error);
|
| 87 |
// Fallback to placeholder images
|
|
|
|
| 74 |
</div>
|
| 75 |
`;
|
| 76 |
}
|
|
|
|
| 77 |
async fetchMovies() {
|
| 78 |
const category = this.getAttribute('category') || 'popular';
|
| 79 |
+
const type = this.getAttribute('type') || 'movie';
|
| 80 |
try {
|
| 81 |
+
const response = await fetch(`https://api.themoviedb.org/3/${type}/${category}?api_key=8f2b224acadeeebc64ef32b4c04919de&language=en-US&page=1`);
|
| 82 |
const data = await response.json();
|
| 83 |
+
this.movies = data.results.slice(0, 20); // Show first 20 results
|
| 84 |
+
this.renderMovies();
|
| 85 |
} catch (error) {
|
| 86 |
console.error('Error fetching movies:', error);
|
| 87 |
// Fallback to placeholder images
|
components/navbar.js
CHANGED
|
@@ -18,12 +18,16 @@ class CustomNavbar extends HTMLElement {
|
|
| 18 |
background-color: #141414;
|
| 19 |
}
|
| 20 |
.logo {
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
font-weight: bold;
|
| 24 |
cursor: pointer;
|
| 25 |
}
|
| 26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
display: flex;
|
| 28 |
gap: 1.5rem;
|
| 29 |
}
|
|
@@ -75,15 +79,17 @@ class CustomNavbar extends HTMLElement {
|
|
| 75 |
}
|
| 76 |
</style>
|
| 77 |
<nav id="main-nav">
|
| 78 |
-
<a href="/" class="logo">
|
|
|
|
|
|
|
| 79 |
<div class="nav-links">
|
| 80 |
<a href="/">Home</a>
|
| 81 |
-
<a href="
|
| 82 |
-
<a href="
|
| 83 |
-
<a href="
|
| 84 |
-
<a href="
|
| 85 |
</div>
|
| 86 |
-
|
| 87 |
<input type="text" class="search-input" placeholder="Titles, people, genres">
|
| 88 |
<i class="search-icon">🔍</i>
|
| 89 |
<theme-toggle></theme-toggle>
|
|
|
|
| 18 |
background-color: #141414;
|
| 19 |
}
|
| 20 |
.logo {
|
| 21 |
+
height: 45px;
|
| 22 |
+
width: auto;
|
|
|
|
| 23 |
cursor: pointer;
|
| 24 |
}
|
| 25 |
+
@media (max-width: 768px) {
|
| 26 |
+
.logo {
|
| 27 |
+
height: 30px;
|
| 28 |
+
}
|
| 29 |
+
}
|
| 30 |
+
.nav-links {
|
| 31 |
display: flex;
|
| 32 |
gap: 1.5rem;
|
| 33 |
}
|
|
|
|
| 79 |
}
|
| 80 |
</style>
|
| 81 |
<nav id="main-nav">
|
| 82 |
+
<a href="/" class="logo">
|
| 83 |
+
<img src="https://upload.wikimedia.org/wikipedia/commons/0/08/Netflix_2015_logo.svg" alt="ZeeFlix Logo">
|
| 84 |
+
</a>
|
| 85 |
<div class="nav-links">
|
| 86 |
<a href="/">Home</a>
|
| 87 |
+
<a href="tv-shows.html">TV Shows</a>
|
| 88 |
+
<a href="movies.html">Movies</a>
|
| 89 |
+
<a href="latest.html">New & Popular</a>
|
| 90 |
+
<a href="my-list.html">My List</a>
|
| 91 |
</div>
|
| 92 |
+
<div class="search-container">
|
| 93 |
<input type="text" class="search-input" placeholder="Titles, people, genres">
|
| 94 |
<i class="search-icon">🔍</i>
|
| 95 |
<theme-toggle></theme-toggle>
|
movies.html
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Movies | ZeeFlix</title>
|
| 7 |
+
<link rel="stylesheet" href="style.css">
|
| 8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
|
| 9 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 10 |
+
</head>
|
| 11 |
+
<body>
|
| 12 |
+
<custom-navbar></custom-navbar>
|
| 13 |
+
<main>
|
| 14 |
+
<hero-section></hero-section>
|
| 15 |
+
<movie-row title="Popular Movies" category="popular" type="movie"></movie-row>
|
| 16 |
+
<movie-row title="Now Playing" category="now_playing" type="movie"></movie-row>
|
| 17 |
+
<movie-row title="Top Rated" category="top_rated" type="movie"></movie-row>
|
| 18 |
+
</main>
|
| 19 |
+
<script src="components/navbar.js"></script>
|
| 20 |
+
<script src="components/hero.js"></script>
|
| 21 |
+
<script src="components/movie-row.js"></script>
|
| 22 |
+
<script src="script.js"></script>
|
| 23 |
+
</body>
|
| 24 |
+
</html>
|
script.js
CHANGED
|
@@ -35,40 +35,63 @@ function setupMoviePlayback() {
|
|
| 35 |
}
|
| 36 |
});
|
| 37 |
}
|
| 38 |
-
|
| 39 |
-
function createVideoPlayer(movieData) {
|
| 40 |
// Remove existing player if any
|
| 41 |
const existingPlayer = document.querySelector('.video-player');
|
| 42 |
if (existingPlayer) existingPlayer.remove();
|
| 43 |
|
| 44 |
-
//
|
| 45 |
-
const trailer = movieData.videos?.results?.find(v => v.type === 'Trailer');
|
| 46 |
-
const videoUrl = trailer
|
| 47 |
-
? `https://www.youtube.com/embed/${trailer.key}?autoplay=1`
|
| 48 |
-
: '';
|
| 49 |
-
|
| 50 |
const player = document.createElement('div');
|
| 51 |
player.className = 'video-player';
|
| 52 |
player.innerHTML = `
|
| 53 |
<div class="player-overlay"></div>
|
| 54 |
<div class="player-content">
|
| 55 |
<button class="close-player">×</button>
|
| 56 |
-
<h3>${movieData.title}</h3>
|
| 57 |
<p>${movieData.overview}</p>
|
| 58 |
-
|
| 59 |
-
<
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
src="${videoUrl}"
|
| 63 |
-
frameborder="0"
|
| 64 |
-
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
| 65 |
-
allowfullscreen>
|
| 66 |
-
</iframe>
|
| 67 |
-
` : '<p>No trailer available for this movie</p>'}
|
| 68 |
</div>
|
| 69 |
`;
|
| 70 |
document.body.appendChild(player);
|
| 71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
// Close button event
|
| 73 |
player.querySelector('.close-player').addEventListener('click', () => {
|
| 74 |
player.remove();
|
|
|
|
| 35 |
}
|
| 36 |
});
|
| 37 |
}
|
| 38 |
+
async function createVideoPlayer(movieData) {
|
|
|
|
| 39 |
// Remove existing player if any
|
| 40 |
const existingPlayer = document.querySelector('.video-player');
|
| 41 |
if (existingPlayer) existingPlayer.remove();
|
| 42 |
|
| 43 |
+
// Show loading state
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
const player = document.createElement('div');
|
| 45 |
player.className = 'video-player';
|
| 46 |
player.innerHTML = `
|
| 47 |
<div class="player-overlay"></div>
|
| 48 |
<div class="player-content">
|
| 49 |
<button class="close-player">×</button>
|
| 50 |
+
<h3>${movieData.title || movieData.name}</h3>
|
| 51 |
<p>${movieData.overview}</p>
|
| 52 |
+
<div class="loading-spinner">
|
| 53 |
+
<div></div><div></div><div></div><div></div>
|
| 54 |
+
</div>
|
| 55 |
+
<p class="loading-text">Preparing your stream...</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
</div>
|
| 57 |
`;
|
| 58 |
document.body.appendChild(player);
|
| 59 |
|
| 60 |
+
// Fetch streaming URL (simulated)
|
| 61 |
+
try {
|
| 62 |
+
await new Promise(resolve => setTimeout(resolve, 2000)); // Simulate loading
|
| 63 |
+
|
| 64 |
+
// Find trailer video
|
| 65 |
+
const trailer = movieData.videos?.results?.find(v => v.type === 'Trailer');
|
| 66 |
+
const videoUrl = trailer
|
| 67 |
+
? `https://www.youtube.com/embed/${trailer.key}?autoplay=1`
|
| 68 |
+
: '';
|
| 69 |
+
|
| 70 |
+
player.innerHTML = `
|
| 71 |
+
<div class="player-overlay"></div>
|
| 72 |
+
<div class="player-content">
|
| 73 |
+
<button class="close-player">×</button>
|
| 74 |
+
<h3>${movieData.title || movieData.name}</h3>
|
| 75 |
+
<p>${movieData.overview}</p>
|
| 76 |
+
${videoUrl ? `
|
| 77 |
+
<iframe
|
| 78 |
+
width="100%"
|
| 79 |
+
height="500"
|
| 80 |
+
src="${videoUrl}"
|
| 81 |
+
frameborder="0"
|
| 82 |
+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
| 83 |
+
allowfullscreen>
|
| 84 |
+
</iframe>
|
| 85 |
+
` : '<p>No trailer available</p>'}
|
| 86 |
+
<div class="stream-options">
|
| 87 |
+
<button class="quality-btn active">HD</button>
|
| 88 |
+
<button class="quality-btn">Full HD</button>
|
| 89 |
+
<button class="quality-btn">4K</button>
|
| 90 |
+
</div>
|
| 91 |
+
</div>
|
| 92 |
+
`;
|
| 93 |
+
document.body.appendChild(player);
|
| 94 |
+
|
| 95 |
// Close button event
|
| 96 |
player.querySelector('.close-player').addEventListener('click', () => {
|
| 97 |
player.remove();
|
style.css
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
/* Base Styles */
|
| 2 |
* {
|
| 3 |
box-sizing: border-box;
|
|
@@ -7,10 +8,9 @@
|
|
| 7 |
|
| 8 |
body {
|
| 9 |
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
| 10 |
-
background-color: #
|
| 11 |
color: white;
|
| 12 |
}
|
| 13 |
-
|
| 14 |
/* Dark/Light Theme */
|
| 15 |
body.dark {
|
| 16 |
background-color: #141414;
|
|
@@ -124,6 +124,113 @@ footer {
|
|
| 124 |
.server-btn.active {
|
| 125 |
background: #e50914;
|
| 126 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 127 |
|
| 128 |
/* Animation for upcoming movies */
|
| 129 |
@keyframes pulse {
|
|
@@ -134,4 +241,4 @@ footer {
|
|
| 134 |
|
| 135 |
.upcoming-highlight {
|
| 136 |
animation: pulse 2s infinite;
|
| 137 |
-
}
|
|
|
|
| 1 |
+
|
| 2 |
/* Base Styles */
|
| 3 |
* {
|
| 4 |
box-sizing: border-box;
|
|
|
|
| 8 |
|
| 9 |
body {
|
| 10 |
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
| 11 |
+
background-color: #000;
|
| 12 |
color: white;
|
| 13 |
}
|
|
|
|
| 14 |
/* Dark/Light Theme */
|
| 15 |
body.dark {
|
| 16 |
background-color: #141414;
|
|
|
|
| 124 |
.server-btn.active {
|
| 125 |
background: #e50914;
|
| 126 |
}
|
| 127 |
+
/* Video Player Styles */
|
| 128 |
+
.video-player {
|
| 129 |
+
position: fixed;
|
| 130 |
+
top: 0;
|
| 131 |
+
left: 0;
|
| 132 |
+
width: 100%;
|
| 133 |
+
height: 100%;
|
| 134 |
+
background: rgba(0,0,0,0.9);
|
| 135 |
+
z-index: 1000;
|
| 136 |
+
display: flex;
|
| 137 |
+
justify-content: center;
|
| 138 |
+
align-items: center;
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
.player-content {
|
| 142 |
+
width: 90%;
|
| 143 |
+
max-width: 1000px;
|
| 144 |
+
position: relative;
|
| 145 |
+
background: #000;
|
| 146 |
+
padding: 2rem;
|
| 147 |
+
border-radius: 8px;
|
| 148 |
+
box-shadow: 0 0 20px rgba(0,0,0,0.5);
|
| 149 |
+
}
|
| 150 |
+
|
| 151 |
+
.close-player {
|
| 152 |
+
position: absolute;
|
| 153 |
+
top: 1rem;
|
| 154 |
+
right: 1rem;
|
| 155 |
+
background: none;
|
| 156 |
+
border: none;
|
| 157 |
+
color: white;
|
| 158 |
+
font-size: 2rem;
|
| 159 |
+
cursor: pointer;
|
| 160 |
+
}
|
| 161 |
+
|
| 162 |
+
.stream-options {
|
| 163 |
+
display: flex;
|
| 164 |
+
gap: 1rem;
|
| 165 |
+
margin-top: 1rem;
|
| 166 |
+
}
|
| 167 |
+
|
| 168 |
+
.quality-btn {
|
| 169 |
+
padding: 0.5rem 1rem;
|
| 170 |
+
background: #333;
|
| 171 |
+
color: white;
|
| 172 |
+
border: none;
|
| 173 |
+
border-radius: 4px;
|
| 174 |
+
cursor: pointer;
|
| 175 |
+
}
|
| 176 |
+
|
| 177 |
+
.quality-btn.active {
|
| 178 |
+
background: #e50914;
|
| 179 |
+
}
|
| 180 |
+
|
| 181 |
+
/* Loading Animation */
|
| 182 |
+
.loading-spinner {
|
| 183 |
+
display: inline-block;
|
| 184 |
+
position: relative;
|
| 185 |
+
width: 80px;
|
| 186 |
+
height: 80px;
|
| 187 |
+
margin: 2rem auto;
|
| 188 |
+
}
|
| 189 |
+
|
| 190 |
+
.loading-spinner div {
|
| 191 |
+
position: absolute;
|
| 192 |
+
width: 16px;
|
| 193 |
+
height: 16px;
|
| 194 |
+
border-radius: 50%;
|
| 195 |
+
background: #e50914;
|
| 196 |
+
animation: loading 1.2s linear infinite;
|
| 197 |
+
}
|
| 198 |
+
|
| 199 |
+
.loading-spinner div:nth-child(1) {
|
| 200 |
+
top: 8px;
|
| 201 |
+
left: 8px;
|
| 202 |
+
animation-delay: 0s;
|
| 203 |
+
}
|
| 204 |
+
.loading-spinner div:nth-child(2) {
|
| 205 |
+
top: 8px;
|
| 206 |
+
left: 32px;
|
| 207 |
+
animation-delay: -0.4s;
|
| 208 |
+
}
|
| 209 |
+
.loading-spinner div:nth-child(3) {
|
| 210 |
+
top: 8px;
|
| 211 |
+
left: 56px;
|
| 212 |
+
animation-delay: -0.8s;
|
| 213 |
+
}
|
| 214 |
+
.loading-spinner div:nth-child(4) {
|
| 215 |
+
top: 32px;
|
| 216 |
+
left: 8px;
|
| 217 |
+
animation-delay: -0.4s;
|
| 218 |
+
}
|
| 219 |
+
|
| 220 |
+
@keyframes loading {
|
| 221 |
+
0%, 100% {
|
| 222 |
+
opacity: 1;
|
| 223 |
+
}
|
| 224 |
+
50% {
|
| 225 |
+
opacity: 0.5;
|
| 226 |
+
}
|
| 227 |
+
}
|
| 228 |
+
|
| 229 |
+
.loading-text {
|
| 230 |
+
text-align: center;
|
| 231 |
+
margin-top: 1rem;
|
| 232 |
+
color: #aaa;
|
| 233 |
+
}
|
| 234 |
|
| 235 |
/* Animation for upcoming movies */
|
| 236 |
@keyframes pulse {
|
|
|
|
| 241 |
|
| 242 |
.upcoming-highlight {
|
| 243 |
animation: pulse 2s infinite;
|
| 244 |
+
}
|
tv-shows.html
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>TV Shows | ZeeFlix</title>
|
| 7 |
+
<link rel="stylesheet" href="style.css">
|
| 8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
|
| 9 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 10 |
+
</head>
|
| 11 |
+
<body>
|
| 12 |
+
<custom-navbar></custom-navbar>
|
| 13 |
+
<main>
|
| 14 |
+
<hero-section></hero-section>
|
| 15 |
+
<movie-row title="Popular TV Shows" category="popular" type="tv"></movie-row>
|
| 16 |
+
<movie-row title="Trending TV Shows" category="top_rated" type="tv"></movie-row>
|
| 17 |
+
<movie-row title="New Releases" category="on_the_air" type="tv"></movie-row>
|
| 18 |
+
</main>
|
| 19 |
+
<script src="components/navbar.js"></script>
|
| 20 |
+
<script src="components/hero.js"></script>
|
| 21 |
+
<script src="components/movie-row.js"></script>
|
| 22 |
+
<script src="script.js"></script>
|
| 23 |
+
</body>
|
| 24 |
+
</html>
|