- templates/index.html +43 -59
templates/index.html
CHANGED
|
@@ -46,11 +46,7 @@
|
|
| 46 |
}
|
| 47 |
</script>
|
| 48 |
<style>
|
| 49 |
-
|
| 50 |
-
background: linear-gradient(-45deg, #4CAF50, #81C784, #2E7D32, #1B5E20);
|
| 51 |
-
background-size: 400% 400%;
|
| 52 |
-
animation: gradient 8s ease infinite;
|
| 53 |
-
}
|
| 54 |
.markdown-content {
|
| 55 |
width: 100%;
|
| 56 |
overflow-wrap: break-word;
|
|
@@ -125,54 +121,42 @@
|
|
| 125 |
.animate-fade-in {
|
| 126 |
animation: fadeIn 1s ease-out;
|
| 127 |
}
|
| 128 |
-
|
| 129 |
-
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
|
| 130 |
-
backdrop-filter: blur(8px);
|
| 131 |
-
transition: all 0.3s ease;
|
| 132 |
-
}
|
| 133 |
-
.card:hover {
|
| 134 |
-
transform: translateY(-4px);
|
| 135 |
-
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
|
| 136 |
-
}
|
| 137 |
-
.glass-effect {
|
| 138 |
-
background: rgba(255, 255, 255, 0.95);
|
| 139 |
-
backdrop-filter: blur(10px);
|
| 140 |
-
}
|
| 141 |
</style>
|
| 142 |
</head>
|
| 143 |
-
<body class="
|
| 144 |
<div class="container mx-auto px-4 py-12 max-w-6xl">
|
| 145 |
-
<!-- Header -->
|
| 146 |
-
<header class="text-center mb-16 animate-fade-in">
|
| 147 |
-
<h1 class="text-6xl font-bold text-
|
| 148 |
-
✨ Mariam Anglais ✨
|
| 149 |
-
</h1>
|
| 150 |
-
<p class="text-
|
| 151 |
-
Téléchargez vos images, choisissez votre type d'analyse et laissez la magie opérer.
|
| 152 |
-
</p>
|
| 153 |
-
</header>
|
| 154 |
|
| 155 |
<!-- Main Content -->
|
| 156 |
<div class="grid md:grid-cols-2 gap-12">
|
| 157 |
-
<!-- Upload Section -->
|
| 158 |
-
<div class="
|
| 159 |
<h2 class="text-2xl font-semibold text-primary mb-6 flex items-center gap-2">
|
| 160 |
<svg class="h-8 w-8 text-primary" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
| 161 |
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"></path>
|
| 162 |
</svg>
|
| 163 |
Téléchargement d'images
|
| 164 |
</h2>
|
| 165 |
-
<div
|
| 166 |
-
class="upload-zone
|
| 167 |
-
onclick="document.getElementById('image-upload').click()">
|
| 168 |
<input type="file" id="image-upload" multiple accept="image/*" class="hidden" />
|
| 169 |
<p class="text-gray-600 font-medium">Cliquez ou glissez vos images ici</p>
|
| 170 |
</div>
|
| 171 |
<div id="preview-container" class="mt-6 grid grid-cols-2 gap-4"></div>
|
| 172 |
</div>
|
| 173 |
|
| 174 |
-
<!-- Analysis Type Section -->
|
| 175 |
-
<div class="
|
| 176 |
<h2 class="text-2xl font-semibold text-primary mb-6 flex items-center gap-2">
|
| 177 |
<svg class="h-8 w-8 text-primary" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
| 178 |
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 17v-2a4 4 0 00-4-4H3"></path>
|
|
@@ -181,7 +165,7 @@
|
|
| 181 |
Choix du type d'analyse
|
| 182 |
</h2>
|
| 183 |
<div class="space-y-6">
|
| 184 |
-
<label class="flex flex-col p-5
|
| 185 |
<div class="flex items-center">
|
| 186 |
<input type="radio" name="analysis_type" value="text" class="h-5 w-5 text-primary" />
|
| 187 |
<span class="ml-3 text-lg font-medium text-secondary">🔍 Analyse de Texte</span>
|
|
@@ -190,7 +174,7 @@
|
|
| 190 |
Analyse de texte détaillée comprenant INTRODUCTION, SUMMARY, COMMENTARY et EVALUATION.
|
| 191 |
</p>
|
| 192 |
</label>
|
| 193 |
-
<label class="flex flex-col p-5
|
| 194 |
<div class="flex items-center">
|
| 195 |
<input type="radio" name="analysis_type" value="icon" class="h-5 w-5 text-primary" />
|
| 196 |
<span class="ml-3 text-lg font-medium text-secondary">🧠 Document iconographique</span>
|
|
@@ -200,14 +184,14 @@
|
|
| 200 |
</p>
|
| 201 |
</label>
|
| 202 |
</div>
|
| 203 |
-
<button id="submit-btn" class="w-full mt-8 bg-primary hover:bg-primary-dark text-white font-bold py-4 px-6
|
| 204 |
🚀 Soumettre
|
| 205 |
</button>
|
| 206 |
</div>
|
| 207 |
</div>
|
| 208 |
|
| 209 |
-
<!-- Results Section -->
|
| 210 |
-
<div id="results" class="mt-16
|
| 211 |
<div class="flex justify-between items-center mb-6">
|
| 212 |
<h2 class="text-2xl font-semibold text-primary">📝 Résultat de l'analyse</h2>
|
| 213 |
<button onclick="copyResults()" class="flex items-center gap-2 bg-primary/10 hover:bg-primary/20 text-primary px-4 py-2 rounded-lg transition-all duration-300">
|
|
@@ -220,11 +204,11 @@
|
|
| 220 |
<div id="analysis-result" class="markdown-content prose max-w-none"></div>
|
| 221 |
</div>
|
| 222 |
|
| 223 |
-
<!-- Footer -->
|
| 224 |
-
<footer class="mt-16 text-center text-
|
| 225 |
-
<hr class="my-6 border-
|
| 226 |
-
<p>© 2025 Mariam AI - Tous droits réservés.</p>
|
| 227 |
-
</footer>
|
| 228 |
</div>
|
| 229 |
|
| 230 |
<script>
|
|
@@ -252,21 +236,21 @@
|
|
| 252 |
|
| 253 |
const uploadZone = document.querySelector('.upload-zone');
|
| 254 |
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
|
| 270 |
|
| 271 |
function handleFileSelect(event) {
|
| 272 |
uploadedFiles = Array.from(event.target.files);
|
|
|
|
| 46 |
}
|
| 47 |
</script>
|
| 48 |
<style>
|
| 49 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
.markdown-content {
|
| 51 |
width: 100%;
|
| 52 |
overflow-wrap: break-word;
|
|
|
|
| 121 |
.animate-fade-in {
|
| 122 |
animation: fadeIn 1s ease-out;
|
| 123 |
}
|
| 124 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 125 |
</style>
|
| 126 |
</head>
|
| 127 |
+
<body class="bg-white min-h-screen font-sans">
|
| 128 |
<div class="container mx-auto px-4 py-12 max-w-6xl">
|
| 129 |
+
<!-- Header -->
|
| 130 |
+
<header class="text-center mb-16 animate-fade-in">
|
| 131 |
+
<h1 class="text-6xl font-bold text-gray-900 mb-4">
|
| 132 |
+
✨ Mariam Anglais ✨
|
| 133 |
+
</h1>
|
| 134 |
+
<p class="text-gray-600 text-xl font-light tracking-wide">
|
| 135 |
+
Téléchargez vos images, choisissez votre type d'analyse et laissez la magie opérer.
|
| 136 |
+
</p>
|
| 137 |
+
</header>
|
| 138 |
|
| 139 |
<!-- Main Content -->
|
| 140 |
<div class="grid md:grid-cols-2 gap-12">
|
| 141 |
+
<!-- Upload Section -->
|
| 142 |
+
<div class="bg-gray-50 p-8">
|
| 143 |
<h2 class="text-2xl font-semibold text-primary mb-6 flex items-center gap-2">
|
| 144 |
<svg class="h-8 w-8 text-primary" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
| 145 |
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"></path>
|
| 146 |
</svg>
|
| 147 |
Téléchargement d'images
|
| 148 |
</h2>
|
| 149 |
+
<div
|
| 150 |
+
class="upload-zone bg-gray-100 p-10 text-center cursor-pointer hover:bg-gray-200 transition-colors duration-300"
|
| 151 |
+
onclick="document.getElementById('image-upload').click()">
|
| 152 |
<input type="file" id="image-upload" multiple accept="image/*" class="hidden" />
|
| 153 |
<p class="text-gray-600 font-medium">Cliquez ou glissez vos images ici</p>
|
| 154 |
</div>
|
| 155 |
<div id="preview-container" class="mt-6 grid grid-cols-2 gap-4"></div>
|
| 156 |
</div>
|
| 157 |
|
| 158 |
+
<!-- Analysis Type Section -->
|
| 159 |
+
<div class="bg-gray-50 p-8">
|
| 160 |
<h2 class="text-2xl font-semibold text-primary mb-6 flex items-center gap-2">
|
| 161 |
<svg class="h-8 w-8 text-primary" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
| 162 |
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 17v-2a4 4 0 00-4-4H3"></path>
|
|
|
|
| 165 |
Choix du type d'analyse
|
| 166 |
</h2>
|
| 167 |
<div class="space-y-6">
|
| 168 |
+
<label class="flex flex-col p-5 bg-white cursor-pointer hover:bg-gray-100 transition-colors duration-300">
|
| 169 |
<div class="flex items-center">
|
| 170 |
<input type="radio" name="analysis_type" value="text" class="h-5 w-5 text-primary" />
|
| 171 |
<span class="ml-3 text-lg font-medium text-secondary">🔍 Analyse de Texte</span>
|
|
|
|
| 174 |
Analyse de texte détaillée comprenant INTRODUCTION, SUMMARY, COMMENTARY et EVALUATION.
|
| 175 |
</p>
|
| 176 |
</label>
|
| 177 |
+
<label class="flex flex-col p-5 bg-white cursor-pointer hover:bg-gray-100 transition-colors duration-300">
|
| 178 |
<div class="flex items-center">
|
| 179 |
<input type="radio" name="analysis_type" value="icon" class="h-5 w-5 text-primary" />
|
| 180 |
<span class="ml-3 text-lg font-medium text-secondary">🧠 Document iconographique</span>
|
|
|
|
| 184 |
</p>
|
| 185 |
</label>
|
| 186 |
</div>
|
| 187 |
+
<button id="submit-btn" class="w-full mt-8 bg-primary hover:bg-primary-dark text-white font-bold py-4 px-6 transition-colors duration-300 disabled:opacity-50 disabled:cursor-not-allowed">
|
| 188 |
🚀 Soumettre
|
| 189 |
</button>
|
| 190 |
</div>
|
| 191 |
</div>
|
| 192 |
|
| 193 |
+
<!-- Results Section -->
|
| 194 |
+
<div id="results" class="mt-16 bg-gray-50 p-8 hidden animate-fade-in">
|
| 195 |
<div class="flex justify-between items-center mb-6">
|
| 196 |
<h2 class="text-2xl font-semibold text-primary">📝 Résultat de l'analyse</h2>
|
| 197 |
<button onclick="copyResults()" class="flex items-center gap-2 bg-primary/10 hover:bg-primary/20 text-primary px-4 py-2 rounded-lg transition-all duration-300">
|
|
|
|
| 204 |
<div id="analysis-result" class="markdown-content prose max-w-none"></div>
|
| 205 |
</div>
|
| 206 |
|
| 207 |
+
<!-- Footer -->
|
| 208 |
+
<footer class="mt-16 text-center text-gray-600">
|
| 209 |
+
<hr class="my-6 border-gray-300" />
|
| 210 |
+
<p>© 2025 Mariam AI - Tous droits réservés.</p>
|
| 211 |
+
</footer>
|
| 212 |
</div>
|
| 213 |
|
| 214 |
<script>
|
|
|
|
| 236 |
|
| 237 |
const uploadZone = document.querySelector('.upload-zone');
|
| 238 |
|
| 239 |
+
uploadZone.addEventListener('dragover', (e) => {
|
| 240 |
+
e.preventDefault();
|
| 241 |
+
uploadZone.classList.add('bg-gray-200');
|
| 242 |
+
});
|
| 243 |
+
|
| 244 |
+
uploadZone.addEventListener('dragleave', () => {
|
| 245 |
+
uploadZone.classList.remove('bg-gray-200');
|
| 246 |
+
});
|
| 247 |
|
| 248 |
+
uploadZone.addEventListener('drop', (e) => {
|
| 249 |
+
e.preventDefault();
|
| 250 |
+
uploadZone.classList.remove('bg-gray-200');
|
| 251 |
+
uploadedFiles = Array.from(e.dataTransfer.files).filter(file => file.type.startsWith('image/'));
|
| 252 |
+
updatePreview();
|
| 253 |
+
});
|
| 254 |
|
| 255 |
function handleFileSelect(event) {
|
| 256 |
uploadedFiles = Array.from(event.target.files);
|