Spaces:
Running
Running
Update 2.html
Browse files
2.html
CHANGED
@@ -110,18 +110,6 @@
|
|
110 |
line-height: 1.4;
|
111 |
}
|
112 |
|
113 |
-
.player-container {
|
114 |
-
margin-top: 20px;
|
115 |
-
aspect-ratio: 16/9;
|
116 |
-
}
|
117 |
-
|
118 |
-
#moviePlayer {
|
119 |
-
width: 100%;
|
120 |
-
height: 100%;
|
121 |
-
border: none;
|
122 |
-
border-radius: 10px;
|
123 |
-
}
|
124 |
-
|
125 |
.rating {
|
126 |
color: #ffd700;
|
127 |
margin-top: 8px;
|
@@ -211,10 +199,6 @@
|
|
211 |
|
212 |
<h2 class="section-title">Trending Movies</h2>
|
213 |
<div class="movie-grid" id="movieGrid"></div>
|
214 |
-
|
215 |
-
<div class="player-container">
|
216 |
-
<iframe id="moviePlayer" allowfullscreen></iframe>
|
217 |
-
</div>
|
218 |
</div>
|
219 |
|
220 |
<footer class="footer">
|
@@ -236,7 +220,6 @@
|
|
236 |
const movieGrid = document.getElementById('movieGrid');
|
237 |
const searchInput = document.getElementById('searchInput');
|
238 |
const searchButton = document.getElementById('searchButton');
|
239 |
-
const moviePlayer = document.getElementById('moviePlayer');
|
240 |
|
241 |
// Get trending movies
|
242 |
async function getTrendingMovies() {
|
@@ -286,14 +269,14 @@
|
|
286 |
</div>
|
287 |
`;
|
288 |
|
289 |
-
movieCard.addEventListener('click', () =>
|
290 |
movieGrid.appendChild(movieCard);
|
291 |
});
|
292 |
}
|
293 |
|
294 |
-
//
|
295 |
-
function
|
296 |
-
|
297 |
}
|
298 |
|
299 |
// Event listeners
|
|
|
110 |
line-height: 1.4;
|
111 |
}
|
112 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
.rating {
|
114 |
color: #ffd700;
|
115 |
margin-top: 8px;
|
|
|
199 |
|
200 |
<h2 class="section-title">Trending Movies</h2>
|
201 |
<div class="movie-grid" id="movieGrid"></div>
|
|
|
|
|
|
|
|
|
202 |
</div>
|
203 |
|
204 |
<footer class="footer">
|
|
|
220 |
const movieGrid = document.getElementById('movieGrid');
|
221 |
const searchInput = document.getElementById('searchInput');
|
222 |
const searchButton = document.getElementById('searchButton');
|
|
|
223 |
|
224 |
// Get trending movies
|
225 |
async function getTrendingMovies() {
|
|
|
269 |
</div>
|
270 |
`;
|
271 |
|
272 |
+
movieCard.addEventListener('click', () => openMovieDetails(movie.id));
|
273 |
movieGrid.appendChild(movieCard);
|
274 |
});
|
275 |
}
|
276 |
|
277 |
+
// Open movie details in a new tab
|
278 |
+
function openMovieDetails(movieId) {
|
279 |
+
window.open(`movie.html?id=${movieId}`, '_blank');
|
280 |
}
|
281 |
|
282 |
// Event listeners
|