Martin Natale
commited on
Commit
·
974696d
1
Parent(s):
79192e7
feat: Update front
Browse files- client/static/createAccount.html +52 -44
- client/static/css/styles.css +12 -0
- client/static/fonts/GeistMono-Black.ttf +0 -0
- client/static/images/background2.jpg +0 -0
- client/static/index.html +91 -12
- client/static/login.html +50 -27
client/static/createAccount.html
CHANGED
@@ -4,55 +4,53 @@
|
|
4 |
<head>
|
5 |
<meta charset="UTF-8">
|
6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7 |
-
<title>
|
8 |
<script src="https://cdn.tailwindcss.com"></script>
|
9 |
<script src="https://unpkg.com/scrollreveal"></script>
|
10 |
-
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Inter:wght@300;400;500&display=swap" rel="stylesheet">
|
11 |
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
|
12 |
<link rel="stylesheet" href="/static/css/styles.css">
|
13 |
</head>
|
14 |
|
15 |
<body class="bg-gray-900 text-white min-h-screen flex flex-col" style="background-image: url('/static/images/background.jpg');">
|
16 |
-
<!-- <header class="bg-gray-800 p-4">
|
17 |
-
<h1 class="text-3xl font-bold text-center"><i class="fas fa-user-plus mr-2"></i>Créer un compte</h1>
|
18 |
-
</header> -->
|
19 |
-
|
20 |
|
|
|
|
|
|
|
|
|
|
|
21 |
<main class="flex-grow container mx-auto p-6 flex flex-col lg:flex-row items-center justify-center space-y-8 lg:space-y-0 lg:space-x-12">
|
22 |
-
|
23 |
-
<!--
|
24 |
-
<div class="max-w-md w-full p-6 lg:p-0 lg:w-1/2 flex flex-col items-center video-reveal">
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
</div>
|
39 |
-
|
40 |
-
<!-- Form Section -->
|
41 |
-
<div class="max-w-md w-full bg-gray-800/40 backdrop-blur-md rounded-xl shadow-lg p-6 lg:w-1/2 transform transition-all duration-300 hover:scale-102 hover:shadow-md form-reveal">
|
42 |
-
<form id="create-account-form" method="POST" action="/submitAccount" class="space-y-6" enctype="multipart/form-data">
|
43 |
-
<div>
|
44 |
-
<label for="email" class="block text-sm font-medium text-gray-300">Email Address</label>
|
45 |
-
<input type="email" id="email" name="email" required class="w-full px-4 py-3 mt-2 bg-gray-700 text-white rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50 transition duration-300 ease-in-out">
|
46 |
</div>
|
47 |
-
<button type="submit" class="w-full bg-green-600 hover:bg-green-700 text-white font-bold py-3 px-4 rounded-lg transition-all duration-300 ease-in-out transform hover:scale-102">
|
48 |
-
Create Account 🤗
|
49 |
-
</button>
|
50 |
-
</form>
|
51 |
-
<div id="error-message" class="mt-4 text-center text-red-500"></div>
|
52 |
-
</div>
|
53 |
|
54 |
-
|
55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
</main>
|
57 |
|
58 |
<!-- <footer class="bg-gray-800 p-4 text-center">
|
@@ -71,7 +69,7 @@
|
|
71 |
easing: 'ease-in-out', // Transition fluide
|
72 |
delay: 200 // Délai avant le début
|
73 |
});
|
74 |
-
|
75 |
// Animation pour la section formulaire avec un glissement depuis la droite
|
76 |
ScrollReveal().reveal('.form-reveal', {
|
77 |
duration: 1200, // Durée de l'animation
|
@@ -81,13 +79,23 @@
|
|
81 |
easing: 'ease-in-out', // Transition fluide
|
82 |
delay: 400 // Délai un peu plus long pour que l'effet soit coordonné
|
83 |
});
|
84 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
// Appelle la fonction de caméra et remplissage de l'email après le chargement de la page
|
86 |
fillEmailFromUrl();
|
87 |
startCamera();
|
88 |
});
|
89 |
|
90 |
-
//
|
91 |
function fillEmailFromUrl() {
|
92 |
const urlParams = new URLSearchParams(window.location.search);
|
93 |
const email = urlParams.get('email');
|
@@ -96,7 +104,7 @@
|
|
96 |
}
|
97 |
}
|
98 |
|
99 |
-
//
|
100 |
window.onload = function () {
|
101 |
fillEmailFromUrl();
|
102 |
startCamera();
|
@@ -108,7 +116,7 @@
|
|
108 |
let isRecording = false;
|
109 |
const recIndicator = document.getElementById('rec-indicator');
|
110 |
|
111 |
-
//
|
112 |
async function startCamera() {
|
113 |
const videoPreview = document.getElementById('video-preview');
|
114 |
|
@@ -207,4 +215,4 @@
|
|
207 |
</script>
|
208 |
</body>
|
209 |
|
210 |
-
</html>
|
|
|
4 |
<head>
|
5 |
<meta charset="UTF-8">
|
6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7 |
+
<title>Zauth - Create Account</title>
|
8 |
<script src="https://cdn.tailwindcss.com"></script>
|
9 |
<script src="https://unpkg.com/scrollreveal"></script>
|
10 |
+
<link href="https://fonts.googleapis.com/css2?family=GeistMono:wght@400;700&family=Playfair+Display:wght@400;700&family=Inter:wght@300;400;500&display=swap" rel="stylesheet">
|
11 |
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
|
12 |
<link rel="stylesheet" href="/static/css/styles.css">
|
13 |
</head>
|
14 |
|
15 |
<body class="bg-gray-900 text-white min-h-screen flex flex-col" style="background-image: url('/static/images/background.jpg');">
|
|
|
|
|
|
|
|
|
16 |
|
17 |
+
<!-- Header Aligné en Haut à Gauche -->
|
18 |
+
<header class="container mx-auto p-6">
|
19 |
+
<h1 class="text-4xl font-bold text-left text-white icon-geistmono">Zauth.</h1>
|
20 |
+
</header>
|
21 |
+
|
22 |
<main class="flex-grow container mx-auto p-6 flex flex-col lg:flex-row items-center justify-center space-y-8 lg:space-y-0 lg:space-x-12">
|
23 |
+
|
24 |
+
<!-- Section Vidéo avec ScrollReveal -->
|
25 |
+
<div class="max-w-md w-full p-6 lg:p-0 lg:w-1/2 flex flex-col items-center video-reveal">
|
26 |
+
<div class="relative">
|
27 |
+
<video id="video-preview" autoplay muted 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>
|
28 |
+
|
29 |
+
<!-- Indicateur d'Enregistrement -->
|
30 |
+
<div id="rec-indicator" class="hidden absolute top-2 right-2 w-4 h-4 bg-red-600 rounded-full animate-pulse"></div>
|
31 |
+
</div>
|
32 |
+
|
33 |
+
<!-- Bouton Démarrer l'Enregistrement -->
|
34 |
+
<div class="text-center mt-6">
|
35 |
+
<button type="button" id="start-recording" class="bg-red-600 hover:bg-red-700 text-white font-bold w-16 h-16 rounded-full flex items-center justify-center animate-pulse hover:scale-110 active:scale-95 transition-all duration-300 ease-in-out">
|
36 |
+
<i class="fas fa-video"></i>
|
37 |
+
</button>
|
38 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
+
<!-- Section Formulaire avec ScrollReveal -->
|
42 |
+
<div class="max-w-md w-full bg-gray-800/40 backdrop-blur-md rounded-xl shadow-lg p-6 lg:w-1/2 transform transition-all duration-300 hover:scale-102 hover:shadow-md form-reveal">
|
43 |
+
<form id="create-account-form" method="POST" action="/submitAccount" class="space-y-6" enctype="multipart/form-data">
|
44 |
+
<div>
|
45 |
+
<label for="email" class="block text-sm font-medium text-gray-300 icon-geistmono">Email Address</label>
|
46 |
+
<input type="email" id="email" name="email" required class="w-full px-4 py-3 mt-2 bg-gray-700 text-white rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50 transition duration-300 ease-in-out">
|
47 |
+
</div>
|
48 |
+
<button type="submit" class="w-full bg-green-600 hover:bg-green-700 text-white font-bold py-3 px-4 rounded-lg transition-all duration-300 ease-in-out transform hover:scale-102 icon-geistmono">
|
49 |
+
Create Account 🔐
|
50 |
+
</button>
|
51 |
+
</form>
|
52 |
+
<div id="error-message" class="mt-4 text-center text-red-500"></div>
|
53 |
+
</div>
|
54 |
</main>
|
55 |
|
56 |
<!-- <footer class="bg-gray-800 p-4 text-center">
|
|
|
69 |
easing: 'ease-in-out', // Transition fluide
|
70 |
delay: 200 // Délai avant le début
|
71 |
});
|
72 |
+
|
73 |
// Animation pour la section formulaire avec un glissement depuis la droite
|
74 |
ScrollReveal().reveal('.form-reveal', {
|
75 |
duration: 1200, // Durée de l'animation
|
|
|
79 |
easing: 'ease-in-out', // Transition fluide
|
80 |
delay: 400 // Délai un peu plus long pour que l'effet soit coordonné
|
81 |
});
|
82 |
+
|
83 |
+
// Animation pour le header "Zauth."
|
84 |
+
ScrollReveal().reveal('header h1', {
|
85 |
+
duration: 1000,
|
86 |
+
origin: 'left',
|
87 |
+
distance: '50px',
|
88 |
+
opacity: 0,
|
89 |
+
easing: 'ease-in-out',
|
90 |
+
delay: 100
|
91 |
+
});
|
92 |
+
|
93 |
// Appelle la fonction de caméra et remplissage de l'email après le chargement de la page
|
94 |
fillEmailFromUrl();
|
95 |
startCamera();
|
96 |
});
|
97 |
|
98 |
+
// Ajoutez cette fonction au début du script
|
99 |
function fillEmailFromUrl() {
|
100 |
const urlParams = new URLSearchParams(window.location.search);
|
101 |
const email = urlParams.get('email');
|
|
|
104 |
}
|
105 |
}
|
106 |
|
107 |
+
// Appelez cette fonction lorsque la page se charge
|
108 |
window.onload = function () {
|
109 |
fillEmailFromUrl();
|
110 |
startCamera();
|
|
|
116 |
let isRecording = false;
|
117 |
const recIndicator = document.getElementById('rec-indicator');
|
118 |
|
119 |
+
// Fonction pour démarrer la caméra
|
120 |
async function startCamera() {
|
121 |
const videoPreview = document.getElementById('video-preview');
|
122 |
|
|
|
215 |
</script>
|
216 |
</body>
|
217 |
|
218 |
+
</html>
|
client/static/css/styles.css
CHANGED
@@ -59,4 +59,16 @@ body {
|
|
59 |
|
60 |
.bg-transparent {
|
61 |
background-color: rgba(128, 128, 128, 0); /* Adjust the alpha value for desired transparency */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
}
|
|
|
59 |
|
60 |
.bg-transparent {
|
61 |
background-color: rgba(128, 128, 128, 0); /* Adjust the alpha value for desired transparency */
|
62 |
+
}
|
63 |
+
|
64 |
+
|
65 |
+
@font-face {
|
66 |
+
font-family: 'GeistMono';
|
67 |
+
src: url('/static/fonts/GeistMono-Black.ttf') format('truetype');
|
68 |
+
font-weight: normal;
|
69 |
+
font-style: normal;
|
70 |
+
}
|
71 |
+
|
72 |
+
.icon-geistmono {
|
73 |
+
font-family: 'GeistMono', monospace;
|
74 |
}
|
client/static/fonts/GeistMono-Black.ttf
ADDED
Binary file (121 kB). View file
|
|
client/static/images/background2.jpg
ADDED
![]() |
client/static/index.html
CHANGED
@@ -1,12 +1,13 @@
|
|
1 |
<!DOCTYPE html>
|
2 |
-
<html lang="
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
-
<title>
|
7 |
<script src="https://cdn.tailwindcss.com"></script>
|
|
|
|
|
8 |
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
|
9 |
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.11.4/gsap.min.js"></script>
|
10 |
<link rel="stylesheet" href="/static/css/styles.css">
|
11 |
<style>
|
12 |
/* Scan effect in a slight spiral motion */
|
@@ -44,15 +45,21 @@
|
|
44 |
}
|
45 |
</style>
|
46 |
</head>
|
|
|
47 |
<body class="bg-gray-900 text-white min-h-screen flex flex-col" style="background-image: url('/static/images/background.jpg');">
|
48 |
|
|
|
|
|
|
|
|
|
|
|
49 |
<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">
|
50 |
|
51 |
<!-- Camera Section -->
|
52 |
-
<div class="max-w-md w-full flex justify-center items-center">
|
53 |
<div class="relative">
|
54 |
<!-- Vidéo circulaire centrée -->
|
55 |
-
<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>
|
56 |
|
57 |
<!-- Scan Effect -->
|
58 |
<div id="scan-effect" class="scan-effect"></div>
|
@@ -60,12 +67,12 @@
|
|
60 |
</div>
|
61 |
|
62 |
<!-- Form Section -->
|
63 |
-
<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">
|
64 |
-
<h2 class="text-xl font-semibold mb-4 text-center">Smart Check-In</h2>
|
65 |
|
66 |
<div class="text-center">
|
67 |
<!-- Taille réduite du bouton -->
|
68 |
-
<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">
|
69 |
Scan 🔍
|
70 |
</button>
|
71 |
</div>
|
@@ -73,20 +80,92 @@
|
|
73 |
<div id="error-message" class="mt-4 text-center text-red-500"></div>
|
74 |
</div>
|
75 |
|
76 |
-
|
77 |
</main>
|
78 |
|
79 |
-
<
|
|
|
|
|
|
|
80 |
<script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
document.getElementById('begin-scan-btn').addEventListener('click', function () {
|
82 |
const scanEffect = document.getElementById('scan-effect');
|
83 |
-
//
|
84 |
scanEffect.classList.add('scan-active');
|
85 |
|
86 |
-
//
|
87 |
setTimeout(function () {
|
88 |
scanEffect.classList.remove('scan-active');
|
89 |
}, 3000); // L'effet dure 3 secondes
|
|
|
|
|
|
|
|
|
90 |
});
|
91 |
</script>
|
92 |
</body>
|
|
|
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>Zauth - Smart Check-In</title>
|
7 |
<script src="https://cdn.tailwindcss.com"></script>
|
8 |
+
<!-- ScrollReveal CDN -->
|
9 |
+
<script src="https://unpkg.com/scrollreveal"></script>
|
10 |
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
|
|
|
11 |
<link rel="stylesheet" href="/static/css/styles.css">
|
12 |
<style>
|
13 |
/* Scan effect in a slight spiral motion */
|
|
|
45 |
}
|
46 |
</style>
|
47 |
</head>
|
48 |
+
|
49 |
<body class="bg-gray-900 text-white min-h-screen flex flex-col" style="background-image: url('/static/images/background.jpg');">
|
50 |
|
51 |
+
<!-- Header Aligné en Haut à Gauche -->
|
52 |
+
<header class="container mx-auto p-6">
|
53 |
+
<h1 class="text-4xl font-bold text-left text-white icon-geistmono">Zauth.</h1>
|
54 |
+
</header>
|
55 |
+
|
56 |
<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">
|
57 |
|
58 |
<!-- Camera Section -->
|
59 |
+
<div class="max-w-md w-full flex justify-center items-center video-reveal">
|
60 |
<div class="relative">
|
61 |
<!-- Vidéo circulaire centrée -->
|
62 |
+
<video id="camera-feed" autoplay muted 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>
|
63 |
|
64 |
<!-- Scan Effect -->
|
65 |
<div id="scan-effect" class="scan-effect"></div>
|
|
|
67 |
</div>
|
68 |
|
69 |
<!-- Form Section -->
|
70 |
+
<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 form-reveal">
|
71 |
+
<h2 class="text-xl font-semibold mb-4 text-center icon-geistmono">Smart Check-In</h2>
|
72 |
|
73 |
<div class="text-center">
|
74 |
<!-- Taille réduite du bouton -->
|
75 |
+
<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 icon-geistmono">
|
76 |
Scan 🔍
|
77 |
</button>
|
78 |
</div>
|
|
|
80 |
<div id="error-message" class="mt-4 text-center text-red-500"></div>
|
81 |
</div>
|
82 |
|
|
|
83 |
</main>
|
84 |
|
85 |
+
<!-- <footer class="bg-gray-800 p-4 text-center">
|
86 |
+
<p>© 2023 TechMart. Tous droits réservés.</p>
|
87 |
+
</footer> -->
|
88 |
+
|
89 |
<script>
|
90 |
+
document.addEventListener('DOMContentLoaded', function() {
|
91 |
+
// Initialisation de ScrollReveal avec les animations pour différents éléments
|
92 |
+
|
93 |
+
// Animation pour le header "Zauth."
|
94 |
+
ScrollReveal().reveal('header h1', {
|
95 |
+
duration: 1000,
|
96 |
+
origin: 'left',
|
97 |
+
distance: '50px',
|
98 |
+
opacity: 0,
|
99 |
+
easing: 'ease-in-out',
|
100 |
+
delay: 100
|
101 |
+
});
|
102 |
+
|
103 |
+
// Animation pour la section vidéo avec un zoom-in et glissement vers le bas
|
104 |
+
ScrollReveal().reveal('.video-reveal', {
|
105 |
+
duration: 1200, // Durée de l'animation
|
106 |
+
scale: 0.9, // Zoom initial (90%)
|
107 |
+
distance: '30px', // Glissement vers le haut
|
108 |
+
origin: 'bottom', // Animation qui part du bas
|
109 |
+
opacity: 0, // Apparition progressive
|
110 |
+
easing: 'ease-in-out', // Transition fluide
|
111 |
+
delay: 200 // Délai avant le début
|
112 |
+
});
|
113 |
+
|
114 |
+
// Animation pour la section formulaire avec un glissement depuis la droite
|
115 |
+
ScrollReveal().reveal('.form-reveal', {
|
116 |
+
duration: 1200, // Durée de l'animation
|
117 |
+
distance: '60px', // Distance de glissement depuis la droite
|
118 |
+
origin: 'right', // Animation qui part de la droite
|
119 |
+
opacity: 0, // Apparition progressive
|
120 |
+
easing: 'ease-in-out', // Transition fluide
|
121 |
+
delay: 400 // Délai un peu plus long pour que l'effet soit coordonné
|
122 |
+
});
|
123 |
+
|
124 |
+
// Appelle les fonctions de remplissage de l'email et de démarrage de la caméra après le chargement de la page
|
125 |
+
fillEmailFromUrl();
|
126 |
+
startCamera();
|
127 |
+
});
|
128 |
+
|
129 |
+
// Fonction pour remplir l'email à partir des paramètres de l'URL
|
130 |
+
function fillEmailFromUrl() {
|
131 |
+
const urlParams = new URLSearchParams(window.location.search);
|
132 |
+
const email = urlParams.get('email');
|
133 |
+
if (email) {
|
134 |
+
document.getElementById('email').value = decodeURIComponent(email);
|
135 |
+
}
|
136 |
+
}
|
137 |
+
|
138 |
+
// Fonction pour démarrer la caméra
|
139 |
+
async function startCamera() {
|
140 |
+
const cameraFeed = document.getElementById('camera-feed');
|
141 |
+
|
142 |
+
if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
|
143 |
+
try {
|
144 |
+
const stream = await navigator.mediaDevices.getUserMedia({ video: true });
|
145 |
+
cameraFeed.srcObject = stream;
|
146 |
+
} catch (error) {
|
147 |
+
console.error('Erreur lors de l\'accès à la caméra:', error);
|
148 |
+
document.getElementById('error-message').innerText = 'Erreur lors de l\'accès à la caméra. Veuillez vérifier vos permissions.';
|
149 |
+
}
|
150 |
+
} else {
|
151 |
+
document.getElementById('error-message').innerText = 'Votre navigateur ne supporte pas l\'accès à la caméra.';
|
152 |
+
}
|
153 |
+
}
|
154 |
+
|
155 |
+
// Gestionnaire d'événements pour le bouton "Scan"
|
156 |
document.getElementById('begin-scan-btn').addEventListener('click', function () {
|
157 |
const scanEffect = document.getElementById('scan-effect');
|
158 |
+
// Ajouter la classe d'animation
|
159 |
scanEffect.classList.add('scan-active');
|
160 |
|
161 |
+
// Supprimer la classe après 3 secondes
|
162 |
setTimeout(function () {
|
163 |
scanEffect.classList.remove('scan-active');
|
164 |
}, 3000); // L'effet dure 3 secondes
|
165 |
+
|
166 |
+
// Ajoutez ici la logique de scan (par exemple, utiliser une bibliothèque de reconnaissance d'image)
|
167 |
+
// Exemple :
|
168 |
+
// startScan();
|
169 |
});
|
170 |
</script>
|
171 |
</body>
|
client/static/login.html
CHANGED
@@ -4,9 +4,10 @@
|
|
4 |
<head>
|
5 |
<meta charset="UTF-8">
|
6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7 |
-
<title>
|
8 |
<script src="https://cdn.tailwindcss.com"></script>
|
9 |
-
|
|
|
10 |
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
|
11 |
<link rel="stylesheet" href="/static/css/styles.css">
|
12 |
</head>
|
@@ -15,48 +16,70 @@
|
|
15 |
<h1 class="text-3xl font-bold text-center"><i class="fas fa-shopping-cart mr-2"></i>TechMart</h1>
|
16 |
</header> -->
|
17 |
|
18 |
-
<main class="flex-grow container mx-auto p-4 flex
|
19 |
-
|
20 |
-
|
21 |
-
<
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
</div>
|
34 |
</main>
|
35 |
|
36 |
|
|
|
37 |
<!-- <footer class="bg-gray-800 p-4 text-center">
|
38 |
<p>© 2023 TechMart. Tous droits réservés.</p>
|
39 |
</footer> -->
|
40 |
|
41 |
<script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
|
|
|
|
|
|
|
|
48 |
});
|
49 |
|
50 |
document.getElementById('login-form').addEventListener('submit', async function(event) {
|
51 |
event.preventDefault();
|
52 |
|
53 |
-
|
54 |
const email = document.getElementById('email').value;
|
55 |
|
56 |
try {
|
57 |
const emailEncoded = encodeURIComponent(email);
|
58 |
|
59 |
-
const url =
|
60 |
|
61 |
const response = await fetch(url, {
|
62 |
method: 'POST',
|
@@ -72,10 +95,10 @@
|
|
72 |
}
|
73 |
|
74 |
} catch (error) {
|
75 |
-
document.getElementById('error-message').innerText = '
|
76 |
-
console.error('
|
77 |
}
|
78 |
});
|
79 |
</script>
|
80 |
</body>
|
81 |
-
</html>
|
|
|
4 |
<head>
|
5 |
<meta charset="UTF-8">
|
6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7 |
+
<title>Zauth. - Connexion</title>
|
8 |
<script src="https://cdn.tailwindcss.com"></script>
|
9 |
+
<!-- ScrollReveal CDN -->
|
10 |
+
<script src="https://unpkg.com/scrollreveal"></script>
|
11 |
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
|
12 |
<link rel="stylesheet" href="/static/css/styles.css">
|
13 |
</head>
|
|
|
16 |
<h1 class="text-3xl font-bold text-center"><i class="fas fa-shopping-cart mr-2"></i>TechMart</h1>
|
17 |
</header> -->
|
18 |
|
19 |
+
<main class="flex-grow container mx-auto p-4 flex flex-col">
|
20 |
+
<!-- Section du Titre -->
|
21 |
+
<header class="mb-20 pt-4">
|
22 |
+
<h1 class="text-4xl font-bold text-left text-white icon-geistmono">Zauth.</h1>
|
23 |
+
</header>
|
24 |
+
|
25 |
+
<!-- Section de la Boîte de Connexion -->
|
26 |
+
<div class="flex-grow flex items-center justify-center">
|
27 |
+
<div class="max-w-md w-full bg-gray-800/40 backdrop-blur-md rounded-xl shadow-lg p-6 transform transition-all duration-300 hover:scale-102 hover:shadow-md reveal-box">
|
28 |
+
<!-- Application de la police GeistMono -->
|
29 |
+
<h2 class="text-3xl font-semibold mb-6 text-center text-white icon-geistmono">Welcome 🤗</h2>
|
30 |
+
<form id="login-form" method="POST" action="/login" class="space-y-6">
|
31 |
+
<div>
|
32 |
+
<label for="email" class="block text-sm text-gray-300 icon-geistmono"> Email Address </label>
|
33 |
+
<input type="email" id="email" name="email" required
|
34 |
+
class="w-full px-4 py-3 mt-2 bg-gray-700 text-white rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50 transition duration-300 ease-in-out">
|
35 |
+
</div>
|
36 |
+
<button type="submit"
|
37 |
+
class="w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 px-4 rounded-lg transition-all duration-300 ease-in-out transform hover:scale-102">
|
38 |
+
<i class="fas mr-2 icon-geistmono">Connexion</i>
|
39 |
+
</button>
|
40 |
+
</form>
|
41 |
+
<div id="error-message" class="mt-4 text-center text-red-500"></div>
|
42 |
+
</div>
|
43 |
</div>
|
44 |
</main>
|
45 |
|
46 |
|
47 |
+
|
48 |
<!-- <footer class="bg-gray-800 p-4 text-center">
|
49 |
<p>© 2023 TechMart. Tous droits réservés.</p>
|
50 |
</footer> -->
|
51 |
|
52 |
<script>
|
53 |
+
// Initialisation de ScrollReveal
|
54 |
+
ScrollReveal().reveal('.reveal-box', {
|
55 |
+
duration: 1000,
|
56 |
+
origin: 'top',
|
57 |
+
distance: '50px',
|
58 |
+
opacity: 0,
|
59 |
+
easing: 'ease-out',
|
60 |
+
reset: false
|
61 |
+
});
|
62 |
|
63 |
+
// Si vous souhaitez animer d'autres éléments, vous pouvez les ajouter ici
|
64 |
+
ScrollReveal().reveal('.icon-geistmono', {
|
65 |
+
duration: 1000,
|
66 |
+
origin: 'bottom',
|
67 |
+
distance: '20px',
|
68 |
+
opacity: 0,
|
69 |
+
easing: 'ease-out',
|
70 |
+
reset: false,
|
71 |
+
interval: 200
|
72 |
});
|
73 |
|
74 |
document.getElementById('login-form').addEventListener('submit', async function(event) {
|
75 |
event.preventDefault();
|
76 |
|
|
|
77 |
const email = document.getElementById('email').value;
|
78 |
|
79 |
try {
|
80 |
const emailEncoded = encodeURIComponent(email);
|
81 |
|
82 |
+
const url = `/check_user_exists?user_id=${emailEncoded}`; // Utilisation d'un chemin relatif
|
83 |
|
84 |
const response = await fetch(url, {
|
85 |
method: 'POST',
|
|
|
95 |
}
|
96 |
|
97 |
} catch (error) {
|
98 |
+
document.getElementById('error-message').innerText = 'Une erreur est survenue. Veuillez réessayer.';
|
99 |
+
console.error('Erreur lors de la requête :', error);
|
100 |
}
|
101 |
});
|
102 |
</script>
|
103 |
</body>
|
104 |
+
</html>
|