Add 3 files
Browse files- README.md +7 -5
- index.html +518 -19
- prompts.txt +2 -0
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: cin
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: red
|
| 5 |
+
colorTo: pink
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,518 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="fr">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Tableau de Bord Cinéma</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>
|
| 10 |
+
.movie-card:hover .movie-overlay {
|
| 11 |
+
opacity: 1;
|
| 12 |
+
}
|
| 13 |
+
.movie-overlay {
|
| 14 |
+
transition: opacity 0.3s ease;
|
| 15 |
+
}
|
| 16 |
+
.skeleton {
|
| 17 |
+
animation: pulse 2s infinite ease-in-out;
|
| 18 |
+
}
|
| 19 |
+
@keyframes pulse {
|
| 20 |
+
0%, 100% { opacity: 0.6; }
|
| 21 |
+
50% { opacity: 0.3; }
|
| 22 |
+
}
|
| 23 |
+
.server-btn {
|
| 24 |
+
transition: all 0.3s ease;
|
| 25 |
+
}
|
| 26 |
+
.server-btn:hover {
|
| 27 |
+
transform: translateY(-2px);
|
| 28 |
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
| 29 |
+
}
|
| 30 |
+
.player-container {
|
| 31 |
+
display: none;
|
| 32 |
+
position: fixed;
|
| 33 |
+
top: 0;
|
| 34 |
+
left: 0;
|
| 35 |
+
width: 100%;
|
| 36 |
+
height: 100%;
|
| 37 |
+
background-color: rgba(0, 0, 0, 0.9);
|
| 38 |
+
z-index: 1000;
|
| 39 |
+
justify-content: center;
|
| 40 |
+
align-items: center;
|
| 41 |
+
}
|
| 42 |
+
.player-wrapper {
|
| 43 |
+
width: 80%;
|
| 44 |
+
max-width: 1200px;
|
| 45 |
+
position: relative;
|
| 46 |
+
}
|
| 47 |
+
.close-player {
|
| 48 |
+
position: absolute;
|
| 49 |
+
top: -40px;
|
| 50 |
+
right: 0;
|
| 51 |
+
color: white;
|
| 52 |
+
font-size: 24px;
|
| 53 |
+
cursor: pointer;
|
| 54 |
+
}
|
| 55 |
+
</style>
|
| 56 |
+
</head>
|
| 57 |
+
<body class="bg-gray-900 text-white min-h-screen">
|
| 58 |
+
<div class="container mx-auto px-4 py-8">
|
| 59 |
+
<!-- Header -->
|
| 60 |
+
<header class="flex justify-between items-center mb-10">
|
| 61 |
+
<div>
|
| 62 |
+
<h1 class="text-3xl font-bold text-indigo-400">CinéDashboard</h1>
|
| 63 |
+
<p class="text-gray-400">Votre tableau de bord cinématographique</p>
|
| 64 |
+
</div>
|
| 65 |
+
<div class="flex items-center space-x-4">
|
| 66 |
+
<div class="relative">
|
| 67 |
+
<input type="text" placeholder="Rechercher un film..." class="bg-gray-800 rounded-full py-2 px-4 pl-10 focus:outline-none focus:ring-2 focus:ring-indigo-500 w-64">
|
| 68 |
+
<i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
|
| 69 |
+
</div>
|
| 70 |
+
<div class="h-10 w-10 rounded-full bg-indigo-600 flex items-center justify-center">
|
| 71 |
+
<i class="fas fa-user"></i>
|
| 72 |
+
</div>
|
| 73 |
+
</div>
|
| 74 |
+
</header>
|
| 75 |
+
|
| 76 |
+
<!-- Stats -->
|
| 77 |
+
<div class="grid grid-cols-1 md:grid-cols-4 gap-6 mb-10">
|
| 78 |
+
<div class="bg-gray-800 rounded-lg p-6 flex items-center">
|
| 79 |
+
<div class="bg-indigo-600 p-3 rounded-full mr-4">
|
| 80 |
+
<i class="fas fa-film text-white"></i>
|
| 81 |
+
</div>
|
| 82 |
+
<div>
|
| 83 |
+
<p class="text-gray-400">Films chargés</p>
|
| 84 |
+
<h3 class="text-2xl font-bold" id="movies-count">0</h3>
|
| 85 |
+
</div>
|
| 86 |
+
</div>
|
| 87 |
+
<div class="bg-gray-800 rounded-lg p-6 flex items-center">
|
| 88 |
+
<div class="bg-purple-600 p-3 rounded-full mr-4">
|
| 89 |
+
<i class="fas fa-star text-white"></i>
|
| 90 |
+
</div>
|
| 91 |
+
<div>
|
| 92 |
+
<p class="text-gray-400">Note moyenne</p>
|
| 93 |
+
<h3 class="text-2xl font-bold" id="avg-rating">0</h3>
|
| 94 |
+
</div>
|
| 95 |
+
</div>
|
| 96 |
+
<div class="bg-gray-800 rounded-lg p-6 flex items-center">
|
| 97 |
+
<div class="bg-green-600 p-3 rounded-full mr-4">
|
| 98 |
+
<i class="fas fa-calendar text-white"></i>
|
| 99 |
+
</div>
|
| 100 |
+
<div>
|
| 101 |
+
<p class="text-gray-400">Dernière MAJ</p>
|
| 102 |
+
<h3 class="text-2xl font-bold" id="last-update">Aujourd'hui</h3>
|
| 103 |
+
</div>
|
| 104 |
+
</div>
|
| 105 |
+
<div class="bg-gray-800 rounded-lg p-6 flex items-center">
|
| 106 |
+
<div class="bg-red-600 p-3 rounded-full mr-4">
|
| 107 |
+
<i class="fas fa-fire text-white"></i>
|
| 108 |
+
</div>
|
| 109 |
+
<div>
|
| 110 |
+
<p class="text-gray-400">Tendance</p>
|
| 111 |
+
<h3 class="text-2xl font-bold" id="trending">0</h3>
|
| 112 |
+
</div>
|
| 113 |
+
</div>
|
| 114 |
+
</div>
|
| 115 |
+
|
| 116 |
+
<!-- Filters -->
|
| 117 |
+
<div class="flex flex-wrap items-center justify-between mb-8 bg-gray-800 p-4 rounded-lg">
|
| 118 |
+
<div class="flex space-x-4 mb-4 md:mb-0">
|
| 119 |
+
<button class="bg-indigo-600 hover:bg-indigo-700 px-4 py-2 rounded-lg transition" id="filter-popular">
|
| 120 |
+
Populaires
|
| 121 |
+
</button>
|
| 122 |
+
<button class="bg-gray-700 hover:bg-gray-600 px-4 py-2 rounded-lg transition" id="filter-top">
|
| 123 |
+
Top Rated
|
| 124 |
+
</button>
|
| 125 |
+
<button class="bg-gray-700 hover:bg-gray-600 px-4 py-2 rounded-lg transition" id="filter-upcoming">
|
| 126 |
+
Prochainement
|
| 127 |
+
</button>
|
| 128 |
+
</div>
|
| 129 |
+
<div class="flex items-center">
|
| 130 |
+
<label for="year-filter" class="mr-2 text-gray-400">Année:</label>
|
| 131 |
+
<select id="year-filter" class="bg-gray-700 rounded px-3 py-2 focus:outline-none">
|
| 132 |
+
<option value="all">Toutes</option>
|
| 133 |
+
<!-- Years will be populated by JS -->
|
| 134 |
+
</select>
|
| 135 |
+
</div>
|
| 136 |
+
</div>
|
| 137 |
+
|
| 138 |
+
<!-- Movies Grid -->
|
| 139 |
+
<div class="mb-10">
|
| 140 |
+
<h2 class="text-2xl font-bold mb-6 flex items-center">
|
| 141 |
+
<i class="fas fa-fire text-red-500 mr-2"></i>
|
| 142 |
+
<span id="section-title">Films populaires</span>
|
| 143 |
+
</h2>
|
| 144 |
+
|
| 145 |
+
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-6" id="movies-grid">
|
| 146 |
+
<!-- Skeleton loading -->
|
| 147 |
+
<div class="skeleton bg-gray-800 rounded-lg h-96"></div>
|
| 148 |
+
<div class="skeleton bg-gray-800 rounded-lg h-96"></div>
|
| 149 |
+
<div class="skeleton bg-gray-800 rounded-lg h-96"></div>
|
| 150 |
+
<div class="skeleton bg-gray-800 rounded-lg h-96"></div>
|
| 151 |
+
<div class="skeleton bg-gray-800 rounded-lg h-96"></div>
|
| 152 |
+
</div>
|
| 153 |
+
|
| 154 |
+
<div class="flex justify-center mt-8">
|
| 155 |
+
<button id="load-more" class="bg-indigo-600 hover:bg-indigo-700 px-6 py-3 rounded-lg transition font-medium">
|
| 156 |
+
Charger plus de films
|
| 157 |
+
</button>
|
| 158 |
+
</div>
|
| 159 |
+
</div>
|
| 160 |
+
|
| 161 |
+
<!-- Player Container (hidden by default) -->
|
| 162 |
+
<div class="player-container" id="player-container">
|
| 163 |
+
<div class="player-wrapper">
|
| 164 |
+
<div class="close-player" id="close-player">
|
| 165 |
+
<i class="fas fa-times"></i>
|
| 166 |
+
</div>
|
| 167 |
+
<iframe id="movie-player" width="100%" height="600" frameborder="0" allowfullscreen></iframe>
|
| 168 |
+
</div>
|
| 169 |
+
</div>
|
| 170 |
+
|
| 171 |
+
<!-- Footer -->
|
| 172 |
+
<footer class="border-t border-gray-800 pt-6 mt-10">
|
| 173 |
+
<div class="flex flex-col md:flex-row justify-between items-center">
|
| 174 |
+
<div class="mb-4 md:mb-0">
|
| 175 |
+
<h2 class="text-xl font-bold text-indigo-400">CinéDashboard</h2>
|
| 176 |
+
<p class="text-gray-400">Powered by TMDb API</p>
|
| 177 |
+
</div>
|
| 178 |
+
<div class="flex space-x-6">
|
| 179 |
+
<a href="#" class="text-gray-400 hover:text-white transition"><i class="fab fa-twitter"></i></a>
|
| 180 |
+
<a href="#" class="text-gray-400 hover:text-white transition"><i class="fab fa-facebook"></i></a>
|
| 181 |
+
<a href="#" class="text-gray-400 hover:text-white transition"><i class="fab fa-instagram"></i></a>
|
| 182 |
+
<a href="#" class="text-gray-400 hover:text-white transition"><i class="fab fa-github"></i></a>
|
| 183 |
+
</div>
|
| 184 |
+
</div>
|
| 185 |
+
<p class="text-center text-gray-500 mt-6 text-sm">© 2023 CinéDashboard. Tous droits réservés.</p>
|
| 186 |
+
</footer>
|
| 187 |
+
</div>
|
| 188 |
+
|
| 189 |
+
<script>
|
| 190 |
+
// Configuration
|
| 191 |
+
const API_KEY = 'fb437b10727a5a4eb8d9134e29c82ae0';
|
| 192 |
+
const BASE_URL = 'https://api.themoviedb.org/3';
|
| 193 |
+
const STREAMING_SERVERS = {
|
| 194 |
+
'server1': { name: 'Serveur Premium', icon: 'fas fa-bolt', color: 'bg-purple-600' },
|
| 195 |
+
'server2': { name: 'Serveur Rapide', icon: 'fas fa-tachometer-alt', color: 'bg-blue-600' },
|
| 196 |
+
'server3': { name: 'Serveur HD', icon: 'fas fa-high-definition', color: 'bg-green-600' },
|
| 197 |
+
'server4': { name: 'Serveur Backup', icon: 'fas fa-shield-alt', color: 'bg-yellow-600' }
|
| 198 |
+
};
|
| 199 |
+
|
| 200 |
+
let currentPage = 1;
|
| 201 |
+
let currentFilter = 'popular';
|
| 202 |
+
let currentYear = 'all';
|
| 203 |
+
let isLoading = false;
|
| 204 |
+
|
| 205 |
+
// DOM Elements
|
| 206 |
+
const moviesGrid = document.getElementById('movies-grid');
|
| 207 |
+
const loadMoreBtn = document.getElementById('load-more');
|
| 208 |
+
const moviesCount = document.getElementById('movies-count');
|
| 209 |
+
const avgRating = document.getElementById('avg-rating');
|
| 210 |
+
const lastUpdate = document.getElementById('last-update');
|
| 211 |
+
const trending = document.getElementById('trending');
|
| 212 |
+
const sectionTitle = document.getElementById('section-title');
|
| 213 |
+
const yearFilter = document.getElementById('year-filter');
|
| 214 |
+
const playerContainer = document.getElementById('player-container');
|
| 215 |
+
const moviePlayer = document.getElementById('movie-player');
|
| 216 |
+
const closePlayer = document.getElementById('close-player');
|
| 217 |
+
|
| 218 |
+
// Filter buttons
|
| 219 |
+
const filterPopular = document.getElementById('filter-popular');
|
| 220 |
+
const filterTop = document.getElementById('filter-top');
|
| 221 |
+
const filterUpcoming = document.getElementById('filter-upcoming');
|
| 222 |
+
|
| 223 |
+
// Initialize
|
| 224 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 225 |
+
// Set current date
|
| 226 |
+
const today = new Date();
|
| 227 |
+
lastUpdate.textContent = today.toLocaleDateString('fr-FR');
|
| 228 |
+
|
| 229 |
+
// Populate year filter
|
| 230 |
+
populateYearFilter();
|
| 231 |
+
|
| 232 |
+
// Load initial movies
|
| 233 |
+
loadMovies();
|
| 234 |
+
|
| 235 |
+
// Event listeners
|
| 236 |
+
loadMoreBtn.addEventListener('click', loadMoreMovies);
|
| 237 |
+
|
| 238 |
+
filterPopular.addEventListener('click', () => {
|
| 239 |
+
changeFilter('popular', 'Films populaires');
|
| 240 |
+
});
|
| 241 |
+
|
| 242 |
+
filterTop.addEventListener('click', () => {
|
| 243 |
+
changeFilter('top_rated', 'Top Rated');
|
| 244 |
+
});
|
| 245 |
+
|
| 246 |
+
filterUpcoming.addEventListener('click', () => {
|
| 247 |
+
changeFilter('upcoming', 'Prochainement');
|
| 248 |
+
});
|
| 249 |
+
|
| 250 |
+
yearFilter.addEventListener('change', (e) => {
|
| 251 |
+
currentYear = e.target.value;
|
| 252 |
+
currentPage = 1;
|
| 253 |
+
moviesGrid.innerHTML = createSkeletons(5);
|
| 254 |
+
loadMovies();
|
| 255 |
+
});
|
| 256 |
+
|
| 257 |
+
// Player events
|
| 258 |
+
closePlayer.addEventListener('click', () => {
|
| 259 |
+
playerContainer.style.display = 'none';
|
| 260 |
+
moviePlayer.src = '';
|
| 261 |
+
});
|
| 262 |
+
});
|
| 263 |
+
|
| 264 |
+
// Functions
|
| 265 |
+
function populateYearFilter() {
|
| 266 |
+
const currentYear = new Date().getFullYear();
|
| 267 |
+
for (let year = currentYear; year >= 2000; year--) {
|
| 268 |
+
const option = document.createElement('option');
|
| 269 |
+
option.value = year;
|
| 270 |
+
option.textContent = year;
|
| 271 |
+
yearFilter.appendChild(option);
|
| 272 |
+
}
|
| 273 |
+
}
|
| 274 |
+
|
| 275 |
+
function changeFilter(filter, title) {
|
| 276 |
+
currentFilter = filter;
|
| 277 |
+
currentPage = 1;
|
| 278 |
+
sectionTitle.textContent = title;
|
| 279 |
+
|
| 280 |
+
// Update active button
|
| 281 |
+
document.querySelectorAll('#filters button').forEach(btn => {
|
| 282 |
+
btn.classList.remove('bg-indigo-600', 'hover:bg-indigo-700');
|
| 283 |
+
btn.classList.add('bg-gray-700', 'hover:bg-gray-600');
|
| 284 |
+
});
|
| 285 |
+
|
| 286 |
+
event.target.classList.remove('bg-gray-700', 'hover:bg-gray-600');
|
| 287 |
+
event.target.classList.add('bg-indigo-600', 'hover:bg-indigo-700');
|
| 288 |
+
|
| 289 |
+
// Clear and reload movies
|
| 290 |
+
moviesGrid.innerHTML = createSkeletons(5);
|
| 291 |
+
loadMovies();
|
| 292 |
+
}
|
| 293 |
+
|
| 294 |
+
function createSkeletons(count) {
|
| 295 |
+
let skeletons = '';
|
| 296 |
+
for (let i = 0; i < count; i++) {
|
| 297 |
+
skeletons += `<div class="skeleton bg-gray-800 rounded-lg h-96"></div>`;
|
| 298 |
+
}
|
| 299 |
+
return skeletons;
|
| 300 |
+
}
|
| 301 |
+
|
| 302 |
+
async function loadMovies() {
|
| 303 |
+
if (isLoading) return;
|
| 304 |
+
|
| 305 |
+
isLoading = true;
|
| 306 |
+
loadMoreBtn.disabled = true;
|
| 307 |
+
loadMoreBtn.innerHTML = '<i class="fas fa-spinner fa-spin mr-2"></i> Chargement...';
|
| 308 |
+
|
| 309 |
+
try {
|
| 310 |
+
let url = `${BASE_URL}/movie/${currentFilter}?api_key=${API_KEY}&page=${currentPage}&language=fr-FR`;
|
| 311 |
+
|
| 312 |
+
if (currentYear !== 'all') {
|
| 313 |
+
url += `&primary_release_year=${currentYear}`;
|
| 314 |
+
}
|
| 315 |
+
|
| 316 |
+
const response = await fetch(url);
|
| 317 |
+
const data = await response.json();
|
| 318 |
+
|
| 319 |
+
if (currentPage === 1) {
|
| 320 |
+
moviesGrid.innerHTML = '';
|
| 321 |
+
// Update stats
|
| 322 |
+
moviesCount.textContent = data.total_results;
|
| 323 |
+
trending.textContent = data.total_results > 1000 ? 'Élevée' : 'Moyenne';
|
| 324 |
+
}
|
| 325 |
+
|
| 326 |
+
displayMovies(data.results);
|
| 327 |
+
|
| 328 |
+
// Calculate average rating
|
| 329 |
+
if (currentPage === 1) {
|
| 330 |
+
const ratings = data.results.map(movie => movie.vote_average);
|
| 331 |
+
const average = (ratings.reduce((a, b) => a + b, 0) / ratings.length).toFixed(1);
|
| 332 |
+
avgRating.textContent = average;
|
| 333 |
+
}
|
| 334 |
+
|
| 335 |
+
currentPage++;
|
| 336 |
+
|
| 337 |
+
// Hide load more button if we've reached the end
|
| 338 |
+
if (currentPage > data.total_pages) {
|
| 339 |
+
loadMoreBtn.style.display = 'none';
|
| 340 |
+
} else {
|
| 341 |
+
loadMoreBtn.style.display = 'flex';
|
| 342 |
+
}
|
| 343 |
+
} catch (error) {
|
| 344 |
+
console.error('Error fetching movies:', error);
|
| 345 |
+
moviesGrid.innerHTML = `
|
| 346 |
+
<div class="col-span-full text-center py-10">
|
| 347 |
+
<i class="fas fa-exclamation-triangle text-red-500 text-4xl mb-4"></i>
|
| 348 |
+
<h3 class="text-xl font-bold">Erreur de chargement</h3>
|
| 349 |
+
<p class="text-gray-400">Impossible de charger les films. Veuillez réessayer.</p>
|
| 350 |
+
</div>
|
| 351 |
+
`;
|
| 352 |
+
} finally {
|
| 353 |
+
isLoading = false;
|
| 354 |
+
loadMoreBtn.disabled = false;
|
| 355 |
+
loadMoreBtn.innerHTML = 'Charger plus de films';
|
| 356 |
+
}
|
| 357 |
+
}
|
| 358 |
+
|
| 359 |
+
function loadMoreMovies() {
|
| 360 |
+
loadMovies();
|
| 361 |
+
}
|
| 362 |
+
|
| 363 |
+
function displayMovies(movies) {
|
| 364 |
+
movies.forEach(movie => {
|
| 365 |
+
const movieCard = document.createElement('div');
|
| 366 |
+
movieCard.className = 'movie-card bg-gray-800 rounded-lg overflow-hidden shadow-lg hover:shadow-xl transition relative';
|
| 367 |
+
movieCard.innerHTML = `
|
| 368 |
+
<div class="relative h-80 overflow-hidden">
|
| 369 |
+
<img
|
| 370 |
+
src="${movie.poster_path ? `https://image.tmdb.org/t/p/w500${movie.poster_path}` : 'https://via.placeholder.com/500x750?text=No+Image'}"
|
| 371 |
+
alt="${movie.title}"
|
| 372 |
+
class="w-full h-full object-cover"
|
| 373 |
+
onerror="this.src='https://via.placeholder.com/500x750?text=No+Image'"
|
| 374 |
+
>
|
| 375 |
+
<div class="movie-overlay absolute inset-0 bg-black bg-opacity-70 opacity-0 flex flex-col justify-between p-4">
|
| 376 |
+
<div class="flex justify-between items-start">
|
| 377 |
+
<span class="bg-indigo-600 text-white text-xs font-bold px-2 py-1 rounded">
|
| 378 |
+
${movie.release_date ? movie.release_date.split('-')[0] : 'N/A'}
|
| 379 |
+
</span>
|
| 380 |
+
<span class="bg-yellow-500 text-gray-900 text-xs font-bold px-2 py-1 rounded flex items-center">
|
| 381 |
+
<i class="fas fa-star mr-1"></i> ${movie.vote_average.toFixed(1)}
|
| 382 |
+
</span>
|
| 383 |
+
</div>
|
| 384 |
+
<div>
|
| 385 |
+
<p class="text-sm text-gray-300 line-clamp-3">${movie.overview || 'Aucune description disponible.'}</p>
|
| 386 |
+
</div>
|
| 387 |
+
<div class="flex flex-col space-y-2">
|
| 388 |
+
<!-- Play button -->
|
| 389 |
+
<button class="play-btn bg-red-600 hover:bg-red-700 text-white px-3 py-2 rounded font-medium transition flex items-center justify-center w-full" data-movie-id="${movie.id}">
|
| 390 |
+
<i class="fas fa-play mr-2"></i> Regarder maintenant
|
| 391 |
+
</button>
|
| 392 |
+
|
| 393 |
+
<!-- Watch later button -->
|
| 394 |
+
<button class="watch-later-btn bg-indigo-600 hover:bg-indigo-700 text-white px-3 py-2 rounded font-medium transition flex items-center justify-center w-full">
|
| 395 |
+
<i class="fas fa-clock mr-2"></i> À regarder plus tard
|
| 396 |
+
</button>
|
| 397 |
+
|
| 398 |
+
<!-- Details button -->
|
| 399 |
+
<a href="https://www.themoviedb.org/movie/${movie.id}" target="_blank" class="bg-white text-gray-900 hover:bg-gray-200 px-3 py-2 rounded text-sm font-medium transition flex items-center justify-center">
|
| 400 |
+
<i class="fas fa-info-circle mr-2"></i> Détails
|
| 401 |
+
</a>
|
| 402 |
+
</div>
|
| 403 |
+
</div>
|
| 404 |
+
</div>
|
| 405 |
+
<div class="p-4">
|
| 406 |
+
<h3 class="font-bold text-lg mb-1 truncate">${movie.title}</h3>
|
| 407 |
+
<div class="flex justify-between items-center text-gray-400 text-sm">
|
| 408 |
+
<span>${movie.genre_ids.length ? 'Genre' : 'Pas de genre'}</span>
|
| 409 |
+
<span class="flex items-center">
|
| 410 |
+
<i class="fas fa-heart text-red-500 mr-1"></i> ${movie.popularity.toFixed(0)}
|
| 411 |
+
</span>
|
| 412 |
+
</div>
|
| 413 |
+
</div>
|
| 414 |
+
`;
|
| 415 |
+
moviesGrid.appendChild(movieCard);
|
| 416 |
+
|
| 417 |
+
// Add event listener to the play button
|
| 418 |
+
const playBtn = movieCard.querySelector('.play-btn');
|
| 419 |
+
playBtn.addEventListener('click', () => showStreamingOptions(movie));
|
| 420 |
+
});
|
| 421 |
+
}
|
| 422 |
+
|
| 423 |
+
function showStreamingOptions(movie) {
|
| 424 |
+
// Create modal for server selection
|
| 425 |
+
const modal = document.createElement('div');
|
| 426 |
+
modal.className = 'fixed inset-0 bg-black bg-opacity-80 flex items-center justify-center z-50';
|
| 427 |
+
modal.innerHTML = `
|
| 428 |
+
<div class="bg-gray-800 rounded-lg p-6 w-full max-w-md">
|
| 429 |
+
<div class="flex justify-between items-center mb-4">
|
| 430 |
+
<h3 class="text-xl font-bold">Choisissez un serveur</h3>
|
| 431 |
+
<button class="close-modal text-gray-400 hover:text-white">
|
| 432 |
+
<i class="fas fa-times"></i>
|
| 433 |
+
</button>
|
| 434 |
+
</div>
|
| 435 |
+
<p class="text-gray-400 mb-4">Sélectionnez un serveur pour regarder "${movie.title}"</p>
|
| 436 |
+
|
| 437 |
+
<div class="grid grid-cols-2 gap-3 mb-4" id="server-buttons">
|
| 438 |
+
${Object.entries(STREAMING_SERVERS).map(([key, server]) => `
|
| 439 |
+
<button class="server-btn ${server.color} hover:${server.color.replace('600', '700')} text-white px-4 py-3 rounded-lg transition flex flex-col items-center" data-server="${key}">
|
| 440 |
+
<i class="${server.icon} text-xl mb-1"></i>
|
| 441 |
+
<span>${server.name}</span>
|
| 442 |
+
</button>
|
| 443 |
+
`).join('')}
|
| 444 |
+
</div>
|
| 445 |
+
|
| 446 |
+
<div class="bg-gray-700 rounded-lg p-4 hidden" id="quality-options">
|
| 447 |
+
<h4 class="font-medium mb-2">Qualité disponible :</h4>
|
| 448 |
+
<div class="flex space-x-2">
|
| 449 |
+
<button class="quality-btn bg-indigo-600 hover:bg-indigo-700 text-white px-3 py-1 rounded" data-quality="1080">1080p</button>
|
| 450 |
+
<button class="quality-btn bg-indigo-600 hover:bg-indigo-700 text-white px-3 py-1 rounded" data-quality="720">720p</button>
|
| 451 |
+
<button class="quality-btn bg-indigo-600 hover:bg-indigo-700 text-white px-3 py-1 rounded" data-quality="480">480p</button>
|
| 452 |
+
</div>
|
| 453 |
+
</div>
|
| 454 |
+
</div>
|
| 455 |
+
`;
|
| 456 |
+
|
| 457 |
+
document.body.appendChild(modal);
|
| 458 |
+
|
| 459 |
+
// Close modal
|
| 460 |
+
const closeModal = modal.querySelector('.close-modal');
|
| 461 |
+
closeModal.addEventListener('click', () => {
|
| 462 |
+
document.body.removeChild(modal);
|
| 463 |
+
});
|
| 464 |
+
|
| 465 |
+
// Server selection
|
| 466 |
+
const serverButtons = modal.querySelectorAll('.server-btn');
|
| 467 |
+
const qualityOptions = modal.querySelector('#quality-options');
|
| 468 |
+
|
| 469 |
+
serverButtons.forEach(btn => {
|
| 470 |
+
btn.addEventListener('click', () => {
|
| 471 |
+
// Highlight selected server
|
| 472 |
+
serverButtons.forEach(b => b.classList.remove('ring-2', 'ring-white'));
|
| 473 |
+
btn.classList.add('ring-2', 'ring-white');
|
| 474 |
+
|
| 475 |
+
// Show quality options
|
| 476 |
+
qualityOptions.classList.remove('hidden');
|
| 477 |
+
|
| 478 |
+
// When quality is selected
|
| 479 |
+
const qualityBtns = qualityOptions.querySelectorAll('.quality-btn');
|
| 480 |
+
qualityBtns.forEach(qBtn => {
|
| 481 |
+
qBtn.addEventListener('click', () => {
|
| 482 |
+
const quality = qBtn.dataset.quality;
|
| 483 |
+
playMovie(movie, btn.dataset.server, quality);
|
| 484 |
+
document.body.removeChild(modal);
|
| 485 |
+
});
|
| 486 |
+
});
|
| 487 |
+
});
|
| 488 |
+
});
|
| 489 |
+
}
|
| 490 |
+
|
| 491 |
+
function playMovie(movie, server, quality) {
|
| 492 |
+
// Generate a streaming URL based on movie ID, server and quality
|
| 493 |
+
// Note: This is a simulation - in a real app, you would need actual streaming URLs
|
| 494 |
+
const streamingUrl = `https://example-stream-provider.com/player?movie_id=${movie.id}&server=${server}&quality=${quality}`;
|
| 495 |
+
|
| 496 |
+
// Show player container
|
| 497 |
+
playerContainer.style.display = 'flex';
|
| 498 |
+
|
| 499 |
+
// Set iframe source
|
| 500 |
+
moviePlayer.src = streamingUrl;
|
| 501 |
+
|
| 502 |
+
// Update stats (simulate view count)
|
| 503 |
+
const moviesCountEl = document.getElementById('movies-count');
|
| 504 |
+
moviesCountEl.textContent = parseInt(moviesCountEl.textContent) + 1;
|
| 505 |
+
|
| 506 |
+
// Add to recently watched in localStorage
|
| 507 |
+
const watched = JSON.parse(localStorage.getItem('recentlyWatched') || '[]');
|
| 508 |
+
watched.unshift({
|
| 509 |
+
id: movie.id,
|
| 510 |
+
title: movie.title,
|
| 511 |
+
poster: movie.poster_path ? `https://image.tmdb.org/t/p/w200${movie.poster_path}` : null,
|
| 512 |
+
date: new Date().toISOString()
|
| 513 |
+
});
|
| 514 |
+
localStorage.setItem('recentlyWatched', JSON.stringify(watched.slice(0, 10)));
|
| 515 |
+
}
|
| 516 |
+
</script>
|
| 517 |
+
<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/cin" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 518 |
+
</html>
|
prompts.txt
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
ajouter un tableau de bord avec une importation des films et les url des film en automatique je veux pas des films ou des lien d'exemple je veut importer des vrais films avec leurs liens intégré par systéme robotisé en automatique : Jeton d'accès en lecture à l'API eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJmYjQzN2IxMDcyN2E1YTRlYjhkOTEzNGUyOWM4MmFlMCIsIm5iZiI6MTY4MDYzNzkxMC44NjUsInN1YiI6IjY0MmM3ZmQ2OGI5NTllMDBmNDRkNzNhMCIsInNjb3BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIjoxfQ.Nhl261Ha3z0Ujg5vM1PpFoZBiTGjlXQ1g9VFPh6dVvs Clé d'API fb437b10727a5a4eb8d9134e29c82ae0
|
| 2 |
+
ajouté les boutons play et a regarder avec leur serveur et leur lecteurs puissant intégré en automatique
|