Add 2 files
Browse files- README.md +7 -5
- index.html +482 -19
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: test-apps
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: pink
|
| 5 |
+
colorTo: yellow
|
| 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,482 @@
|
|
| 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>AutoMarket - Vente de véhicules</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 |
+
/* Animation pour le chargement */
|
| 11 |
+
@keyframes fadeIn {
|
| 12 |
+
from { opacity: 0; transform: translateY(10px); }
|
| 13 |
+
to { opacity: 1; transform: translateY(0); }
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
.fade-in {
|
| 17 |
+
animation: fadeIn 0.5s ease-out forwards;
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
/* Style personnalisé pour les cartes */
|
| 21 |
+
.vehicle-card {
|
| 22 |
+
transition: all 0.3s ease;
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
.vehicle-card:hover {
|
| 26 |
+
transform: translateY(-5px);
|
| 27 |
+
box-shadow: 0 10px 20px rgba(0,0,0,0.1);
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
/* Style pour la navbar fixe */
|
| 31 |
+
.bottom-navbar {
|
| 32 |
+
box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
|
| 33 |
+
}
|
| 34 |
+
</style>
|
| 35 |
+
</head>
|
| 36 |
+
<body class="bg-gray-50 font-sans">
|
| 37 |
+
<!-- Container principal -->
|
| 38 |
+
<div class="max-w-md mx-auto bg-white min-h-screen relative pb-16">
|
| 39 |
+
<!-- Header -->
|
| 40 |
+
<header class="bg-blue-600 text-white p-4 shadow-md">
|
| 41 |
+
<div class="flex justify-between items-center">
|
| 42 |
+
<div class="flex items-center space-x-2">
|
| 43 |
+
<i class="fas fa-car text-2xl"></i>
|
| 44 |
+
<h1 class="text-xl font-bold">AutoMarket</h1>
|
| 45 |
+
</div>
|
| 46 |
+
<div class="flex space-x-4">
|
| 47 |
+
<button class="relative">
|
| 48 |
+
<i class="fas fa-bell text-xl"></i>
|
| 49 |
+
<span class="absolute -top-1 -right-1 bg-red-500 text-white text-xs rounded-full h-4 w-4 flex items-center justify-center">3</span>
|
| 50 |
+
</button>
|
| 51 |
+
<button>
|
| 52 |
+
<i class="fas fa-search text-xl"></i>
|
| 53 |
+
</button>
|
| 54 |
+
</div>
|
| 55 |
+
</div>
|
| 56 |
+
</header>
|
| 57 |
+
|
| 58 |
+
<!-- Contenu principal (changé dynamiquement) -->
|
| 59 |
+
<main id="app-content" class="p-4">
|
| 60 |
+
<!-- Page d'accueil par défaut -->
|
| 61 |
+
<div id="home-page">
|
| 62 |
+
<!-- Bannière promotionnelle -->
|
| 63 |
+
<div class="bg-gradient-to-r from-blue-500 to-blue-600 rounded-xl p-4 text-white mb-6 fade-in">
|
| 64 |
+
<h2 class="text-xl font-bold mb-2">Promotions du mois</h2>
|
| 65 |
+
<p class="text-sm mb-3">Jusqu'à -20% sur les véhicules neufs</p>
|
| 66 |
+
<button class="bg-white text-blue-600 px-4 py-1 rounded-full text-sm font-semibold">Voir les offres</button>
|
| 67 |
+
</div>
|
| 68 |
+
|
| 69 |
+
<!-- Catégories -->
|
| 70 |
+
<h2 class="text-lg font-semibold mb-3">Catégories</h2>
|
| 71 |
+
<div class="grid grid-cols-2 gap-3 mb-6">
|
| 72 |
+
<div class="bg-gray-100 p-4 rounded-lg text-center fade-in" style="animation-delay: 0.1s;">
|
| 73 |
+
<i class="fas fa-car text-3xl text-blue-500 mb-2"></i>
|
| 74 |
+
<p class="font-medium">Neuf</p>
|
| 75 |
+
</div>
|
| 76 |
+
<div class="bg-gray-100 p-4 rounded-lg text-center fade-in" style="animation-delay: 0.2s;">
|
| 77 |
+
<i class="fas fa-car-side text-3xl text-green-500 mb-2"></i>
|
| 78 |
+
<p class="font-medium">Occasion</p>
|
| 79 |
+
</div>
|
| 80 |
+
<div class="bg-gray-100 p-4 rounded-lg text-center fade-in" style="animation-delay: 0.3s;">
|
| 81 |
+
<i class="fas fa-truck-pickup text-3xl text-orange-500 mb-2"></i>
|
| 82 |
+
<p class="font-medium">Utilitaires</p>
|
| 83 |
+
</div>
|
| 84 |
+
<div class="bg-gray-100 p-4 rounded-lg text-center fade-in" style="animation-delay: 0.4s;">
|
| 85 |
+
<i class="fas fa-motorcycle text-3xl text-purple-500 mb-2"></i>
|
| 86 |
+
<p class="font-medium">Motos</p>
|
| 87 |
+
</div>
|
| 88 |
+
</div>
|
| 89 |
+
|
| 90 |
+
<!-- Véhicules récents -->
|
| 91 |
+
<h2 class="text-lg font-semibold mb-3">Nos meilleures offres</h2>
|
| 92 |
+
<div class="space-y-4">
|
| 93 |
+
<!-- Véhicule 1 -->
|
| 94 |
+
<div class="vehicle-card bg-white rounded-xl overflow-hidden shadow-md fade-in" style="animation-delay: 0.1s;" onclick="showVehicleDetails(1)">
|
| 95 |
+
<div class="relative">
|
| 96 |
+
<img src="https://images.unsplash.com/photo-1494976388531-d1058494cdd8?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1170&q=80" alt="Voiture" class="w-full h-40 object-cover">
|
| 97 |
+
<span class="absolute top-2 left-2 bg-blue-500 text-white text-xs px-2 py-1 rounded-full">Neuf</span>
|
| 98 |
+
<span class="absolute top-2 right-2 bg-red-500 text-white text-xs px-2 py-1 rounded-full">-15%</span>
|
| 99 |
+
</div>
|
| 100 |
+
<div class="p-3">
|
| 101 |
+
<h3 class="font-bold">Peugeot 208</h3>
|
| 102 |
+
<div class="flex justify-between items-center mt-2">
|
| 103 |
+
<div>
|
| 104 |
+
<p class="text-gray-600 text-sm"><i class="fas fa-gas-pump mr-1"></i> Essence</p>
|
| 105 |
+
<p class="text-gray-600 text-sm"><i class="fas fa-tachometer-alt mr-1"></i> 15 000 km</p>
|
| 106 |
+
</div>
|
| 107 |
+
<p class="text-lg font-bold text-blue-600">18 990 €</p>
|
| 108 |
+
</div>
|
| 109 |
+
</div>
|
| 110 |
+
</div>
|
| 111 |
+
|
| 112 |
+
<!-- Véhicule 2 -->
|
| 113 |
+
<div class="vehicle-card bg-white rounded-xl overflow-hidden shadow-md fade-in" style="animation-delay: 0.2s;" onclick="showVehicleDetails(2)">
|
| 114 |
+
<div class="relative">
|
| 115 |
+
<img src="https://images.unsplash.com/photo-1503376780353-7e6692767b70?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1170&q=80" alt="Voiture" class="w-full h-40 object-cover">
|
| 116 |
+
<span class="absolute top-2 left-2 bg-green-500 text-white text-xs px-2 py-1 rounded-full">Occasion</span>
|
| 117 |
+
</div>
|
| 118 |
+
<div class="p-3">
|
| 119 |
+
<h3 class="font-bold">Audi A5 Sportback</h3>
|
| 120 |
+
<div class="flex justify-between items-center mt-2">
|
| 121 |
+
<div>
|
| 122 |
+
<p class="text-gray-600 text-sm"><i class="fas fa-gas-pump mr-1"></i> Diesel</p>
|
| 123 |
+
<p class="text-gray-600 text-sm"><i class="fas fa-tachometer-alt mr-1"></i> 45 000 km</p>
|
| 124 |
+
</div>
|
| 125 |
+
<p class="text-lg font-bold text-blue-600">32 500 €</p>
|
| 126 |
+
</div>
|
| 127 |
+
</div>
|
| 128 |
+
</div>
|
| 129 |
+
</div>
|
| 130 |
+
</div>
|
| 131 |
+
|
| 132 |
+
<!-- Page de liste des véhicules (cachée par défaut) -->
|
| 133 |
+
<div id="vehicles-page" class="hidden">
|
| 134 |
+
<div class="flex justify-between items-center mb-4">
|
| 135 |
+
<h2 class="text-xl font-bold">Nos véhicules</h2>
|
| 136 |
+
<div class="flex space-x-2">
|
| 137 |
+
<button class="bg-gray-200 p-2 rounded-lg">
|
| 138 |
+
<i class="fas fa-sliders-h"></i>
|
| 139 |
+
</button>
|
| 140 |
+
<button class="bg-gray-200 p-2 rounded-lg">
|
| 141 |
+
<i class="fas fa-map-marker-alt"></i>
|
| 142 |
+
</button>
|
| 143 |
+
</div>
|
| 144 |
+
</div>
|
| 145 |
+
|
| 146 |
+
<div class="mb-4">
|
| 147 |
+
<div class="flex overflow-x-auto space-x-2 pb-2">
|
| 148 |
+
<button class="bg-blue-600 text-white px-4 py-1 rounded-full text-sm whitespace-nowrap">Tous</button>
|
| 149 |
+
<button class="bg-gray-200 px-4 py-1 rounded-full text-sm whitespace-nowrap">Neuf</button>
|
| 150 |
+
<button class="bg-gray-200 px-4 py-1 rounded-full text-sm whitespace-nowrap">Occasion</button>
|
| 151 |
+
<button class="bg-gray-200 px-4 py-1 rounded-full text-sm whitespace-nowrap">Petit budget</button>
|
| 152 |
+
<button class="bg-gray-200 px-4 py-1 rounded-full text-sm whitespace-nowrap">Familiale</button>
|
| 153 |
+
</div>
|
| 154 |
+
</div>
|
| 155 |
+
|
| 156 |
+
<div class="space-y-4" id="vehicles-list">
|
| 157 |
+
<!-- Les véhicules seront chargés ici via JavaScript -->
|
| 158 |
+
</div>
|
| 159 |
+
</div>
|
| 160 |
+
|
| 161 |
+
<!-- Page de détails d'un véhicule (cachée par défaut) -->
|
| 162 |
+
<div id="vehicle-details-page" class="hidden">
|
| 163 |
+
<!-- Le contenu sera chargé dynamiquement via JavaScript -->
|
| 164 |
+
</div>
|
| 165 |
+
|
| 166 |
+
<!-- Page favoris (cachée par défaut) -->
|
| 167 |
+
<div id="favorites-page" class="hidden">
|
| 168 |
+
<h2 class="text-xl font-bold mb-4">Vos favoris</h2>
|
| 169 |
+
<div class="text-center py-10">
|
| 170 |
+
<i class="fas fa-heart text-4xl text-gray-300 mb-2"></i>
|
| 171 |
+
<p class="text-gray-500">Vous n'avez pas encore de favoris</p>
|
| 172 |
+
<button class="mt-4 bg-blue-600 text-white px-6 py-2 rounded-full">Parcourir les véhicules</button>
|
| 173 |
+
</div>
|
| 174 |
+
</div>
|
| 175 |
+
|
| 176 |
+
<!-- Page compte (cachée par défaut) -->
|
| 177 |
+
<div id="account-page" class="hidden">
|
| 178 |
+
<div class="flex items-center space-x-4 mb-6">
|
| 179 |
+
<div class="h-16 w-16 bg-blue-100 rounded-full flex items-center justify-center">
|
| 180 |
+
<i class="fas fa-user text-2xl text-blue-600"></i>
|
| 181 |
+
</div>
|
| 182 |
+
<div>
|
| 183 |
+
<h2 class="font-bold">Jean Dupont</h2>
|
| 184 |
+
<p class="text-gray-600 text-sm">Membre depuis 2022</p>
|
| 185 |
+
</div>
|
| 186 |
+
</div>
|
| 187 |
+
|
| 188 |
+
<div class="space-y-4">
|
| 189 |
+
<div class="bg-gray-100 p-4 rounded-lg">
|
| 190 |
+
<h3 class="font-semibold mb-2">Mes informations</h3>
|
| 191 |
+
<p class="text-sm text-gray-600"><i class="fas fa-envelope mr-2"></i> jean.dupont@example.com</p>
|
| 192 |
+
<p class="text-sm text-gray-600 mt-1"><i class="fas fa-phone mr-2"></i> +33 6 12 34 56 78</p>
|
| 193 |
+
</div>
|
| 194 |
+
|
| 195 |
+
<div class="bg-gray-100 p-4 rounded-lg">
|
| 196 |
+
<h3 class="font-semibold mb-2">Préférences</h3>
|
| 197 |
+
<p class="text-sm text-gray-600"><i class="fas fa-bell mr-2"></i> Notifications activées</p>
|
| 198 |
+
<p class="text-sm text-gray-600 mt-1"><i class="fas fa-moon mr-2"></i> Mode sombre</p>
|
| 199 |
+
</div>
|
| 200 |
+
|
| 201 |
+
<button class="w-full bg-red-100 text-red-600 p-3 rounded-lg font-medium">
|
| 202 |
+
<i class="fas fa-sign-out-alt mr-2"></i> Déconnexion
|
| 203 |
+
</button>
|
| 204 |
+
</div>
|
| 205 |
+
</div>
|
| 206 |
+
</main>
|
| 207 |
+
|
| 208 |
+
<!-- Navigation inférieure -->
|
| 209 |
+
<nav class="bottom-navbar fixed bottom-0 left-0 right-0 bg-white border-t border-gray-200 max-w-md mx-auto">
|
| 210 |
+
<div class="flex justify-around">
|
| 211 |
+
<button class="p-4 text-blue-600" onclick="showPage('home-page')">
|
| 212 |
+
<i class="fas fa-home text-xl"></i>
|
| 213 |
+
</button>
|
| 214 |
+
<button class="p-4 text-gray-500" onclick="showPage('vehicles-page'); loadVehicles()">
|
| 215 |
+
<i class="fas fa-car text-xl"></i>
|
| 216 |
+
</button>
|
| 217 |
+
<button class="p-4 text-gray-500" onclick="showPage('favorites-page')">
|
| 218 |
+
<i class="fas fa-heart text-xl"></i>
|
| 219 |
+
</button>
|
| 220 |
+
<button class="p-4 text-gray-500" onclick="showPage('account-page')">
|
| 221 |
+
<i class="fas fa-user text-xl"></i>
|
| 222 |
+
</button>
|
| 223 |
+
</div>
|
| 224 |
+
</nav>
|
| 225 |
+
</div>
|
| 226 |
+
|
| 227 |
+
<script>
|
| 228 |
+
// Fonction pour afficher une page et masquer les autres
|
| 229 |
+
function showPage(pageId) {
|
| 230 |
+
// Masquer toutes les pages
|
| 231 |
+
document.querySelectorAll('#app-content > div').forEach(page => {
|
| 232 |
+
page.classList.add('hidden');
|
| 233 |
+
});
|
| 234 |
+
|
| 235 |
+
// Afficher la page demandée
|
| 236 |
+
document.getElementById(pageId).classList.remove('hidden');
|
| 237 |
+
|
| 238 |
+
// Mettre à jour la navigation active
|
| 239 |
+
document.querySelectorAll('.bottom-navbar button').forEach(btn => {
|
| 240 |
+
btn.classList.remove('text-blue-600');
|
| 241 |
+
btn.classList.add('text-gray-500');
|
| 242 |
+
});
|
| 243 |
+
|
| 244 |
+
// Trouver le bouton correspondant et le marquer comme actif
|
| 245 |
+
const navButtons = document.querySelectorAll('.bottom-navbar button');
|
| 246 |
+
for (let i = 0; i < navButtons.length; i++) {
|
| 247 |
+
if (navButtons[i].getAttribute('onclick').includes(pageId)) {
|
| 248 |
+
navButtons[i].classList.remove('text-gray-500');
|
| 249 |
+
navButtons[i].classList.add('text-blue-600');
|
| 250 |
+
break;
|
| 251 |
+
}
|
| 252 |
+
}
|
| 253 |
+
}
|
| 254 |
+
|
| 255 |
+
// Fonction pour charger les véhicules dans la page de liste
|
| 256 |
+
function loadVehicles() {
|
| 257 |
+
const vehicles = [
|
| 258 |
+
{
|
| 259 |
+
id: 1,
|
| 260 |
+
image: "https://images.unsplash.com/photo-1494976388531-d1058494cdd8?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1170&q=80",
|
| 261 |
+
type: "Neuf",
|
| 262 |
+
promotion: "-15%",
|
| 263 |
+
name: "Peugeot 208",
|
| 264 |
+
fuel: "Essence",
|
| 265 |
+
km: "15 000 km",
|
| 266 |
+
price: "18 990 €"
|
| 267 |
+
},
|
| 268 |
+
{
|
| 269 |
+
id: 2,
|
| 270 |
+
image: "https://images.unsplash.com/photo-1503376780353-7e6692767b70?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1170&q=80",
|
| 271 |
+
type: "Occasion",
|
| 272 |
+
promotion: null,
|
| 273 |
+
name: "Audi A5 Sportback",
|
| 274 |
+
fuel: "Diesel",
|
| 275 |
+
km: "45 000 km",
|
| 276 |
+
price: "32 500 €"
|
| 277 |
+
},
|
| 278 |
+
{
|
| 279 |
+
id: 3,
|
| 280 |
+
image: "https://images.unsplash.com/photo-1541899481282-d53b3e38e9a1?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1170&q=80",
|
| 281 |
+
type: "Neuf",
|
| 282 |
+
promotion: "-10%",
|
| 283 |
+
name: "Renault Clio",
|
| 284 |
+
fuel: "Essence",
|
| 285 |
+
km: "5 000 km",
|
| 286 |
+
price: "16 800 €"
|
| 287 |
+
},
|
| 288 |
+
{
|
| 289 |
+
id: 4,
|
| 290 |
+
image: "https://images.unsplash.com/photo-1550355291-bbee04a92027?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1136&q=80",
|
| 291 |
+
type: "Occasion",
|
| 292 |
+
promotion: null,
|
| 293 |
+
name: "Volkswagen Golf",
|
| 294 |
+
fuel: "Diesel",
|
| 295 |
+
km: "80 000 km",
|
| 296 |
+
price: "14 200 €"
|
| 297 |
+
}
|
| 298 |
+
];
|
| 299 |
+
|
| 300 |
+
const container = document.getElementById('vehicles-list');
|
| 301 |
+
container.innerHTML = '';
|
| 302 |
+
|
| 303 |
+
vehicles.forEach(vehicle => {
|
| 304 |
+
const vehicleCard = document.createElement('div');
|
| 305 |
+
vehicleCard.className = 'vehicle-card bg-white rounded-xl overflow-hidden shadow-md';
|
| 306 |
+
vehicleCard.onclick = () => showVehicleDetails(vehicle.id);
|
| 307 |
+
|
| 308 |
+
vehicleCard.innerHTML = `
|
| 309 |
+
<div class="relative">
|
| 310 |
+
<img src="${vehicle.image}" alt="Voiture" class="w-full h-40 object-cover">
|
| 311 |
+
<span class="absolute top-2 left-2 ${vehicle.type === 'Neuf' ? 'bg-blue-500' : 'bg-green-500'} text-white text-xs px-2 py-1 rounded-full">${vehicle.type}</span>
|
| 312 |
+
${vehicle.promotion ? `<span class="absolute top-2 right-2 bg-red-500 text-white text-xs px-2 py-1 rounded-full">${vehicle.promotion}</span>` : ''}
|
| 313 |
+
</div>
|
| 314 |
+
<div class="p-3">
|
| 315 |
+
<h3 class="font-bold">${vehicle.name}</h3>
|
| 316 |
+
<div class="flex justify-between items-center mt-2">
|
| 317 |
+
<div>
|
| 318 |
+
<p class="text-gray-600 text-sm"><i class="fas fa-gas-pump mr-1"></i> ${vehicle.fuel}</p>
|
| 319 |
+
<p class="text-gray-600 text-sm"><i class="fas fa-tachometer-alt mr-1"></i> ${vehicle.km}</p>
|
| 320 |
+
</div>
|
| 321 |
+
<p class="text-lg font-bold text-blue-600">${vehicle.price}</p>
|
| 322 |
+
</div>
|
| 323 |
+
</div>
|
| 324 |
+
`;
|
| 325 |
+
|
| 326 |
+
container.appendChild(vehicleCard);
|
| 327 |
+
});
|
| 328 |
+
}
|
| 329 |
+
|
| 330 |
+
// Fonction pour afficher les détails d'un véhicule
|
| 331 |
+
function showVehicleDetails(vehicleId) {
|
| 332 |
+
// Simuler des données de véhicule
|
| 333 |
+
const vehicle = {
|
| 334 |
+
id: vehicleId,
|
| 335 |
+
images: [
|
| 336 |
+
"https://images.unsplash.com/photo-1494976388531-d1058494cdd8?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1170&q=80",
|
| 337 |
+
"https://images.unsplash.com/photo-1502877338535-766e1452684a?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1172&q=80",
|
| 338 |
+
"https://images.unsplash.com/photo-1502161254066-6c74afbf07aa?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1171&q=80"
|
| 339 |
+
],
|
| 340 |
+
name: vehicleId === 1 ? "Peugeot 208 GT Line" : "Audi A5 Sportback",
|
| 341 |
+
year: vehicleId === 1 ? "2022" : "2020",
|
| 342 |
+
price: vehicleId === 1 ? "18 990 €" : "32 500 €",
|
| 343 |
+
originalPrice: vehicleId === 1 ? "22 300 €" : "34 000 €",
|
| 344 |
+
type: vehicleId === 1 ? "Neuf" : "Occasion",
|
| 345 |
+
fuel: vehicleId === 1 ? "Essence" : "Diesel",
|
| 346 |
+
km: vehicleId === 1 ? "15 000 km" : "45 000 km",
|
| 347 |
+
power: vehicleId === 1 ? "100 ch" : "190 ch",
|
| 348 |
+
transmission: vehicleId === 1 ? "Manuelle" : "Automatique",
|
| 349 |
+
color: vehicleId === 1 ? "Gris Nacré" : "Noir",
|
| 350 |
+
description: vehicleId === 1
|
| 351 |
+
? "Peugeot 208 GT Line 1.2 PureTech 100ch BVM6, livrée avec de nombreux équipements : jantes alliage 17\", climatisation automatique, régulateur de vitesse, caméra de recul, écran tactile 7\", etc."
|
| 352 |
+
: "Audi A5 Sportback 2.0 TDI 190ch S-tronic, finition S Line avec pack design, intérieur cuir, système de navigation MMI, phones LED, etc. Véhicule en excellent état.",
|
| 353 |
+
seller: {
|
| 354 |
+
name: vehicleId === 1 ? "Concessionnaire AutoPlus" : "Garage Prestige Auto",
|
| 355 |
+
rating: vehicleId === 1 ? "4.8" : "4.6",
|
| 356 |
+
reviews: vehicleId === 1 ? "124 avis" : "87 avis",
|
| 357 |
+
phone: vehicleId === 1 ? "01 23 45 67 89" : "02 34 56 78 90"
|
| 358 |
+
}
|
| 359 |
+
};
|
| 360 |
+
|
| 361 |
+
const container = document.getElementById('vehicle-details-page');
|
| 362 |
+
container.innerHTML = '';
|
| 363 |
+
|
| 364 |
+
// Créer le contenu de la page de détails
|
| 365 |
+
container.innerHTML = `
|
| 366 |
+
<div class="mb-4">
|
| 367 |
+
<button onclick="showPage('vehicles-page')" class="mb-4 text-blue-600">
|
| 368 |
+
<i class="fas fa-arrow-left mr-1"></i> Retour
|
| 369 |
+
</button>
|
| 370 |
+
|
| 371 |
+
<!-- Carrousel d'images -->
|
| 372 |
+
<div class="relative h-48 bg-gray-200 rounded-xl overflow-hidden mb-4">
|
| 373 |
+
<img src="${vehicle.images[0]}" alt="${vehicle.name}" class="w-full h-full object-cover">
|
| 374 |
+
<div class="absolute bottom-2 left-0 right-0 flex justify-center space-x-1">
|
| 375 |
+
${vehicle.images.map((_, i) => `<div class="w-2 h-2 rounded-full ${i === 0 ? 'bg-blue-500' : 'bg-gray-300'}"></div>`).join('')}
|
| 376 |
+
</div>
|
| 377 |
+
</div>
|
| 378 |
+
|
| 379 |
+
<!-- Titre et prix -->
|
| 380 |
+
<div class="flex justify-between items-start mb-2">
|
| 381 |
+
<div>
|
| 382 |
+
<h1 class="text-xl font-bold">${vehicle.name}</h1>
|
| 383 |
+
<p class="text-gray-600">${vehicle.year} • ${vehicle.km} • ${vehicle.fuel}</p>
|
| 384 |
+
</div>
|
| 385 |
+
<div class="text-right">
|
| 386 |
+
<p class="text-xl font-bold text-blue-600">${vehicle.price}</p>
|
| 387 |
+
${vehicle.originalPrice ? `<p class="text-sm text-gray-500 line-through">${vehicle.originalPrice}</p>` : ''}
|
| 388 |
+
</div>
|
| 389 |
+
</div>
|
| 390 |
+
|
| 391 |
+
<!-- Badges -->
|
| 392 |
+
<div class="flex flex-wrap gap-2 mb-4">
|
| 393 |
+
<span class="bg-blue-100 text-blue-800 text-xs px-2 py-1 rounded">${vehicle.type}</span>
|
| 394 |
+
<span class="bg-green-100 text-green-800 text-xs px-2 py-1 rounded">${vehicle.power}</span>
|
| 395 |
+
<span class="bg-purple-100 text-purple-800 text-xs px-2 py-1 rounded">${vehicle.transmission}</span>
|
| 396 |
+
<span class="bg-yellow-100 text-yellow-800 text-xs px-2 py-1 rounded">${vehicle.color}</span>
|
| 397 |
+
</div>
|
| 398 |
+
|
| 399 |
+
<!-- Description -->
|
| 400 |
+
<div class="mb-6">
|
| 401 |
+
<h2 class="font-semibold mb-2">Description</h2>
|
| 402 |
+
<p class="text-gray-700">${vehicle.description}</p>
|
| 403 |
+
</div>
|
| 404 |
+
|
| 405 |
+
<!-- Caractéristiques -->
|
| 406 |
+
<div class="mb-6">
|
| 407 |
+
<h2 class="font-semibold mb-3">Caractéristiques</h2>
|
| 408 |
+
<div class="grid grid-cols-2 gap-3">
|
| 409 |
+
<div class="bg-gray-100 p-3 rounded-lg">
|
| 410 |
+
<p class="text-sm text-gray-600">Type</p>
|
| 411 |
+
<p class="font-medium">${vehicle.type}</p>
|
| 412 |
+
</div>
|
| 413 |
+
<div class="bg-gray-100 p-3 rounded-lg">
|
| 414 |
+
<p class="text-sm text-gray-600">Année</p>
|
| 415 |
+
<p class="font-medium">${vehicle.year}</p>
|
| 416 |
+
</div>
|
| 417 |
+
<div class="bg-gray-100 p-3 rounded-lg">
|
| 418 |
+
<p class="text-sm text-gray-600">Kilométrage</p>
|
| 419 |
+
<p class="font-medium">${vehicle.km}</p>
|
| 420 |
+
</div>
|
| 421 |
+
<div class="bg-gray-100 p-3 rounded-lg">
|
| 422 |
+
<p class="text-sm text-gray-600">Carburant</p>
|
| 423 |
+
<p class="font-medium">${vehicle.fuel}</p>
|
| 424 |
+
</div>
|
| 425 |
+
<div class="bg-gray-100 p-3 rounded-lg">
|
| 426 |
+
<p class="text-sm text-gray-600">Puissance</p>
|
| 427 |
+
<p class="font-medium">${vehicle.power}</p>
|
| 428 |
+
</div>
|
| 429 |
+
<div class="bg-gray-100 p-3 rounded-lg">
|
| 430 |
+
<p class="text-sm text-gray-600">Transmission</p>
|
| 431 |
+
<p class="font-medium">${vehicle.transmission}</p>
|
| 432 |
+
</div>
|
| 433 |
+
</div>
|
| 434 |
+
</div>
|
| 435 |
+
|
| 436 |
+
<!-- Vendeur -->
|
| 437 |
+
<div class="mb-6">
|
| 438 |
+
<h2 class="font-semibold mb-3">Vendeur</h2>
|
| 439 |
+
<div class="bg-gray-100 p-4 rounded-lg">
|
| 440 |
+
<div class="flex items-center justify-between mb-2">
|
| 441 |
+
<div class="flex items-center space-x-3">
|
| 442 |
+
<div class="h-10 w-10 bg-blue-500 rounded-full flex items-center justify-center text-white">
|
| 443 |
+
<i class="fas fa-store"></i>
|
| 444 |
+
</div>
|
| 445 |
+
<div>
|
| 446 |
+
<p class="font-medium">${vehicle.seller.name}</p>
|
| 447 |
+
<div class="flex items-center">
|
| 448 |
+
<i class="fas fa-star text-yellow-400 text-xs"></i>
|
| 449 |
+
<span class="text-xs ml-1">${vehicle.seller.rating} (${vehicle.seller.reviews})</span>
|
| 450 |
+
</div>
|
| 451 |
+
</div>
|
| 452 |
+
</div>
|
| 453 |
+
<a href="tel:${vehicle.seller.phone}" class="bg-blue-600 text-white p-2 rounded-full">
|
| 454 |
+
<i class="fas fa-phone"></i>
|
| 455 |
+
</a>
|
| 456 |
+
</div>
|
| 457 |
+
<button class="w-full bg-blue-600 text-white py-2 rounded-lg mt-2">
|
| 458 |
+
<i class="fas fa-envelope mr-2"></i> Contacter le vendeur
|
| 459 |
+
</button>
|
| 460 |
+
</div>
|
| 461 |
+
</div>
|
| 462 |
+
|
| 463 |
+
<!-- Boutons d'action -->
|
| 464 |
+
<div class="fixed bottom-16 left-0 right-0 max-w-md mx-auto px-4">
|
| 465 |
+
<div class="flex space-x-3">
|
| 466 |
+
<button class="flex-1 bg-white border border-blue-600 text-blue-600 py-3 rounded-lg font-medium">
|
| 467 |
+
<i class="far fa-heart mr-2"></i> Favoris
|
| 468 |
+
</button>
|
| 469 |
+
<button class="flex-1 bg-blue-600 text-white py-3 rounded-lg font-medium">
|
| 470 |
+
<i class="fas fa-euro-sign mr-2"></i> Financer
|
| 471 |
+
</button>
|
| 472 |
+
</div>
|
| 473 |
+
</div>
|
| 474 |
+
</div>
|
| 475 |
+
`;
|
| 476 |
+
|
| 477 |
+
// Afficher la page de détails
|
| 478 |
+
showPage('vehicle-details-page');
|
| 479 |
+
}
|
| 480 |
+
</script>
|
| 481 |
+
<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=iShares/test-apps" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 482 |
+
</html>
|