docto41 commited on
Commit
de71c2d
·
verified ·
1 Parent(s): 992e0d0

Add 2 files

Browse files
Files changed (2) hide show
  1. index.html +98 -8
  2. prompts.txt +2 -1
index.html CHANGED
@@ -36,6 +36,26 @@
36
  button, a.button {
37
  cursor: pointer;
38
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  </style>
40
  </head>
41
  <body class="bg-gray-50 font-sans antialiased">
@@ -68,20 +88,27 @@
68
 
69
  <div class="max-w-2xl mx-auto bg-white rounded-xl p-1 search-box">
70
  <div class="flex">
71
- <input type="text" placeholder="Recherchez votre nom de domaine..." class="flex-1 px-6 py-4 rounded-l-xl focus:outline-none text-gray-800">
72
- <select class="w-32 px-4 py-4 border-l border-gray-200 bg-gray-50 rounded-r-xl focus:outline-none">
73
  <option>.com</option>
74
  <option>.net</option>
75
  <option>.org</option>
76
  <option>.io</option>
77
  <option>.tech</option>
78
  </select>
79
- <button onclick="searchDomain()" class="bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 text-white px-6 py-4 rounded-r-xl font-bold transition-all duration-300">
80
  <i class="fas fa-search mr-2"></i> Rechercher
81
  </button>
82
  </div>
83
  </div>
84
 
 
 
 
 
 
 
 
85
  <div class="mt-12 flex flex-wrap justify-center gap-4">
86
  <div class="flex items-center bg-white/10 backdrop-blur-sm px-4 py-2 rounded-full">
87
  <i class="fas fa-check-circle text-green-300 mr-2"></i>
@@ -370,19 +397,82 @@
370
  freeBadge.classList.add('pulse-animation');
371
  });
372
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
373
  // Button functions
374
  function searchDomain() {
375
- const domainInput = document.querySelector('input[type="text"]');
376
- const domainExtension = document.querySelector('select').value;
377
  const domain = domainInput.value.trim() + domainExtension;
 
 
378
 
379
  if(domainInput.value.trim() === '') {
380
- alert('Veuillez entrer un nom de domaine');
381
  return;
382
  }
383
 
384
- alert('Recherche du domaine: ' + domain);
385
- // Ici vous pourriez ajouter une requête AJAX pour vérifier la disponibilité
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
386
  }
387
 
388
  function refreshDomainInfo() {
 
36
  button, a.button {
37
  cursor: pointer;
38
  }
39
+ .searching {
40
+ position: relative;
41
+ }
42
+ .searching::after {
43
+ content: "";
44
+ position: absolute;
45
+ right: 20px;
46
+ top: 50%;
47
+ transform: translateY(-50%);
48
+ width: 20px;
49
+ height: 20px;
50
+ border: 2px solid rgba(255,255,255,0.3);
51
+ border-top-color: white;
52
+ border-radius: 50%;
53
+ animation: spin 1s linear infinite;
54
+ display: none;
55
+ }
56
+ @keyframes spin {
57
+ to { transform: translateY(-50%) rotate(360deg); }
58
+ }
59
  </style>
60
  </head>
61
  <body class="bg-gray-50 font-sans antialiased">
 
88
 
89
  <div class="max-w-2xl mx-auto bg-white rounded-xl p-1 search-box">
90
  <div class="flex">
91
+ <input type="text" id="domainInput" placeholder="Recherchez votre nom de domaine..." class="flex-1 px-6 py-4 rounded-l-xl focus:outline-none text-gray-800" oninput="triggerSearch()">
92
+ <select id="domainExtension" class="w-32 px-4 py-4 border-l border-gray-200 bg-gray-50 focus:outline-none" onchange="triggerSearch()">
93
  <option>.com</option>
94
  <option>.net</option>
95
  <option>.org</option>
96
  <option>.io</option>
97
  <option>.tech</option>
98
  </select>
99
+ <button id="searchButton" onclick="searchDomain()" class="bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 text-white px-6 py-4 rounded-r-xl font-bold transition-all duration-300 searching">
100
  <i class="fas fa-search mr-2"></i> Rechercher
101
  </button>
102
  </div>
103
  </div>
104
 
105
+ <div id="searchResults" class="mt-4 bg-white rounded-lg shadow-lg hidden max-w-2xl mx-auto p-6">
106
+ <h3 class="text-lg font-bold mb-4">Résultats de recherche</h3>
107
+ <div id="resultsList" class="space-y-3">
108
+ <!-- Les résultats seront affichés ici -->
109
+ </div>
110
+ </div>
111
+
112
  <div class="mt-12 flex flex-wrap justify-center gap-4">
113
  <div class="flex items-center bg-white/10 backdrop-blur-sm px-4 py-2 rounded-full">
114
  <i class="fas fa-check-circle text-green-300 mr-2"></i>
 
397
  freeBadge.classList.add('pulse-animation');
398
  });
399
 
400
+ // Search timer variable
401
+ let searchTimer;
402
+
403
+ // Trigger search automatically after user stops typing
404
+ function triggerSearch() {
405
+ clearTimeout(searchTimer);
406
+ const domainInput = document.getElementById('domainInput');
407
+
408
+ if(domainInput.value.trim() === '') {
409
+ document.getElementById('searchResults').classList.add('hidden');
410
+ return;
411
+ }
412
+
413
+ // Show loading indicator
414
+ const searchButton = document.getElementById('searchButton');
415
+ searchButton.classList.add('searching');
416
+ searchButton.querySelector('i').classList.add('hidden');
417
+
418
+ // Wait 500ms after last input to trigger search
419
+ searchTimer = setTimeout(() => {
420
+ searchDomain();
421
+ }, 500);
422
+ }
423
+
424
  // Button functions
425
  function searchDomain() {
426
+ const domainInput = document.getElementById('domainInput');
427
+ const domainExtension = document.getElementById('domainExtension').value;
428
  const domain = domainInput.value.trim() + domainExtension;
429
+ const resultsList = document.getElementById('resultsList');
430
+ const searchResults = document.getElementById('searchResults');
431
 
432
  if(domainInput.value.trim() === '') {
433
+ searchResults.classList.add('hidden');
434
  return;
435
  }
436
 
437
+ // Simulate API call with timeout
438
+ setTimeout(() => {
439
+ // Hide loading indicator
440
+ const searchButton = document.getElementById('searchButton');
441
+ searchButton.classList.remove('searching');
442
+ searchButton.querySelector('i').classList.remove('hidden');
443
+
444
+ // Clear previous results
445
+ resultsList.innerHTML = '';
446
+
447
+ // Generate random results (in a real app, this would come from an API)
448
+ const extensions = ['.com', '.net', '.org', '.io', '.tech'];
449
+ const statuses = ['Disponible', 'Indisponible'];
450
+
451
+ extensions.forEach(ext => {
452
+ const status = Math.random() > 0.5 ? statuses[0] : statuses[1];
453
+ const price = status === 'Disponible' ? (Math.random() * 20 + 5).toFixed(2) : 'N/A';
454
+
455
+ const resultItem = document.createElement('div');
456
+ resultItem.className = 'flex justify-between items-center p-3 hover:bg-gray-50 rounded-lg';
457
+ resultItem.innerHTML = `
458
+ <div class="flex items-center">
459
+ <span class="font-medium">${domainInput.value.trim()}${ext}</span>
460
+ <span class="ml-2 text-xs px-2 py-1 rounded ${status === 'Disponible' ? 'bg-green-100 text-green-800' : 'bg-red-100 text-red-800'}">${status}</span>
461
+ </div>
462
+ <div class="flex items-center">
463
+ <span class="text-gray-600 mr-3">${status === 'Disponible' ? `€${price}/an` : ''}</span>
464
+ <button class="bg-blue-500 hover:bg-blue-600 text-white px-3 py-1 rounded text-sm ${status === 'Indisponible' ? 'opacity-50 cursor-not-allowed' : ''}" ${status === 'Indisponible' ? 'disabled' : ''}>
465
+ ${status === 'Disponible' ? 'Ajouter' : 'Indisponible'}
466
+ </button>
467
+ </div>
468
+ `;
469
+
470
+ resultsList.appendChild(resultItem);
471
+ });
472
+
473
+ // Show results
474
+ searchResults.classList.remove('hidden');
475
+ }, 1000);
476
  }
477
 
478
  function refreshDomainInfo() {
prompts.txt CHANGED
@@ -13,4 +13,5 @@ ajouter tableau de bord avec les information de paiement paypal, stripe, avec bo
13
  modifier la page d'accueil avec des bon degader et des bel image
14
  Domain Information Registrar Information Registrant Contact
15
  Enregistrez votre domaine gratuitement Obtenez un nom de domaine, SSL, DNS et hébergement en quelques secondes:: Domain Information Registrar Information Registrant Contact
16
- corriger toutes les erreurs des bouton non cliquable qui ne fonction pas
 
 
13
  modifier la page d'accueil avec des bon degader et des bel image
14
  Domain Information Registrar Information Registrant Contact
15
  Enregistrez votre domaine gratuitement Obtenez un nom de domaine, SSL, DNS et hébergement en quelques secondes:: Domain Information Registrar Information Registrant Contact
16
+ corriger toutes les erreurs des bouton non cliquable qui ne fonction pas
17
+ je veux recherche en automatique