docto41 commited on
Commit
608069d
·
verified ·
1 Parent(s): 8e4756d

Add 2 files

Browse files
Files changed (2) hide show
  1. index.html +44 -22
  2. prompts.txt +2 -1
index.html CHANGED
@@ -154,6 +154,14 @@
154
  50% { width: 100%; left: 0; }
155
  100% { width: 0%; left: 100%; }
156
  }
 
 
 
 
 
 
 
 
157
  </style>
158
  </head>
159
  <body class="relative overflow-hidden">
@@ -275,10 +283,9 @@
275
  </div>
276
  </div>
277
 
278
- <div class="mt-10 text-center">
279
- <button id="loadMoreBtn" class="neon-button neon-border text-white px-8 py-3 rounded-full font-bold flex items-center mx-auto">
280
- <i class="fas fa-chevron-circle-down mr-2"></i> Charger plus de films
281
- </button>
282
  </div>
283
  </div>
284
  </section>
@@ -504,6 +511,7 @@
504
  // Variables d'état
505
  let currentPage = 1;
506
  let totalMovies = 0;
 
507
 
508
  // Toggle IA Console
509
  document.getElementById('iaButton').addEventListener('click', function() {
@@ -519,6 +527,9 @@
519
  // Fonction pour charger les films populaires
520
  async function fetchPopularMovies(page = 1) {
521
  try {
 
 
 
522
  const response = await fetch(`${TMDB_BASE_URL}/movie/popular?api_key=${TMDB_API_KEY}&language=fr-FR&page=${page}`);
523
  const data = await response.json();
524
 
@@ -536,6 +547,9 @@
536
  } catch (error) {
537
  console.error('Erreur lors du chargement des films:', error);
538
  return [];
 
 
 
539
  }
540
  }
541
 
@@ -567,6 +581,11 @@
567
  function displayMovies(movies) {
568
  const moviesContainer = document.getElementById('moviesContainer');
569
 
 
 
 
 
 
570
  movies.forEach(movie => {
571
  const movieCard = document.createElement('div');
572
  movieCard.className = 'holographic-card group';
@@ -595,21 +614,34 @@
595
  });
596
  }
597
 
598
- // Fonction pour charger plus de films
599
- document.getElementById('loadMoreBtn').addEventListener('click', async function() {
 
 
600
  currentPage++;
601
  const movies = await fetchPopularMovies(currentPage);
602
  displayMovies(movies);
603
 
604
- // Animation de chargement
605
  const robotVoice = document.createElement('div');
606
- robotVoice.className = 'robot-voice mb-8';
607
- robotVoice.innerHTML = `<p class="text-cyan-300">SYSTÈME IA: Chargement de ${movies.length} films supplémentaires...</p>`;
608
- this.parentNode.insertBefore(robotVoice, this);
609
 
 
610
  setTimeout(() => {
611
- robotVoice.innerHTML = `<p class="text-green-400">SYSTÈME IA: Chargement terminé. ${movies.length} films ajoutés.</p>`;
612
- }, 1500);
 
 
 
 
 
 
 
 
 
 
613
  });
614
 
615
  // Initialisation
@@ -637,16 +669,6 @@
637
  // Arrêter les messages de chargement
638
  clearInterval(loadingInterval);
639
  robotVoice.innerHTML = `<p class="text-green-400">SYSTÈME IA: Chargement terminé. ${movies.length} films chargés avec succès.</p>`;
640
-
641
- // Auto-scroll des films
642
- setInterval(() => {
643
- const container = document.getElementById('moviesContainer');
644
- container.scrollBy({ left: 10, behavior: 'smooth' });
645
-
646
- if (container.scrollLeft + container.clientWidth >= container.scrollWidth - 100) {
647
- container.scrollTo({ left: 0, behavior: 'smooth' });
648
- }
649
- }, 50);
650
  });
651
  </script>
652
  <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=docto41/neoflix" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
 
154
  50% { width: 100%; left: 0; }
155
  100% { width: 0%; left: 100%; }
156
  }
157
+
158
+ /* Nouveau style pour le chargement automatique */
159
+ .loading-more {
160
+ display: none;
161
+ text-align: center;
162
+ padding: 20px;
163
+ color: var(--neon-blue);
164
+ }
165
  </style>
166
  </head>
167
  <body class="relative overflow-hidden">
 
283
  </div>
284
  </div>
285
 
286
+ <div id="loadingMore" class="loading-more">
287
+ <div class="loading-bar mb-2 mx-auto" style="width: 200px;"></div>
288
+ <p class="text-cyan-400">Chargement automatique des films...</p>
 
289
  </div>
290
  </div>
291
  </section>
 
511
  // Variables d'état
512
  let currentPage = 1;
513
  let totalMovies = 0;
514
+ let isLoading = false;
515
 
516
  // Toggle IA Console
517
  document.getElementById('iaButton').addEventListener('click', function() {
 
527
  // Fonction pour charger les films populaires
528
  async function fetchPopularMovies(page = 1) {
529
  try {
530
+ isLoading = true;
531
+ document.getElementById('loadingMore').style.display = 'block';
532
+
533
  const response = await fetch(`${TMDB_BASE_URL}/movie/popular?api_key=${TMDB_API_KEY}&language=fr-FR&page=${page}`);
534
  const data = await response.json();
535
 
 
547
  } catch (error) {
548
  console.error('Erreur lors du chargement des films:', error);
549
  return [];
550
+ } finally {
551
+ isLoading = false;
552
+ document.getElementById('loadingMore').style.display = 'none';
553
  }
554
  }
555
 
 
581
  function displayMovies(movies) {
582
  const moviesContainer = document.getElementById('moviesContainer');
583
 
584
+ // Si c'est la première page, on vide le conteneur
585
+ if (currentPage === 1) {
586
+ moviesContainer.innerHTML = '';
587
+ }
588
+
589
  movies.forEach(movie => {
590
  const movieCard = document.createElement('div');
591
  movieCard.className = 'holographic-card group';
 
614
  });
615
  }
616
 
617
+ // Fonction pour charger plus de films automatiquement
618
+ async function loadMoreMovies() {
619
+ if (isLoading) return;
620
+
621
  currentPage++;
622
  const movies = await fetchPopularMovies(currentPage);
623
  displayMovies(movies);
624
 
625
+ // Ajouter un message de notification IA
626
  const robotVoice = document.createElement('div');
627
+ robotVoice.className = 'robot-voice';
628
+ robotVoice.innerHTML = `<p class="text-green-400">SYSTÈME IA: ${movies.length} films supplémentaires chargés automatiquement.</p>`;
629
+ document.querySelector('#moviesContainer').parentNode.insertBefore(robotVoice, document.getElementById('loadingMore'));
630
 
631
+ // Supprimer le message après 3 secondes
632
  setTimeout(() => {
633
+ robotVoice.remove();
634
+ }, 3000);
635
+ }
636
+
637
+ // Détection du scroll pour le chargement automatique
638
+ window.addEventListener('scroll', () => {
639
+ const { scrollTop, scrollHeight, clientHeight } = document.documentElement;
640
+
641
+ // Si l'utilisateur est proche du bas de la page (à 200px près)
642
+ if (scrollTop + clientHeight >= scrollHeight - 200) {
643
+ loadMoreMovies();
644
+ }
645
  });
646
 
647
  // Initialisation
 
669
  // Arrêter les messages de chargement
670
  clearInterval(loadingInterval);
671
  robotVoice.innerHTML = `<p class="text-green-400">SYSTÈME IA: Chargement terminé. ${movies.length} films chargés avec succès.</p>`;
 
 
 
 
 
 
 
 
 
 
672
  });
673
  </script>
674
  <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=docto41/neoflix" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
prompts.txt CHANGED
@@ -1,2 +1,3 @@
1
  je veux pas des site d'exemple je veux un vrais site avec plus de 975623123 films version Français en auto Play robotisé ,, en mode futuriste
2
- voici les cléé api tmdb ::: Jeton d'accès en lecture à l'API eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJmYjQzN2IxMDcyN2E1YTRlYjhkOTEzNGUyOWM4MmFlMCIsIm5iZiI6MTY4MDYzNzkxMC44NjUsInN1YiI6IjY0MmM3ZmQ2OGI5NTllMDBmNDRkNzNhMCIsInNjb3BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIjoxfQ.Nhl261Ha3z0Ujg5vM1PpFoZBiTGjlXQ1g9VFPh6dVvs Clé d'API fb437b10727a5a4eb8d9134e29c82ae0
 
 
1
  je veux pas des site d'exemple je veux un vrais site avec plus de 975623123 films version Français en auto Play robotisé ,, en mode futuriste
2
+ voici les cléé api tmdb ::: Jeton d'accès en lecture à l'API eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJmYjQzN2IxMDcyN2E1YTRlYjhkOTEzNGUyOWM4MmFlMCIsIm5iZiI6MTY4MDYzNzkxMC44NjUsInN1YiI6IjY0MmM3ZmQ2OGI5NTllMDBmNDRkNzNhMCIsInNjb3BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIjoxfQ.Nhl261Ha3z0Ujg5vM1PpFoZBiTGjlXQ1g9VFPh6dVvs Clé d'API fb437b10727a5a4eb8d9134e29c82ae0
3
+ CHERGER LES FILMS AUTOMATIQUEMENT