Docfile commited on
Commit
16d9b01
·
verified ·
1 Parent(s): 024ae60

Upload mariam-ai-mobile.html

Browse files
Files changed (1) hide show
  1. templates/mariam-ai-mobile.html +548 -0
templates/mariam-ai-mobile.html ADDED
@@ -0,0 +1,548 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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>Mariam AI - Analyse Littéraire</title>
7
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/marked/9.1.6/marked.min.js"></script>
8
+ <style>
9
+ @import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Inter:wght@300;400;500;600;700&display=swap');
10
+
11
+ :root {
12
+ --primary: #4361ee;
13
+ --primary-dark: #3a56d4;
14
+ --secondary: #2b2d42;
15
+ --accent: #ef476f;
16
+ --light: #f8f9fa;
17
+ --gray-100: #f1f3f5;
18
+ --gray-200: #e9ecef;
19
+ --gray-300: #dee2e6;
20
+ --gray-400: #ced4da;
21
+ --gray-700: #495057;
22
+ --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
23
+ --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
24
+ --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
25
+ --radius-sm: 0.375rem;
26
+ --radius-md: 0.5rem;
27
+ --radius-lg: 0.75rem;
28
+ }
29
+
30
+ * {
31
+ margin: 0;
32
+ padding: 0;
33
+ box-sizing: border-box;
34
+ }
35
+
36
+ body {
37
+ font-family: 'Inter', sans-serif;
38
+ background: linear-gradient(135deg, #f6f8fb 0%, #f1f3f5 100%);
39
+ color: var(--secondary);
40
+ line-height: 1.6;
41
+ padding-bottom: 2rem;
42
+ }
43
+
44
+ header {
45
+ background-color: white;
46
+ padding: 1.5rem 1rem;
47
+ text-align: center;
48
+ box-shadow: var(--shadow-sm);
49
+ position: relative;
50
+ z-index: 10;
51
+ }
52
+
53
+ .logo {
54
+ font-family: 'Playfair Display', serif;
55
+ font-size: 2rem;
56
+ color: var(--secondary);
57
+ margin-bottom: 0.25rem;
58
+ }
59
+
60
+ .tagline {
61
+ font-size: 0.9rem;
62
+ color: var(--gray-700);
63
+ font-weight: 500;
64
+ }
65
+
66
+ .card {
67
+ background: white;
68
+ border-radius: var(--radius-lg);
69
+ box-shadow: var(--shadow-md);
70
+ padding: 1.5rem;
71
+ margin: 1rem;
72
+ transition: transform 0.2s ease, box-shadow 0.2s ease;
73
+ }
74
+
75
+ .upload-area {
76
+ border: 2px dashed var(--gray-300);
77
+ border-radius: var(--radius-md);
78
+ padding: 1.5rem 1rem;
79
+ text-align: center;
80
+ cursor: pointer;
81
+ transition: all 0.2s ease;
82
+ margin: 1.5rem 0;
83
+ }
84
+
85
+ .upload-area:hover, .upload-area.active {
86
+ border-color: var(--primary);
87
+ background-color: rgba(67, 97, 238, 0.05);
88
+ }
89
+
90
+ .upload-icon {
91
+ width: 3.5rem;
92
+ height: 3.5rem;
93
+ margin: 0 auto 1rem;
94
+ color: var(--gray-400);
95
+ }
96
+
97
+ .upload-area:hover .upload-icon, .upload-area.active .upload-icon {
98
+ color: var(--primary);
99
+ }
100
+
101
+ .input-group {
102
+ margin-bottom: 1.5rem;
103
+ }
104
+
105
+ .label {
106
+ display: block;
107
+ margin-bottom: 0.5rem;
108
+ font-weight: 600;
109
+ font-size: 0.9rem;
110
+ }
111
+
112
+ .input {
113
+ width: 100%;
114
+ padding: 0.75rem;
115
+ border: 1px solid var(--gray-300);
116
+ border-radius: var(--radius-md);
117
+ font-family: 'Inter', sans-serif;
118
+ font-size: 1rem;
119
+ transition: border-color 0.2s ease;
120
+ }
121
+
122
+ .input:focus {
123
+ outline: none;
124
+ border-color: var(--primary);
125
+ box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
126
+ }
127
+
128
+ .preview-container {
129
+ margin: 1.5rem 0;
130
+ }
131
+
132
+ .preview-title {
133
+ font-weight: 600;
134
+ margin-bottom: 0.5rem;
135
+ font-size: 0.9rem;
136
+ }
137
+
138
+ .preview-image-container {
139
+ background-color: var(--gray-100);
140
+ border-radius: var(--radius-md);
141
+ overflow: hidden;
142
+ position: relative;
143
+ }
144
+
145
+ .preview-image {
146
+ max-width: 100%;
147
+ max-height: 15rem;
148
+ margin: 0 auto;
149
+ display: block;
150
+ }
151
+
152
+ .btn {
153
+ display: block;
154
+ width: 100%;
155
+ padding: 0.875rem;
156
+ font-weight: 600;
157
+ text-align: center;
158
+ border: none;
159
+ border-radius: var(--radius-md);
160
+ cursor: pointer;
161
+ transition: all 0.2s ease;
162
+ font-size: 1rem;
163
+ }
164
+
165
+ .btn-primary {
166
+ background-color: var(--primary);
167
+ color: white;
168
+ }
169
+
170
+ .btn-primary:hover, .btn-primary:focus {
171
+ background-color: var(--primary-dark);
172
+ transform: translateY(-1px);
173
+ box-shadow: var(--shadow-md);
174
+ }
175
+
176
+ .btn-primary:active {
177
+ transform: translateY(0);
178
+ }
179
+
180
+ .loading-overlay {
181
+ position: fixed;
182
+ top: 0;
183
+ left: 0;
184
+ right: 0;
185
+ bottom: 0;
186
+ background-color: rgba(0, 0, 0, 0.5);
187
+ display: flex;
188
+ justify-content: center;
189
+ align-items: center;
190
+ z-index: 100;
191
+ }
192
+
193
+ .loading-card {
194
+ background-color: white;
195
+ padding: 2rem;
196
+ border-radius: var(--radius-lg);
197
+ box-shadow: var(--shadow-lg);
198
+ text-align: center;
199
+ max-width: 80%;
200
+ }
201
+
202
+ .spinner {
203
+ width: 3rem;
204
+ height: 3rem;
205
+ border: 4px solid var(--gray-200);
206
+ border-radius: 50%;
207
+ border-top-color: var(--primary);
208
+ animation: spin 1s linear infinite;
209
+ margin: 0 auto 1rem;
210
+ }
211
+
212
+ @keyframes spin {
213
+ to { transform: rotate(360deg); }
214
+ }
215
+
216
+ .result-card {
217
+ padding: 0;
218
+ overflow: hidden;
219
+ }
220
+
221
+ .tabs {
222
+ display: flex;
223
+ border-bottom: 1px solid var(--gray-200);
224
+ }
225
+
226
+ .tab {
227
+ flex: 1;
228
+ text-align: center;
229
+ padding: 1rem 0.5rem;
230
+ font-weight: 600;
231
+ font-size: 0.9rem;
232
+ color: var(--gray-700);
233
+ background-color: transparent;
234
+ border: none;
235
+ border-bottom: 2px solid transparent;
236
+ cursor: pointer;
237
+ }
238
+
239
+ .tab.active {
240
+ color: var(--primary);
241
+ border-bottom-color: var(--primary);
242
+ }
243
+
244
+ .tab-content {
245
+ padding: 1.5rem;
246
+ }
247
+
248
+ .custom-prose {
249
+ font-size: 1rem;
250
+ line-height: 1.8;
251
+ }
252
+
253
+ .custom-prose h1, .custom-prose h2, .custom-prose h3 {
254
+ font-family: 'Playfair Display', serif;
255
+ margin-top: 1.5em;
256
+ margin-bottom: 0.75em;
257
+ line-height: 1.3;
258
+ }
259
+
260
+ .custom-prose h1 {
261
+ font-size: 1.75rem;
262
+ }
263
+
264
+ .custom-prose h2 {
265
+ font-size: 1.5rem;
266
+ }
267
+
268
+ .custom-prose h3 {
269
+ font-size: 1.25rem;
270
+ }
271
+
272
+ .custom-prose p {
273
+ margin-bottom: 1.25em;
274
+ }
275
+
276
+ .custom-prose ul, .custom-prose ol {
277
+ margin-top: 1em;
278
+ margin-bottom: 1em;
279
+ padding-left: 1.5em;
280
+ }
281
+
282
+ .custom-prose li {
283
+ margin-bottom: 0.5em;
284
+ }
285
+
286
+ .markdown-table {
287
+ overflow-x: auto;
288
+ -webkit-overflow-scrolling: touch;
289
+ }
290
+
291
+ .markdown-table table {
292
+ width: 100%;
293
+ border-collapse: separate;
294
+ border-spacing: 0;
295
+ margin: 1em 0;
296
+ }
297
+
298
+ .markdown-table th {
299
+ background: var(--primary);
300
+ color: white;
301
+ font-weight: 600;
302
+ padding: 0.75rem;
303
+ text-align: left;
304
+ font-size: 0.9rem;
305
+ }
306
+
307
+ .markdown-table td {
308
+ padding: 0.75rem;
309
+ border-bottom: 1px solid var(--gray-200);
310
+ font-size: 0.9rem;
311
+ }
312
+
313
+ .markdown-table tr:hover {
314
+ background: var(--gray-100);
315
+ }
316
+
317
+ .upload-instructions {
318
+ font-size: 0.85rem;
319
+ color: var(--gray-700);
320
+ margin-top: 0.5rem;
321
+ }
322
+
323
+ .file-input {
324
+ display: none;
325
+ }
326
+
327
+ .slide-up {
328
+ animation: slide-up 0.4s ease forwards;
329
+ }
330
+
331
+ @keyframes slide-up {
332
+ from {
333
+ opacity: 0;
334
+ transform: translateY(20px);
335
+ }
336
+ to {
337
+ opacity: 1;
338
+ transform: translateY(0);
339
+ }
340
+ }
341
+
342
+ .shimmer {
343
+ position: absolute;
344
+ top: 0;
345
+ left: -100%;
346
+ width: 50%;
347
+ height: 100%;
348
+ background: linear-gradient(90deg,
349
+ rgba(255,255,255,0) 0%,
350
+ rgba(255,255,255,0.2) 50%,
351
+ rgba(255,255,255,0) 100%);
352
+ animation: shimmer 2s infinite;
353
+ }
354
+
355
+ @keyframes shimmer {
356
+ to {
357
+ left: 100%;
358
+ }
359
+ }
360
+ </style>
361
+ </head>
362
+
363
+ <body>
364
+ <header>
365
+ <h1 class="logo">Mariam AI</h1>
366
+ <p class="tagline">Assistant d'Analyse Littéraire</p>
367
+ </header>
368
+
369
+ <main>
370
+ <div class="card">
371
+ <form id="uploadForm">
372
+ <div class="input-group">
373
+ <label for="imageInput" class="label">Votre document</label>
374
+ <div id="uploadArea" class="upload-area">
375
+ <svg class="upload-icon" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
376
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12" />
377
+ </svg>
378
+ <p>Touchez pour télécharger</p>
379
+ <p class="upload-instructions">PNG, JPG jusqu'à 10MB</p>
380
+ <input id="imageInput" type="file" class="file-input" accept="image/*" required>
381
+ </div>
382
+ </div>
383
+
384
+ <div class="input-group">
385
+ <label for="consignesInput" class="label">Consignes (optionnel)</label>
386
+ <input id="consignesInput" type="text" class="input" placeholder="Entrez vos consignes ici">
387
+ </div>
388
+
389
+ <div id="previewContainer" class="preview-container" style="display: none;">
390
+ <p class="preview-title">Aperçu du document</p>
391
+ <div class="preview-image-container">
392
+ <img id="previewImage" class="preview-image" src="#" alt="Aperçu">
393
+ </div>
394
+ </div>
395
+
396
+ <button type="submit" class="btn btn-primary">
397
+ Lancer l'analyse
398
+ </button>
399
+ </form>
400
+ </div>
401
+
402
+ <div id="result" class="card result-card" style="display: none;">
403
+ <div class="tabs">
404
+ <button id="dissertationTab" class="tab active">Dissertation</button>
405
+ <button id="tableauTab" class="tab">Tableau</button>
406
+ </div>
407
+ <div class="tab-content">
408
+ <div id="dissertationContent" class="custom-prose"></div>
409
+ <div id="tableauContent" class="markdown-table" style="display: none;"></div>
410
+ </div>
411
+ </div>
412
+ </main>
413
+
414
+ <div id="loading" class="loading-overlay" style="display: none;">
415
+ <div class="loading-card">
416
+ <div class="spinner"></div>
417
+ <p>Analyse en cours...</p>
418
+ </div>
419
+ </div>
420
+
421
+ <script>
422
+ const uploadForm = document.getElementById('uploadForm');
423
+ const imageInput = document.getElementById('imageInput');
424
+ const uploadArea = document.getElementById('uploadArea');
425
+ const previewContainer = document.getElementById('previewContainer');
426
+ const previewImage = document.getElementById('previewImage');
427
+ const loadingIndicator = document.getElementById('loading');
428
+ const resultDiv = document.getElementById('result');
429
+ const dissertationTab = document.getElementById('dissertationTab');
430
+ const tableauTab = document.getElementById('tableauTab');
431
+ const dissertationContent = document.getElementById('dissertationContent');
432
+ const tableauContent = document.getElementById('tableauContent');
433
+
434
+ // Configuration de marked
435
+ marked.setOptions({
436
+ breaks: true,
437
+ gfm: true
438
+ });
439
+
440
+ // Événements tactiles pour l'upload
441
+ uploadArea.addEventListener('click', function() {
442
+ imageInput.click();
443
+ });
444
+
445
+ // Effet visuel au toucher pour mobiles
446
+ uploadArea.addEventListener('touchstart', function() {
447
+ this.classList.add('active');
448
+ });
449
+
450
+ uploadArea.addEventListener('touchend', function() {
451
+ this.classList.remove('active');
452
+ });
453
+
454
+ // Prévisualisation
455
+ imageInput.addEventListener('change', function() {
456
+ const file = this.files[0];
457
+ if (file) {
458
+ const reader = new FileReader();
459
+ reader.onload = function(e) {
460
+ previewImage.src = e.target.result;
461
+ previewContainer.style.display = 'block';
462
+ previewContainer.classList.add('slide-up');
463
+
464
+ // Animation de l'effet de focus
465
+ uploadArea.classList.add('active');
466
+ setTimeout(() => uploadArea.classList.remove('active'), 500);
467
+ }
468
+ reader.readAsDataURL(file);
469
+ } else {
470
+ previewContainer.style.display = 'none';
471
+ }
472
+ });
473
+
474
+ // Gestion des onglets
475
+ dissertationTab.addEventListener('click', function() {
476
+ dissertationTab.classList.add('active');
477
+ tableauTab.classList.remove('active');
478
+ dissertationContent.style.display = 'block';
479
+ tableauContent.style.display = 'none';
480
+ });
481
+
482
+ tableauTab.addEventListener('click', function() {
483
+ tableauTab.classList.add('active');
484
+ dissertationTab.classList.remove('active');
485
+ tableauContent.style.display = 'block';
486
+ dissertationContent.style.display = 'none';
487
+ });
488
+
489
+ // Soumission du formulaire
490
+ uploadForm.addEventListener('submit', function(e) {
491
+ e.preventDefault();
492
+ loadingIndicator.style.display = 'flex';
493
+
494
+ // Simulation de l'envoi et réception des données
495
+ // Dans une application réelle, utilisez fetch() comme dans le code original
496
+ setTimeout(() => {
497
+ loadingIndicator.style.display = 'none';
498
+
499
+ // Données fictives pour la démonstration
500
+ const data = {
501
+ dissertation: `# Analyse de Baudelaire: Les Fleurs du Mal
502
+
503
+ Dans cette œuvre majeure du XIXe siècle, Baudelaire révèle la dualité de l'existence humaine à travers une poésie à la fois sublime et déchirante.
504
+
505
+ ## Le spleen et l'idéal
506
+
507
+ Baudelaire explore la tension entre l'aspiration à la beauté et le poids de l'existence quotidienne. Cette dualité constitue l'essence même de sa poétique.
508
+
509
+ ## La modernité baudelairienne
510
+
511
+ En faisant de la ville et de ses aspects les plus sombres un objet poétique, Baudelaire invente une nouvelle façon de percevoir la modernité et influence toute la poésie qui suivra.`,
512
+
513
+ tableau: `| Thème | Poèmes représentatifs | Analyse |
514
+ |-------|----------------------|---------|
515
+ | Spleen | "Spleen I-IV", "De profundis clamavi" | Expression du mal-être, ennui, mélancolie |
516
+ | Idéal | "L'Invitation au voyage", "Élévation" | Aspiration vers la beauté, évasion |
517
+ | Amour | "À une passante", "Le Vampire" | Amour impossible, femme fatale |
518
+ | Mort | "La Charogne", "Une Martyre" | Fascination pour la décomposition |`
519
+ };
520
+
521
+ dissertationContent.innerHTML = marked.parse(data.dissertation);
522
+ tableauContent.innerHTML = marked.parse(data.tableau);
523
+
524
+ resultDiv.style.display = 'block';
525
+ resultDiv.classList.add('slide-up');
526
+
527
+ // Scroll vers les résultats
528
+ resultDiv.scrollIntoView({ behavior: 'smooth' });
529
+ }, 2000);
530
+ });
531
+
532
+ // Amélioration de l'expérience tactile
533
+ document.addEventListener('DOMContentLoaded', function() {
534
+ const interactiveElements = document.querySelectorAll('.btn, .tab, .upload-area');
535
+
536
+ interactiveElements.forEach(el => {
537
+ el.addEventListener('touchstart', function() {
538
+ this.style.transform = 'scale(0.98)';
539
+ });
540
+
541
+ el.addEventListener('touchend', function() {
542
+ this.style.transform = 'scale(1)';
543
+ });
544
+ });
545
+ });
546
+ </script>
547
+ </body>
548
+ </html>