Spaces:
Running
Running
馃惓 14/03 - 07:45 - 转注讘讜专 注诇 讛驻专讜讬拽讟 讗 讗驻砖专 诇讛注诇讜转 转诪讜讜谞转 诇讗转专 讗讘诇 讘诇讬 拽砖专 讗讬讱 诪转讘爪注 讛讞讬驻讜砖 讛讝讛?
Browse files- index.html +124 -11
index.html
CHANGED
|
@@ -35,6 +35,13 @@
|
|
| 35 |
50% { transform: scale(1.05); }
|
| 36 |
100% { transform: scale(1); }
|
| 37 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
</style>
|
| 39 |
</head>
|
| 40 |
<body class="min-h-screen text-white gradient-bg">
|
|
@@ -92,11 +99,22 @@
|
|
| 92 |
|
| 93 |
<!-- Action Button -->
|
| 94 |
<button id="searchBtn" class="hidden mt-8 bg-white text-purple-600 px-8 py-4 rounded-full font-semibold hover:bg-gray-100 transition-all duration-300 transform hover:scale-105 pulse-animation">
|
| 95 |
-
<div class="flex items-center space-x-2">
|
| 96 |
<i data-feather="search" class="w-5 h-5"></i>
|
| 97 |
<span>Start Reverse Search</span>
|
| 98 |
</div>
|
| 99 |
</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
</div>
|
| 101 |
|
| 102 |
<!-- Features -->
|
|
@@ -189,24 +207,119 @@ uploadArea.addEventListener('dragover', (e) => {
|
|
| 189 |
alert('Please select a valid image file (JPG, PNG, WEBP)');
|
| 190 |
}
|
| 191 |
}
|
| 192 |
-
|
| 193 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 194 |
|
| 195 |
-
// Simulate API call
|
| 196 |
setTimeout(() => {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 197 |
resultsPlaceholder.innerHTML = `
|
| 198 |
<div class="text-center p-4">
|
| 199 |
-
<i data-feather="check-circle" class="w-
|
| 200 |
-
<p class="text-sm">
|
| 201 |
-
<p class="text-xs opacity-60 mt-2">
|
| 202 |
</div>
|
| 203 |
`;
|
| 204 |
-
feather.replace();
|
| 205 |
|
| 206 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 207 |
feather.replace();
|
| 208 |
-
},
|
| 209 |
-
}
|
| 210 |
|
| 211 |
// Initialize feather icons
|
| 212 |
feather.replace();
|
|
|
|
| 35 |
50% { transform: scale(1.05); }
|
| 36 |
100% { transform: scale(1); }
|
| 37 |
}
|
| 38 |
+
@keyframes fadeIn {
|
| 39 |
+
from { opacity: 0; transform: translateY(10px); }
|
| 40 |
+
to { opacity: 1; transform: translateY(0); }
|
| 41 |
+
}
|
| 42 |
+
.animate-fade-in {
|
| 43 |
+
animation: fadeIn 0.5s ease-out forwards;
|
| 44 |
+
}
|
| 45 |
</style>
|
| 46 |
</head>
|
| 47 |
<body class="min-h-screen text-white gradient-bg">
|
|
|
|
| 99 |
|
| 100 |
<!-- Action Button -->
|
| 101 |
<button id="searchBtn" class="hidden mt-8 bg-white text-purple-600 px-8 py-4 rounded-full font-semibold hover:bg-gray-100 transition-all duration-300 transform hover:scale-105 pulse-animation">
|
| 102 |
+
<div class="flex items-center justify-center space-x-2">
|
| 103 |
<i data-feather="search" class="w-5 h-5"></i>
|
| 104 |
<span>Start Reverse Search</span>
|
| 105 |
</div>
|
| 106 |
</button>
|
| 107 |
+
|
| 108 |
+
<!-- Search Results Section -->
|
| 109 |
+
<div id="resultsSection" class="hidden mt-8">
|
| 110 |
+
<div class="text-left mb-4">
|
| 111 |
+
<h4 class="text-lg font-semibold mb-2">Found Matches</h4>
|
| 112 |
+
<p class="text-sm opacity-70">Showing 3 potential matches found across social media and public databases</p>
|
| 113 |
+
</div>
|
| 114 |
+
<div id="resultsGrid" class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
| 115 |
+
<!-- Results will be dynamically inserted here -->
|
| 116 |
+
</div>
|
| 117 |
+
</div>
|
| 118 |
</div>
|
| 119 |
|
| 120 |
<!-- Features -->
|
|
|
|
| 207 |
alert('Please select a valid image file (JPG, PNG, WEBP)');
|
| 208 |
}
|
| 209 |
}
|
| 210 |
+
// Generate random results data
|
| 211 |
+
function generateSearchResults() {
|
| 212 |
+
const sources = [
|
| 213 |
+
{ name: 'LinkedIn', icon: 'linkedin' },
|
| 214 |
+
{ name: 'Facebook', icon: 'facebook' },
|
| 215 |
+
{ name: 'Twitter/X', icon: 'twitter' },
|
| 216 |
+
{ name: 'Instagram', icon: 'instagram' },
|
| 217 |
+
{ name: 'News Article', icon: 'file-text' },
|
| 218 |
+
{ name: 'Company Website', icon: 'globe' }
|
| 219 |
+
];
|
| 220 |
+
|
| 221 |
+
const results = [];
|
| 222 |
+
const usedIndices = new Set();
|
| 223 |
+
|
| 224 |
+
for (let i = 0; i < 3; i++) {
|
| 225 |
+
let randomIndex;
|
| 226 |
+
do {
|
| 227 |
+
randomIndex = Math.floor(Math.random() * sources.length);
|
| 228 |
+
} while (usedIndices.has(randomIndex));
|
| 229 |
+
usedIndices.add(randomIndex);
|
| 230 |
+
|
| 231 |
+
const confidence = Math.floor(Math.random() * (98 - 65) + 65);
|
| 232 |
+
const seed = Math.floor(Math.random() * 900) + 1;
|
| 233 |
+
|
| 234 |
+
results.push({
|
| 235 |
+
source: sources[randomIndex],
|
| 236 |
+
confidence: confidence,
|
| 237 |
+
imageUrl: `https://static.photos/people/320x240/${seed}`,
|
| 238 |
+
url: `https://example.com/profile/${seed}`,
|
| 239 |
+
name: `Match ${i + 1}`,
|
| 240 |
+
foundOn: new Date(Date.now() - Math.floor(Math.random() * 10000000000)).toLocaleDateString()
|
| 241 |
+
});
|
| 242 |
+
}
|
| 243 |
+
|
| 244 |
+
return results.sort((a, b) => b.confidence - a.confidence);
|
| 245 |
+
}
|
| 246 |
+
|
| 247 |
+
// Render search results
|
| 248 |
+
function renderResults(results) {
|
| 249 |
+
const resultsGrid = document.getElementById('resultsGrid');
|
| 250 |
+
resultsGrid.innerHTML = '';
|
| 251 |
+
|
| 252 |
+
results.forEach((result, index) => {
|
| 253 |
+
const card = document.createElement('div');
|
| 254 |
+
card.className = 'glass-effect rounded-xl overflow-hidden hover:bg-white hover:bg-opacity-20 transition-all duration-300 cursor-pointer group animate-fade-in';
|
| 255 |
+
card.style.animationDelay = `${index * 0.2}s`;
|
| 256 |
+
card.innerHTML = `
|
| 257 |
+
<div class="relative">
|
| 258 |
+
<img src="${result.imageUrl}" alt="Match" class="w-full h-40 object-cover">
|
| 259 |
+
<div class="absolute top-2 right-2 bg-black bg-opacity-70 text-white px-2 py-1 rounded-full text-xs font-bold flex items-center">
|
| 260 |
+
<i data-feather="activity" class="w-3 h-3 mr-1"></i>
|
| 261 |
+
${result.confidence}%
|
| 262 |
+
</div>
|
| 263 |
+
</div>
|
| 264 |
+
<div class="p-4">
|
| 265 |
+
<div class="flex items-center justify-between mb-2">
|
| 266 |
+
<span class="text-xs font-semibold opacity-70 uppercase tracking-wide">${result.source.name}</span>
|
| 267 |
+
<i data-feather="${result.source.icon}" class="w-4 h-4 opacity-60"></i>
|
| 268 |
+
</div>
|
| 269 |
+
<h5 class="font-semibold text-sm mb-1 group-hover:text-gray-200">Potential Match</h5>
|
| 270 |
+
<p class="text-xs opacity-60 mb-2">Found on ${result.foundOn}</p>
|
| 271 |
+
<a href="${result.url}" target="_blank" class="text-xs text-blue-300 hover:text-blue-200 flex items-center mt-2 opacity-80 hover:opacity-100 transition">
|
| 272 |
+
View Source <i data-feather="external-link" class="w-3 h-3 ml-1"></i>
|
| 273 |
+
</a>
|
| 274 |
+
</div>
|
| 275 |
+
`;
|
| 276 |
+
resultsGrid.appendChild(card);
|
| 277 |
+
});
|
| 278 |
+
|
| 279 |
+
feather.replace();
|
| 280 |
+
}
|
| 281 |
+
|
| 282 |
+
searchBtn.addEventListener('click', async () => {
|
| 283 |
+
const originalBtnContent = '<div class="flex items-center justify-center space-x-2"><i data-feather="search" class="w-5 h-5"></i><span>Start Reverse Search</span></div>';
|
| 284 |
+
searchBtn.innerHTML = '<div class="flex items-center justify-center space-x-2"><div class="animate-spin rounded-full h-5 w-5 border-b-2 border-purple-600"></div><span>Searching databases...</span></div>';
|
| 285 |
+
searchBtn.disabled = true;
|
| 286 |
+
const resultsSection = document.getElementById('resultsSection');
|
| 287 |
+
resultsSection.classList.add('hidden');
|
| 288 |
+
|
| 289 |
+
// Simulate API call with progress steps
|
| 290 |
+
const steps = ['Scanning social networks...', 'Checking public records...', 'Analyzing patterns...', 'Finalizing results...'];
|
| 291 |
+
let stepIndex = 0;
|
| 292 |
+
|
| 293 |
+
const progressInterval = setInterval(() => {
|
| 294 |
+
if (stepIndex < steps.length) {
|
| 295 |
+
searchBtn.innerHTML = `<div class="flex items-center justify-center space-x-2"><div class="animate-spin rounded-full h-5 w-5 border-b-2 border-purple-600"></div><span>${steps[stepIndex]}</span></div>`;
|
| 296 |
+
stepIndex++;
|
| 297 |
+
}
|
| 298 |
+
}, 600);
|
| 299 |
|
|
|
|
| 300 |
setTimeout(() => {
|
| 301 |
+
clearInterval(progressInterval);
|
| 302 |
+
const results = generateSearchResults();
|
| 303 |
+
|
| 304 |
+
// Update placeholder to show success
|
| 305 |
resultsPlaceholder.innerHTML = `
|
| 306 |
<div class="text-center p-4">
|
| 307 |
+
<i data-feather="check-circle" class="w-12 h-12 text-green-400 mx-auto mb-3"></i>
|
| 308 |
+
<p class="text-sm font-semibold">${results.length} matches found</p>
|
| 309 |
+
<p class="text-xs opacity-60 mt-2">Analysis complete</p>
|
| 310 |
</div>
|
| 311 |
`;
|
|
|
|
| 312 |
|
| 313 |
+
// Show detailed results
|
| 314 |
+
renderResults(results);
|
| 315 |
+
resultsSection.classList.remove('hidden');
|
| 316 |
+
resultsSection.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
|
| 317 |
+
|
| 318 |
+
searchBtn.innerHTML = '<div class="flex items-center justify-center space-x-2"><i data-feather="refresh-cw" class="w-5 h-5"></i><span>Search Again</span></div>';
|
| 319 |
+
searchBtn.disabled = false;
|
| 320 |
feather.replace();
|
| 321 |
+
}, 2800);
|
| 322 |
+
});
|
| 323 |
|
| 324 |
// Initialize feather icons
|
| 325 |
feather.replace();
|