File size: 3,697 Bytes
b1fb35d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TechMart - Smart Shopping</title>
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.11.4/gsap.min.js"></script>
<link rel="stylesheet" href="/static/css/styles.css">
<style>
/* Scan effect in a slight spiral motion */
.scan-effect {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border-radius: 50%;
background: rgba(255, 255, 255, 0.1);
opacity: 0;
z-index: 1;
}
/* Animation spiral */
@keyframes spiral-scan {
0% {
transform: scale(0.8) rotate(0deg);
opacity: 0;
}
50% {
transform: scale(1.2) rotate(180deg);
opacity: 1;
}
100% {
transform: scale(1.5) rotate(360deg);
opacity: 0;
}
}
/* Active class for scan effect */
.scan-active {
animation: spiral-scan 3s ease-in-out;
}
</style>
</head>
<body class="bg-gray-900 text-white min-h-screen flex flex-col" style="background-image: url('/static/images/background.jpg');">
<main class="flex-grow container mx-auto p-6 flex flex-col lg:flex-row items-center justify-center space-y-16 lg:space-y-0 lg:space-x-28">
<!-- Camera Section -->
<div class="max-w-md w-full flex justify-center items-center">
<div class="relative">
<!-- Vidéo circulaire centrée -->
<video id="camera-feed" autoplay class="w-full max-w-md max-h-md aspect-square bg-black rounded-full object-cover shadow-2xl ring-4 ring-gray-300 ring-opacity-50 hover:ring-blue-500 hover:ring-opacity-75 transition-all duration-300 ease-in-out transform hover:scale-105"></video>
<!-- Scan Effect -->
<div id="scan-effect" class="scan-effect"></div>
</div>
</div>
<!-- Form Section -->
<div class="max-w-sm w-full bg-gray-800/40 backdrop-blur-md rounded-xl shadow-lg p-6 lg:w-1/3 transform transition-all duration-300 hover:scale-102 hover:shadow-md">
<h2 class="text-xl font-semibold mb-4 text-center">Smart Check-In</h2>
<div class="text-center">
<!-- Taille réduite du bouton -->
<button id="begin-scan-btn" class="w-3/4 bg-blue-600 hover:bg-blue-700 text-white font-bold py-2 px-3 rounded-lg transition-all duration-300 ease-in-out transform hover:scale-102 text-sm">
Scan 🔍
</button>
</div>
<div id="error-message" class="mt-4 text-center text-red-500"></div>
</div>
</main>
<script src="/static/js/script.js"></script>
<script>
document.getElementById('begin-scan-btn').addEventListener('click', function () {
const scanEffect = document.getElementById('scan-effect');
// Toggle the animation class
scanEffect.classList.add('scan-active');
// Remove the class after 3 seconds
setTimeout(function () {
scanEffect.classList.remove('scan-active');
}, 3000); // L'effet dure 3 secondes
});
</script>
</body>
</html>
|