Spaces:
Sleeping
Sleeping
Update templates/generale.html
Browse files- templates/generale.html +25 -8
templates/generale.html
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
<meta charset="UTF-8" />
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
6 |
<title>Question Générale</title>
|
7 |
-
<!-- Style de secours pour
|
8 |
<style>
|
9 |
.hidden { display: none !important; }
|
10 |
</style>
|
@@ -20,6 +20,26 @@
|
|
20 |
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6" defer></script>
|
21 |
<!-- Anime.js -->
|
22 |
<script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.1/anime.min.js" defer></script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
<!-- MathJax -->
|
24 |
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js" defer></script>
|
25 |
<style>
|
@@ -120,11 +140,6 @@
|
|
120 |
margin: 20px 0;
|
121 |
}
|
122 |
|
123 |
-
@keyframes float {
|
124 |
-
0%, 100% { transform: translateY(0); }
|
125 |
-
50% { transform: translateY(-10px); }
|
126 |
-
}
|
127 |
-
|
128 |
@keyframes fadeInScale {
|
129 |
0% {
|
130 |
opacity: 0;
|
@@ -205,6 +220,8 @@
|
|
205 |
</div>
|
206 |
|
207 |
<!-- Affichage de la réponse -->
|
|
|
|
|
208 |
<div id="response" class="hidden"></div>
|
209 |
|
210 |
<!-- Bouton pour copier la réponse -->
|
@@ -234,9 +251,7 @@
|
|
234 |
const urlInput = document.getElementById('urlInput');
|
235 |
const urlList = document.getElementById('urlList');
|
236 |
const url = urlInput.value.trim();
|
237 |
-
|
238 |
if (url) {
|
239 |
-
// Création d'un élément URL avec la classe "url-item"
|
240 |
const urlItem = document.createElement('div');
|
241 |
urlItem.className = 'url-item flex items-center bg-gray-200 p-2 rounded-lg shadow-sm';
|
242 |
urlItem.innerHTML = `
|
@@ -263,7 +278,9 @@
|
|
263 |
const responseDiv = document.getElementById('response');
|
264 |
const copyResponseContainer = document.getElementById('copyResponseContainer');
|
265 |
|
|
|
266 |
loader.classList.remove('hidden');
|
|
|
267 |
responseDiv.innerHTML = '';
|
268 |
responseDiv.classList.add('opacity-0');
|
269 |
copyResponseContainer.classList.add('hidden');
|
|
|
4 |
<meta charset="UTF-8" />
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
6 |
<title>Question Générale</title>
|
7 |
+
<!-- Style de secours pour masquer les éléments dès le début -->
|
8 |
<style>
|
9 |
.hidden { display: none !important; }
|
10 |
</style>
|
|
|
20 |
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6" defer></script>
|
21 |
<!-- Anime.js -->
|
22 |
<script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.1/anime.min.js" defer></script>
|
23 |
+
<!-- Configuration de MathJax -->
|
24 |
+
<script>
|
25 |
+
window.MathJax = {
|
26 |
+
tex: {
|
27 |
+
inlineMath: [['$', '$'], ['\\(', '\\)']],
|
28 |
+
displayMath: [['$$', '$$'], ['\\[', '\\]']],
|
29 |
+
processEscapes: true
|
30 |
+
},
|
31 |
+
options: {
|
32 |
+
skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre']
|
33 |
+
},
|
34 |
+
startup: {
|
35 |
+
pageReady: () => {
|
36 |
+
return MathJax.startup.defaultPageReady().then(() => {
|
37 |
+
console.log('MathJax initial typesetting complete');
|
38 |
+
});
|
39 |
+
}
|
40 |
+
}
|
41 |
+
};
|
42 |
+
</script>
|
43 |
<!-- MathJax -->
|
44 |
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js" defer></script>
|
45 |
<style>
|
|
|
140 |
margin: 20px 0;
|
141 |
}
|
142 |
|
|
|
|
|
|
|
|
|
|
|
143 |
@keyframes fadeInScale {
|
144 |
0% {
|
145 |
opacity: 0;
|
|
|
220 |
</div>
|
221 |
|
222 |
<!-- Affichage de la réponse -->
|
223 |
+
<!-- Note : On peut soit ne pas ajouter la classe "hidden" ici,
|
224 |
+
soit la retirer dynamiquement dans le script -->
|
225 |
<div id="response" class="hidden"></div>
|
226 |
|
227 |
<!-- Bouton pour copier la réponse -->
|
|
|
251 |
const urlInput = document.getElementById('urlInput');
|
252 |
const urlList = document.getElementById('urlList');
|
253 |
const url = urlInput.value.trim();
|
|
|
254 |
if (url) {
|
|
|
255 |
const urlItem = document.createElement('div');
|
256 |
urlItem.className = 'url-item flex items-center bg-gray-200 p-2 rounded-lg shadow-sm';
|
257 |
urlItem.innerHTML = `
|
|
|
278 |
const responseDiv = document.getElementById('response');
|
279 |
const copyResponseContainer = document.getElementById('copyResponseContainer');
|
280 |
|
281 |
+
// Afficher le loader et s'assurer que le conteneur de réponse est visible
|
282 |
loader.classList.remove('hidden');
|
283 |
+
responseDiv.classList.remove('hidden');
|
284 |
responseDiv.innerHTML = '';
|
285 |
responseDiv.classList.add('opacity-0');
|
286 |
copyResponseContainer.classList.add('hidden');
|