facesleuth-pro / index.html
shaike123's picture
the click to upload button not working
78841af verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FaceSleuth Pro</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.globe.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r134/three.min.js"></script>
<style>
.gradient-bg {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.glass-effect {
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.2);
}
.upload-area {
border: 2px dashed rgba(255, 255, 255, 0.3);
transition: all 0.3s ease;
}
.upload-area:hover {
border-color: rgba(255, 255, 255, 0.5);
background: rgba(255, 255, 255, 0.05);
}
.pulse-animation {
animation: pulse 2s infinite;
}
@keyframes pulse {
0% { transform: scale(1); }
50% { transform: scale(1.05); }
100% { transform: scale(1); }
}
</style>
</head>
<body class="min-h-screen text-white gradient-bg">
<div id="vanta-bg" class="absolute inset-0 z-0"></div>
<!-- Navigation -->
<nav class="relative z-10 glass-effect p-4">
<div class="container mx-auto flex justify-between items-center">
<div class="flex items-center space-x-2">
<i data-feather="search" class="w-6 h-6"></i>
<h1 class="text-xl font-bold">FaceSleuth Pro</h1>
</div>
<div class="flex space-x-4">
<a href="#" class="hover:text-gray-200 transition">Home</a>
<a href="#" class="hover:text-gray-200 transition">About</a>
<a href="#" class="hover:text-gray-200 transition">Contact</a>
</div>
</div>
</nav>
<!-- Main Content -->
<main class="relative z-10 container mx-auto px-4 py-16">
<div class="max-w-4xl mx-auto text-center">
<h2 class="text-5xl font-bold mb-6">Uncover Digital Identities with AI-Powered Face Search</h2>
<p class="text-xl mb-12 opacity-90">Upload a face photo and let our advanced algorithms search the web for matching identities and information.</p>
<!-- Upload Section -->
<div class="glass-effect rounded-2xl p-8 mb-12">
<div id="uploadArea" class="upload-area rounded-xl p-12 text-center cursor-pointer mb-6">
<i data-feather="upload-cloud" class="w-16 h-16 mx-auto mb-4 opacity-70"></i>
<h3 class="text-2xl font-semibold mb-2">Drop Face Image Here</h3>
<p class="opacity-80 mb-4">or click to browse your files</p>
<p class="text-sm opacity-60">Supports JPG, PNG, WEBP • Max 5MB</p>
<input type="file" id="fileInput" class="hidden" accept="image/*">
</div>
<!-- Preview Section -->
<div id="previewSection" class="hidden">
<div class="flex flex-col md:flex-row items-center justify-center space-y-6 md:space-y-0 md:space-x-8">
<div class="text-center">
<h4 class="font-semibold mb-4">Uploaded Image</h4>
<img id="imagePreview" class="w-48 h-48 object-cover rounded-lg shadow-lg mx-auto">
</div>
<div class="flex items-center">
<i data-feather="arrow-right" class="w-8 h-8 opacity-60"></i>
</div>
<div class="text-center">
<h4 class="font-semibold mb-4">Search Results</h4>
<div id="resultsPlaceholder" class="w-48 h-48 glass-effect rounded-lg flex items-center justify-center">
<i data-feather="search" class="w-12 h-12 opacity-40"></i>
</div>
</div>
</div>
</div>
<!-- Action Button -->
<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">
<div class="flex items-center space-x-2">
<i data-feather="search" class="w-5 h-5"></i>
<span>Start Reverse Search</span>
</div>
</button>
</div>
<!-- Features -->
<div class="grid md:grid-cols-3 gap-8 mb-16">
<div class="glass-effect p-6 rounded-xl text-center">
<i data-feather="shield" class="w-12 h-12 mx-auto mb-4 opacity-70"></i>
<h4 class="text-lg font-semibold mb-2">Secure & Private</h4>
<p class="opacity-80">Your searches are encrypted and never stored on our servers</p>
</div>
<div class="glass-effect p-6 rounded-xl text-center">
<i data-feather="zap" class="w-12 h-12 mx-auto mb-4 opacity-70"></i>
<h4 class="text-lg font-semibold mb-2">Lightning Fast</h4>
<p class="opacity-80">Get results in seconds with our optimized search algorithms</p>
</div>
<div class="glass-effect p-6 rounded-xl text-center">
<i data-feather="globe" class="w-12 h-12 mx-auto mb-4 opacity-70"></i>
<h4 class="text-lg font-semibold mb-2">Global Database</h4>
<p class="opacity-80">Search across millions of web pages and social media platforms</p>
</div>
</div>
</div>
</main>
<!-- Footer -->
<footer class="relative z-10 glass-effect py-8">
<div class="container mx-auto px-4 text-center">
<p class="opacity-80">&copy; 2024 FaceSleuth Pro. Digital identity investigation made simple.</p>
</div>
</footer>
<script>
// Initialize Vanta.js
VANTA.GLOBE({
el: "#vanta-bg",
mouseControls: true,
touchControls: true,
gyroControls: false,
minHeight: 200.00,
minWidth: 200.00,
scale: 1.00,
scaleMobile: 1.00,
color: 0xffffff,
backgroundColor: 0x667eea
});
// File upload functionality
const uploadArea = document.getElementById('uploadArea');
const fileInput = document.getElementById('fileInput');
const previewSection = document.getElementById('previewSection');
const imagePreview = document.getElementById('imagePreview');
const searchBtn = document.getElementById('searchBtn');
const resultsPlaceholder = document.getElementById('resultsPlaceholder');
uploadArea.addEventListener('click', (e) => {
e.preventDefault();
e.stopPropagation();
fileInput.click();
});
uploadArea.addEventListener('dragover', (e) => {
e.preventDefault();
uploadArea.classList.add('border-white', 'bg-white', 'bg-opacity-10');
});
uploadArea.addEventListener('dragleave', () => {
uploadArea.classList.remove('border-white', 'bg-white', 'bg-opacity-10');
});
uploadArea.addEventListener('drop', (e) => {
e.preventDefault();
uploadArea.classList.remove('border-white', 'bg-white', 'bg-opacity-10');
const file = e.dataTransfer.files[0];
handleFile(file);
});
fileInput.addEventListener('change', (e) => {
const file = e.target.files[0];
if (file) {
handleFile(file);
}
});
function handleFile(file) {
if (file && file.type.startsWith('image/')) {
const reader = new FileReader();
reader.onload = (e) => {
imagePreview.src = e.target.result;
previewSection.classList.remove('hidden');
searchBtn.classList.remove('hidden');
uploadArea.classList.add('hidden');
};
reader.readAsDataURL(file);
} else {
alert('Please select a valid image file (JPG, PNG, WEBP)');
}
}
searchBtn.addEventListener('click', async () => {
searchBtn.innerHTML = '<div class="flex items-center space-x-2"><div class="animate-spin rounded-full h-5 w-5 border-b-2 border-purple-600"></div><span>Searching...</span></div>';
// Simulate API call
setTimeout(() => {
resultsPlaceholder.innerHTML = `
<div class="text-center p-4">
<i data-feather="check-circle" class="w-8 h-8 text-green-400 mx-auto mb-2"></i>
<p class="text-sm">3 matches found</p>
<p class="text-xs opacity-60 mt-2">Processing complete</p>
</div>
`;
feather.replace();
searchBtn.innerHTML = '<div class="flex items-center space-x-2"><i data-feather="search" class="w-5 h-5"></i><span>Search Again</span></div>';
feather.replace();
}, 2000);
}
// Initialize feather icons
feather.replace();
</script>
</body>
</html>