Add 2 files
Browse files- index.html +213 -34
- prompts.txt +2 -1
index.html
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
-
<title>CinéAuto Pro - Tous les films</title>
|
7 |
<script src="https://cdn.tailwindcss.com"></script>
|
8 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
9 |
<style>
|
@@ -83,6 +83,45 @@
|
|
83 |
padding: 20px 0;
|
84 |
text-align: center;
|
85 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
</style>
|
87 |
</head>
|
88 |
<body class="font-sans bg-gray-900 text-white">
|
@@ -122,14 +161,14 @@
|
|
122 |
<div>
|
123 |
<h1 class="text-4xl md:text-5xl font-bold mb-6">Découvrez notre collection complète</h1>
|
124 |
<p class="text-xl text-gray-300 max-w-2xl mb-8">
|
125 |
-
Plus de 10 000 films disponibles instantanément. Parcourez, découvrez et regardez vos films préférés.
|
126 |
</p>
|
127 |
<div class="flex flex-wrap gap-4">
|
128 |
-
<button class="bg-red-600 hover:bg-red-700 text-white font-bold py-3 px-6 rounded-lg transition duration-300 flex items-center">
|
129 |
<i class="fas fa-play mr-2"></i> Film aléatoire
|
130 |
</button>
|
131 |
-
<button
|
132 |
-
<i class="fas fa-
|
133 |
</button>
|
134 |
</div>
|
135 |
</div>
|
@@ -157,7 +196,7 @@
|
|
157 |
<div class="flex flex-col md:flex-row justify-between items-start md:items-center mb-8">
|
158 |
<div>
|
159 |
<h2 class="text-3xl font-bold">Tous les films</h2>
|
160 |
-
<p class="text-gray-400">Parcourez notre collection complète</p>
|
161 |
</div>
|
162 |
<div class="mt-4 md:mt-0 flex space-x-4">
|
163 |
<div class="relative">
|
@@ -199,33 +238,32 @@
|
|
199 |
</div>
|
200 |
</section>
|
201 |
|
202 |
-
<!--
|
203 |
-
<
|
204 |
-
<div class="
|
205 |
-
<
|
206 |
-
|
207 |
-
<div id="genres-grid" class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6 gap-4">
|
208 |
-
<!-- Genres will be loaded here by JavaScript -->
|
209 |
-
</div>
|
210 |
</div>
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
</div>
|
223 |
-
|
224 |
-
<div id="trending-movies" class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-6">
|
225 |
-
<!-- Trending movies will be loaded here by JavaScript -->
|
226 |
-
</div>
|
227 |
</div>
|
228 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
229 |
|
230 |
<!-- Footer -->
|
231 |
<footer class="bg-gray-950 text-gray-400 py-12">
|
@@ -237,7 +275,7 @@
|
|
237 |
<span class="text-xl font-bold text-white">CinéAuto Pro</span>
|
238 |
</div>
|
239 |
<p class="mb-4">
|
240 |
-
La plus grande collection de films en ligne.
|
241 |
</p>
|
242 |
<div class="flex space-x-4">
|
243 |
<a href="#" class="text-gray-400 hover:text-white">
|
@@ -302,6 +340,11 @@
|
|
302 |
let genres = [];
|
303 |
let isLoading = false;
|
304 |
let trendingTimeWindow = 'day';
|
|
|
|
|
|
|
|
|
|
|
305 |
|
306 |
// Éléments DOM
|
307 |
const filmGrid = document.getElementById('film-grid');
|
@@ -315,6 +358,14 @@
|
|
315 |
const trendingMovies = document.getElementById('trending-movies');
|
316 |
const trendingDayBtn = document.getElementById('trending-day');
|
317 |
const trendingWeekBtn = document.getElementById('trending-week');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
318 |
|
319 |
// Charger les genres
|
320 |
async function loadGenres() {
|
@@ -416,6 +467,13 @@
|
|
416 |
currentPage = data.page;
|
417 |
totalPages = data.total_pages > 500 ? 500 : data.total_pages; // L'API limite à 500 pages
|
418 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
419 |
// Afficher les films
|
420 |
if (page === 1) {
|
421 |
displayMovies(data.results);
|
@@ -427,6 +485,12 @@
|
|
427 |
// Masquer le loader
|
428 |
infiniteScrollLoader.style.display = 'none';
|
429 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
430 |
} catch (error) {
|
431 |
console.error('Erreur lors du chargement des films:', error);
|
432 |
filmGrid.innerHTML = '<div class="col-span-full text-center py-12 text-red-400">Erreur lors du chargement des films. Veuillez réessayer.</div>';
|
@@ -441,8 +505,8 @@
|
|
441 |
return '<div class="col-span-full text-center py-12">Aucun film trouvé avec ces critères.</div>';
|
442 |
}
|
443 |
|
444 |
-
return movies.map(movie => `
|
445 |
-
<div class="film-card bg-gray-800 rounded-lg overflow-hidden shadow-md transition duration-300 fade-in">
|
446 |
<div class="relative pb-[150%]">
|
447 |
${movie.poster_path ?
|
448 |
`<img src="${IMAGE_BASE_URL}w500${movie.poster_path}" alt="${movie.title}" class="absolute h-full w-full object-cover">` :
|
@@ -516,6 +580,106 @@
|
|
516 |
}
|
517 |
}
|
518 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
519 |
// Gestionnaires d'événements
|
520 |
sortSelect.addEventListener('change', () => {
|
521 |
currentSort = sortSelect.value;
|
@@ -547,6 +711,21 @@
|
|
547 |
loadTrendingMovies();
|
548 |
});
|
549 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
550 |
// Initialisation
|
551 |
document.addEventListener('DOMContentLoaded', () => {
|
552 |
loadGenres();
|
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>CinéAuto Pro - Tous les films en autopilotage</title>
|
7 |
<script src="https://cdn.tailwindcss.com"></script>
|
8 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
9 |
<style>
|
|
|
83 |
padding: 20px 0;
|
84 |
text-align: center;
|
85 |
}
|
86 |
+
.autoplay-controls {
|
87 |
+
position: fixed;
|
88 |
+
bottom: 20px;
|
89 |
+
left: 50%;
|
90 |
+
transform: translateX(-50%);
|
91 |
+
background: rgba(30, 41, 59, 0.9);
|
92 |
+
padding: 10px 20px;
|
93 |
+
border-radius: 50px;
|
94 |
+
z-index: 100;
|
95 |
+
display: flex;
|
96 |
+
gap: 15px;
|
97 |
+
align-items: center;
|
98 |
+
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
|
99 |
+
}
|
100 |
+
.autoplay-indicator {
|
101 |
+
position: absolute;
|
102 |
+
top: -10px;
|
103 |
+
right: -10px;
|
104 |
+
background: #ef4444;
|
105 |
+
color: white;
|
106 |
+
border-radius: 50%;
|
107 |
+
width: 20px;
|
108 |
+
height: 20px;
|
109 |
+
display: flex;
|
110 |
+
align-items: center;
|
111 |
+
justify-content: center;
|
112 |
+
font-size: 12px;
|
113 |
+
animation: pulse 1.5s infinite;
|
114 |
+
}
|
115 |
+
@keyframes pulse {
|
116 |
+
0% { transform: scale(1); }
|
117 |
+
50% { transform: scale(1.1); }
|
118 |
+
100% { transform: scale(1); }
|
119 |
+
}
|
120 |
+
.current-playing {
|
121 |
+
position: relative;
|
122 |
+
border: 2px solid #ef4444;
|
123 |
+
box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
|
124 |
+
}
|
125 |
</style>
|
126 |
</head>
|
127 |
<body class="font-sans bg-gray-900 text-white">
|
|
|
161 |
<div>
|
162 |
<h1 class="text-4xl md:text-5xl font-bold mb-6">Découvrez notre collection complète</h1>
|
163 |
<p class="text-xl text-gray-300 max-w-2xl mb-8">
|
164 |
+
Plus de 10 000 films disponibles instantanément. Parcourez, découvrez et regardez vos films préférés en mode autopilotage.
|
165 |
</p>
|
166 |
<div class="flex flex-wrap gap-4">
|
167 |
+
<button id="random-movie-btn" class="bg-red-600 hover:bg-red-700 text-white font-bold py-3 px-6 rounded-lg transition duration-300 flex items-center">
|
168 |
<i class="fas fa-play mr-2"></i> Film aléatoire
|
169 |
</button>
|
170 |
+
<button id="toggle-autoplay-btn" class="bg-red-600 hover:bg-red-700 text-white font-bold py-3 px-6 rounded-lg transition duration-300 flex items-center">
|
171 |
+
<i class="fas fa-robot mr-2"></i> Activer l'autopilotage
|
172 |
</button>
|
173 |
</div>
|
174 |
</div>
|
|
|
196 |
<div class="flex flex-col md:flex-row justify-between items-start md:items-center mb-8">
|
197 |
<div>
|
198 |
<h2 class="text-3xl font-bold">Tous les films</h2>
|
199 |
+
<p class="text-gray-400">Parcourez notre collection complète en autopilotage</p>
|
200 |
</div>
|
201 |
<div class="mt-4 md:mt-0 flex space-x-4">
|
202 |
<div class="relative">
|
|
|
238 |
</div>
|
239 |
</section>
|
240 |
|
241 |
+
<!-- Autoplay Controls -->
|
242 |
+
<div id="autoplay-controls" class="autoplay-controls hidden">
|
243 |
+
<div class="autoplay-indicator">
|
244 |
+
<i class="fas fa-play"></i>
|
|
|
|
|
|
|
|
|
245 |
</div>
|
246 |
+
<button id="prev-movie-btn" class="text-white hover:text-red-400">
|
247 |
+
<i class="fas fa-step-backward text-xl"></i>
|
248 |
+
</button>
|
249 |
+
<button id="play-pause-btn" class="text-white hover:text-red-400">
|
250 |
+
<i class="fas fa-pause text-2xl"></i>
|
251 |
+
</button>
|
252 |
+
<button id="next-movie-btn" class="text-white hover:text-red-400">
|
253 |
+
<i class="fas fa-step-forward text-xl"></i>
|
254 |
+
</button>
|
255 |
+
<div class="text-white text-sm">
|
256 |
+
<span id="current-movie-title">Aucun film en cours</span>
|
|
|
|
|
|
|
|
|
|
|
257 |
</div>
|
258 |
+
<div class="flex items-center ml-4">
|
259 |
+
<span class="text-gray-400 text-sm mr-2">Vitesse:</span>
|
260 |
+
<select id="autoplay-speed" class="bg-gray-700 text-white text-sm px-2 py-1 rounded">
|
261 |
+
<option value="5000">Lente</option>
|
262 |
+
<option value="3000" selected>Normale</option>
|
263 |
+
<option value="1500">Rapide</option>
|
264 |
+
</select>
|
265 |
+
</div>
|
266 |
+
</div>
|
267 |
|
268 |
<!-- Footer -->
|
269 |
<footer class="bg-gray-950 text-gray-400 py-12">
|
|
|
275 |
<span class="text-xl font-bold text-white">CinéAuto Pro</span>
|
276 |
</div>
|
277 |
<p class="mb-4">
|
278 |
+
La plus grande collection de films en ligne avec autopilotage.
|
279 |
</p>
|
280 |
<div class="flex space-x-4">
|
281 |
<a href="#" class="text-gray-400 hover:text-white">
|
|
|
340 |
let genres = [];
|
341 |
let isLoading = false;
|
342 |
let trendingTimeWindow = 'day';
|
343 |
+
let allMovies = [];
|
344 |
+
let currentMovieIndex = 0;
|
345 |
+
let autoplayInterval;
|
346 |
+
let isAutoplayActive = false;
|
347 |
+
let autoplaySpeed = 3000; // 3 secondes par défaut
|
348 |
|
349 |
// Éléments DOM
|
350 |
const filmGrid = document.getElementById('film-grid');
|
|
|
358 |
const trendingMovies = document.getElementById('trending-movies');
|
359 |
const trendingDayBtn = document.getElementById('trending-day');
|
360 |
const trendingWeekBtn = document.getElementById('trending-week');
|
361 |
+
const autoplayControls = document.getElementById('autoplay-controls');
|
362 |
+
const toggleAutoplayBtn = document.getElementById('toggle-autoplay-btn');
|
363 |
+
const playPauseBtn = document.getElementById('play-pause-btn');
|
364 |
+
const prevMovieBtn = document.getElementById('prev-movie-btn');
|
365 |
+
const nextMovieBtn = document.getElementById('next-movie-btn');
|
366 |
+
const currentMovieTitle = document.getElementById('current-movie-title');
|
367 |
+
const autoplaySpeedSelect = document.getElementById('autoplay-speed');
|
368 |
+
const randomMovieBtn = document.getElementById('random-movie-btn');
|
369 |
|
370 |
// Charger les genres
|
371 |
async function loadGenres() {
|
|
|
467 |
currentPage = data.page;
|
468 |
totalPages = data.total_pages > 500 ? 500 : data.total_pages; // L'API limite à 500 pages
|
469 |
|
470 |
+
// Stocker tous les films pour l'autopilotage
|
471 |
+
if (page === 1) {
|
472 |
+
allMovies = data.results;
|
473 |
+
} else {
|
474 |
+
allMovies = [...allMovies, ...data.results];
|
475 |
+
}
|
476 |
+
|
477 |
// Afficher les films
|
478 |
if (page === 1) {
|
479 |
displayMovies(data.results);
|
|
|
485 |
// Masquer le loader
|
486 |
infiniteScrollLoader.style.display = 'none';
|
487 |
}
|
488 |
+
|
489 |
+
// Si l'autopilotage est actif, redémarrer avec la nouvelle liste
|
490 |
+
if (isAutoplayActive) {
|
491 |
+
stopAutoplay();
|
492 |
+
startAutoplay();
|
493 |
+
}
|
494 |
} catch (error) {
|
495 |
console.error('Erreur lors du chargement des films:', error);
|
496 |
filmGrid.innerHTML = '<div class="col-span-full text-center py-12 text-red-400">Erreur lors du chargement des films. Veuillez réessayer.</div>';
|
|
|
505 |
return '<div class="col-span-full text-center py-12">Aucun film trouvé avec ces critères.</div>';
|
506 |
}
|
507 |
|
508 |
+
return movies.map((movie, index) => `
|
509 |
+
<div class="film-card bg-gray-800 rounded-lg overflow-hidden shadow-md transition duration-300 fade-in ${index === currentMovieIndex && isAutoplayActive ? 'current-playing' : ''}" data-movie-id="${movie.id}" data-movie-index="${index}">
|
510 |
<div class="relative pb-[150%]">
|
511 |
${movie.poster_path ?
|
512 |
`<img src="${IMAGE_BASE_URL}w500${movie.poster_path}" alt="${movie.title}" class="absolute h-full w-full object-cover">` :
|
|
|
580 |
}
|
581 |
}
|
582 |
|
583 |
+
// Fonctions pour l'autopilotage
|
584 |
+
function startAutoplay() {
|
585 |
+
if (allMovies.length === 0) return;
|
586 |
+
|
587 |
+
isAutoplayActive = true;
|
588 |
+
toggleAutoplayBtn.innerHTML = '<i class="fas fa-stop mr-2"></i> Arrêter l\'autopilotage';
|
589 |
+
toggleAutoplayBtn.classList.remove('bg-red-600');
|
590 |
+
toggleAutoplayBtn.classList.add('bg-red-800');
|
591 |
+
autoplayControls.classList.remove('hidden');
|
592 |
+
|
593 |
+
// Mettre en surbrillance le film en cours
|
594 |
+
highlightCurrentMovie();
|
595 |
+
|
596 |
+
// Démarrer l'intervalle
|
597 |
+
autoplayInterval = setInterval(() => {
|
598 |
+
nextMovie();
|
599 |
+
}, autoplaySpeed);
|
600 |
+
}
|
601 |
+
|
602 |
+
function stopAutoplay() {
|
603 |
+
isAutoplayActive = false;
|
604 |
+
toggleAutoplayBtn.innerHTML = '<i class="fas fa-robot mr-2"></i> Activer l\'autopilotage';
|
605 |
+
toggleAutoplayBtn.classList.add('bg-red-600');
|
606 |
+
toggleAutoplayBtn.classList.remove('bg-red-800');
|
607 |
+
|
608 |
+
if (autoplayInterval) {
|
609 |
+
clearInterval(autoplayInterval);
|
610 |
+
}
|
611 |
+
|
612 |
+
// Retirer la surbrillance du film en cours
|
613 |
+
document.querySelectorAll('.film-card').forEach(card => {
|
614 |
+
card.classList.remove('current-playing');
|
615 |
+
});
|
616 |
+
}
|
617 |
+
|
618 |
+
function toggleAutoplay() {
|
619 |
+
if (isAutoplayActive) {
|
620 |
+
stopAutoplay();
|
621 |
+
autoplayControls.classList.add('hidden');
|
622 |
+
} else {
|
623 |
+
startAutoplay();
|
624 |
+
}
|
625 |
+
}
|
626 |
+
|
627 |
+
function nextMovie() {
|
628 |
+
if (allMovies.length === 0) return;
|
629 |
+
|
630 |
+
currentMovieIndex = (currentMovieIndex + 1) % allMovies.length;
|
631 |
+
highlightCurrentMovie();
|
632 |
+
scrollToCurrentMovie();
|
633 |
+
}
|
634 |
+
|
635 |
+
function prevMovie() {
|
636 |
+
if (allMovies.length === 0) return;
|
637 |
+
|
638 |
+
currentMovieIndex = (currentMovieIndex - 1 + allMovies.length) % allMovies.length;
|
639 |
+
highlightCurrentMovie();
|
640 |
+
scrollToCurrentMovie();
|
641 |
+
}
|
642 |
+
|
643 |
+
function highlightCurrentMovie() {
|
644 |
+
// Retirer la surbrillance de tous les films
|
645 |
+
document.querySelectorAll('.film-card').forEach(card => {
|
646 |
+
card.classList.remove('current-playing');
|
647 |
+
});
|
648 |
+
|
649 |
+
// Ajouter la surbrillance au film actuel
|
650 |
+
const currentCard = document.querySelector(`.film-card[data-movie-index="${currentMovieIndex}"]`);
|
651 |
+
if (currentCard) {
|
652 |
+
currentCard.classList.add('current-playing');
|
653 |
+
|
654 |
+
// Mettre à jour le titre dans les contrôles
|
655 |
+
const movie = allMovies[currentMovieIndex];
|
656 |
+
currentMovieTitle.textContent = movie.title;
|
657 |
+
}
|
658 |
+
}
|
659 |
+
|
660 |
+
function scrollToCurrentMovie() {
|
661 |
+
const currentCard = document.querySelector(`.film-card[data-movie-index="${currentMovieIndex}"]`);
|
662 |
+
if (currentCard) {
|
663 |
+
currentCard.scrollIntoView({
|
664 |
+
behavior: 'smooth',
|
665 |
+
block: 'center'
|
666 |
+
});
|
667 |
+
}
|
668 |
+
}
|
669 |
+
|
670 |
+
function playRandomMovie() {
|
671 |
+
if (allMovies.length === 0) return;
|
672 |
+
|
673 |
+
currentMovieIndex = Math.floor(Math.random() * allMovies.length);
|
674 |
+
highlightCurrentMovie();
|
675 |
+
scrollToCurrentMovie();
|
676 |
+
|
677 |
+
// Si l'autopilotage n'est pas actif, le démarrer
|
678 |
+
if (!isAutoplayActive) {
|
679 |
+
startAutoplay();
|
680 |
+
}
|
681 |
+
}
|
682 |
+
|
683 |
// Gestionnaires d'événements
|
684 |
sortSelect.addEventListener('change', () => {
|
685 |
currentSort = sortSelect.value;
|
|
|
711 |
loadTrendingMovies();
|
712 |
});
|
713 |
|
714 |
+
toggleAutoplayBtn.addEventListener('click', toggleAutoplay);
|
715 |
+
playPauseBtn.addEventListener('click', toggleAutoplay);
|
716 |
+
prevMovieBtn.addEventListener('click', prevMovie);
|
717 |
+
nextMovieBtn.addEventListener('click', nextMovie);
|
718 |
+
randomMovieBtn.addEventListener('click', playRandomMovie);
|
719 |
+
|
720 |
+
autoplaySpeedSelect.addEventListener('change', () => {
|
721 |
+
autoplaySpeed = parseInt(autoplaySpeedSelect.value);
|
722 |
+
|
723 |
+
if (isAutoplayActive) {
|
724 |
+
stopAutoplay();
|
725 |
+
startAutoplay();
|
726 |
+
}
|
727 |
+
});
|
728 |
+
|
729 |
// Initialisation
|
730 |
document.addEventListener('DOMContentLoaded', () => {
|
731 |
loadGenres();
|
prompts.txt
CHANGED
@@ -7,4 +7,5 @@ https://plateformecinema.com ? ACTIVER LES FILMS EN PILOTE AUTOMATIQUE AVEC UNE
|
|
7 |
ajouter 784574 film complet avec leur images des film d'origine en pilotage automatique
|
8 |
afficher toutes les images des film reelement
|
9 |
ajouté plus de fonction plus d'outils en pilotage automatique
|
10 |
-
afficher toutes les films directement sur la page d'accueil
|
|
|
|
7 |
ajouter 784574 film complet avec leur images des film d'origine en pilotage automatique
|
8 |
afficher toutes les images des film reelement
|
9 |
ajouté plus de fonction plus d'outils en pilotage automatique
|
10 |
+
afficher toutes les films directement sur la page d'accueil
|
11 |
+
je veux que toutes les film joue en autopilotage
|