Spaces:
Running
Running
Update templates/index.html
Browse files- templates/index.html +4 -36
templates/index.html
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
-
<title>Mariam M-
|
7 |
<!-- Tailwind CSS -->
|
8 |
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
|
9 |
<!-- SweetAlert2 -->
|
@@ -26,7 +26,7 @@
|
|
26 |
}
|
27 |
};
|
28 |
</script>
|
29 |
-
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-
|
30 |
<script src="https://cdn.jsdelivr.net/npm/marked@15.0.7/lib/marked.umd.min.js"></script>
|
31 |
<style>
|
32 |
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;700&display=swap');
|
@@ -36,16 +36,6 @@
|
|
36 |
.blue-button { background: #3b82f6; transition: background-color 0.2s ease; }
|
37 |
.blue-button:hover { background: #2563eb; }
|
38 |
.blue-button:disabled { background: #9ca3af; cursor: not-allowed; }
|
39 |
-
.promo-button {
|
40 |
-
background: linear-gradient(135deg, #dc2626, #ef4444);
|
41 |
-
transition: all 0.3s ease;
|
42 |
-
box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
|
43 |
-
}
|
44 |
-
.promo-button:hover {
|
45 |
-
background: linear-gradient(135deg, #b91c1c, #dc2626);
|
46 |
-
transform: translateY(-2px);
|
47 |
-
box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
|
48 |
-
}
|
49 |
.loader {
|
50 |
width: 48px; height: 48px; border: 3px solid #3b82f6; border-bottom-color: transparent;
|
51 |
border-radius: 50%; display: inline-block; animation: rotation 1s linear infinite;
|
@@ -88,19 +78,6 @@
|
|
88 |
</head>
|
89 |
<body class="p-4">
|
90 |
<div class="max-w-4xl mx-auto">
|
91 |
-
<!-- Bouton Promotionnel en Haut -->
|
92 |
-
<div class="mb-6">
|
93 |
-
<button id="promoButton" class="promo-button w-full py-4 px-6 text-white font-bold text-lg rounded-lg flex items-center justify-center space-x-3">
|
94 |
-
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
95 |
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path>
|
96 |
-
</svg>
|
97 |
-
<span>🚀 CLIQUEZ POUR ACCÉDER AU PDF !</span>
|
98 |
-
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
99 |
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path>
|
100 |
-
</svg>
|
101 |
-
</button>
|
102 |
-
</div>
|
103 |
-
|
104 |
<header class="p-6 text-center mb-8">
|
105 |
<h1 class="text-4xl font-bold text-blue-600">Mariam M-1</h1>
|
106 |
<p class="text-gray-600">Solution Mathématique/Physique/Chimie Intelligente</p>
|
@@ -204,8 +181,7 @@
|
|
204 |
savedModal: document.getElementById('savedModal'),
|
205 |
savedList: document.getElementById('savedList'),
|
206 |
newExerciseButton: document.getElementById('newExerciseButton'), // Changé l'ID pour correspondre au HTML
|
207 |
-
dropZone: document.querySelector('.uploadArea')
|
208 |
-
promoButton: document.getElementById('promoButton')
|
209 |
};
|
210 |
|
211 |
// Application State
|
@@ -357,14 +333,6 @@
|
|
357 |
elements.thoughtsToggle.addEventListener('click', () => elements.thoughtsBox.classList.toggle('open'));
|
358 |
elements.imageInput.addEventListener('change', e => handleFileSelect(e.target.files[0]));
|
359 |
|
360 |
-
// Gestionnaire d'événement pour le bouton promotionnel
|
361 |
-
elements.promoButton.addEventListener('click', () => {
|
362 |
-
// Remplacez cette URL par votre page de destination
|
363 |
-
window.open('https://mariam-241.vercel.app/penser', '_blank');
|
364 |
-
|
365 |
-
|
366 |
-
});
|
367 |
-
|
368 |
elements.dropZone.addEventListener('dragover', e => { e.preventDefault(); elements.dropZone.classList.add('border-blue-400'); });
|
369 |
elements.dropZone.addEventListener('dragleave', e => { e.preventDefault(); elements.dropZone.classList.remove('border-blue-400'); });
|
370 |
elements.dropZone.addEventListener('drop', e => {
|
@@ -408,7 +376,7 @@
|
|
408 |
formData.append('image', state.selectedFile);
|
409 |
|
410 |
try {
|
411 |
-
const response = await fetch('/
|
412 |
if (!response.ok) {
|
413 |
throw new Error(`HTTP error! status: ${response.status}`);
|
414 |
}
|
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>Mariam M-0 | Solution Mathématique</title>
|
7 |
<!-- Tailwind CSS -->
|
8 |
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
|
9 |
<!-- SweetAlert2 -->
|
|
|
26 |
}
|
27 |
};
|
28 |
</script>
|
29 |
+
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js" id="MathJax-script" async></script>
|
30 |
<script src="https://cdn.jsdelivr.net/npm/marked@15.0.7/lib/marked.umd.min.js"></script>
|
31 |
<style>
|
32 |
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;700&display=swap');
|
|
|
36 |
.blue-button { background: #3b82f6; transition: background-color 0.2s ease; }
|
37 |
.blue-button:hover { background: #2563eb; }
|
38 |
.blue-button:disabled { background: #9ca3af; cursor: not-allowed; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
.loader {
|
40 |
width: 48px; height: 48px; border: 3px solid #3b82f6; border-bottom-color: transparent;
|
41 |
border-radius: 50%; display: inline-block; animation: rotation 1s linear infinite;
|
|
|
78 |
</head>
|
79 |
<body class="p-4">
|
80 |
<div class="max-w-4xl mx-auto">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
<header class="p-6 text-center mb-8">
|
82 |
<h1 class="text-4xl font-bold text-blue-600">Mariam M-1</h1>
|
83 |
<p class="text-gray-600">Solution Mathématique/Physique/Chimie Intelligente</p>
|
|
|
181 |
savedModal: document.getElementById('savedModal'),
|
182 |
savedList: document.getElementById('savedList'),
|
183 |
newExerciseButton: document.getElementById('newExerciseButton'), // Changé l'ID pour correspondre au HTML
|
184 |
+
dropZone: document.querySelector('.uploadArea')
|
|
|
185 |
};
|
186 |
|
187 |
// Application State
|
|
|
333 |
elements.thoughtsToggle.addEventListener('click', () => elements.thoughtsBox.classList.toggle('open'));
|
334 |
elements.imageInput.addEventListener('change', e => handleFileSelect(e.target.files[0]));
|
335 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
336 |
elements.dropZone.addEventListener('dragover', e => { e.preventDefault(); elements.dropZone.classList.add('border-blue-400'); });
|
337 |
elements.dropZone.addEventListener('dragleave', e => { e.preventDefault(); elements.dropZone.classList.remove('border-blue-400'); });
|
338 |
elements.dropZone.addEventListener('drop', e => {
|
|
|
376 |
formData.append('image', state.selectedFile);
|
377 |
|
378 |
try {
|
379 |
+
const response = await fetch('/solved', { method: 'POST', body: formData });
|
380 |
if (!response.ok) {
|
381 |
throw new Error(`HTTP error! status: ${response.status}`);
|
382 |
}
|