Docfile commited on
Commit
6298e4b
·
verified ·
1 Parent(s): 4adbc8e

Update templates/generale.html

Browse files
Files changed (1) hide show
  1. templates/generale.html +147 -63
templates/generale.html CHANGED
@@ -17,81 +17,167 @@
17
  <!-- Anime.js -->
18
  <script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.1/anime.min.js" defer></script>
19
  <!-- MathJax -->
20
- <script>
21
- MathJax = {
22
- tex: {
23
- inlineMath: [['$', '$'], ['\\(', '\\)']],
24
- displayMath: [['$$', '$$'], ['\\[', '\\]']],
25
- processEscapes: true
26
- },
27
- options: {
28
- skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre']
29
- },
30
- startup: {
31
- pageReady: () => {
32
- return MathJax.startup.defaultPageReady().then(() => {
33
- console.log('MathJax initial typesetting complete');
34
- });
35
- }
36
- }
37
- };
38
- </script>
39
  <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js" defer></script>
40
  <style>
41
- /* Bouton animé avec un dégradé pastel */
42
- .animated-button {
43
- background-image: linear-gradient(to right, #a1c4fd, #c2e9fb);
44
- background-size: 200% auto;
45
- box-shadow: 0 4px 15px rgba(161, 196, 253, 0.5);
46
- transition: background-position 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
47
- }
48
- .animated-button:hover {
49
- background-position: right center;
50
- transform: translateY(-2px);
51
- box-shadow: 0 6px 20px rgba(161, 196, 253, 0.7);
52
- }
53
- /* Effet de soulignement sur les champs de saisie */
54
- .input-underline {
55
- background-image: linear-gradient(to right, #a1c4fd, #c2e9fb);
56
- background-size: 0% 2px;
57
- background-repeat: no-repeat;
58
- background-position: left bottom;
59
- transition: background-size 0.3s ease;
60
- }
61
- .input-underline:focus {
62
- background-size: 100% 2px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
  outline: none;
 
64
  }
65
- /* Conteneur de réponse */
66
  #response {
67
- overflow-x: auto;
68
- white-space: pre-wrap;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  }
70
  </style>
71
  </head>
72
- <body class="bg-gradient-to-r from-gray-100 to-gray-200 min-h-screen flex items-center justify-center font-sans">
73
- <div class="container mx-auto p-8 bg-white rounded-3xl shadow-2xl max-w-3xl">
 
 
74
  <!-- En-tête -->
75
  <div class="flex flex-col md:flex-row md:justify-between items-start md:items-center mb-6 space-y-4 md:space-y-0">
76
  <h1 class="text-3xl font-bold text-gray-800">Poser une question générale</h1>
77
- <button onclick="showInfo()" class="animated-button text-white px-4 py-2 rounded-lg flex items-center">
78
- <i class="fas fa-info-circle mr-2"></i> Info
79
  </button>
80
  </div>
81
 
82
  <!-- Zone de question -->
83
  <div class="mb-6">
84
  <label for="questionInput" class="block mb-2 text-lg font-medium text-gray-700">Votre question :</label>
85
- <textarea id="questionInput" class="w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-400 input-underline" rows="4" placeholder="Entrez votre question ici..."></textarea>
86
  </div>
87
 
88
  <!-- Zone d'ajout d'URLs -->
89
  <div class="mb-6">
90
  <label for="urlInput" class="block mb-2 text-lg font-medium text-gray-700">URLs (optionnel) :</label>
91
  <div class="flex">
92
- <input type="text" id="urlInput" class="flex-grow p-3 border border-gray-300 rounded-l-lg focus:ring-2 focus:ring-blue-400 input-underline" placeholder="Entrez une URL" />
93
- <button onclick="addUrl()" class="animated-button text-white px-4 py-2 rounded-r-lg">
94
- Ajouter
95
  </button>
96
  </div>
97
  <div id="urlList" class="mt-2 space-y-2"></div>
@@ -100,29 +186,27 @@
100
  <!-- Zone d'ajout de fichiers -->
101
  <div class="mb-6">
102
  <label for="fileUpload" class="block mb-2 text-lg font-medium text-gray-700">Fichiers (optionnel) :</label>
103
- <input type="file" id="fileUpload" class="w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-400 input-underline" multiple />
104
  </div>
105
 
106
  <!-- Bouton de soumission -->
107
- <button onclick="submitQuestion()" class="animated-button w-full text-white px-4 py-3 rounded-lg text-lg font-medium">
108
- Soumettre
109
  </button>
110
 
111
  <!-- Loader -->
112
- <div id="loader" class="hidden mt-4">
113
- <div class="flex justify-center items-center">
114
- <div class="animate-spin rounded-full h-12 w-12 border-t-4 border-b-4 border-blue-500"></div>
115
- <p class="ml-2 text-gray-600">Chargement en cours...</p>
116
- </div>
117
  </div>
118
 
119
  <!-- Affichage de la réponse -->
120
- <div id="response" class="mt-6 p-4 bg-gray-100 rounded-lg shadow-lg"></div>
121
 
122
  <!-- Bouton pour copier la réponse -->
123
  <div id="copyResponseContainer" class="hidden mt-4">
124
- <button onclick="copyResponse()" class="animated-button w-full text-white px-4 py-2 rounded-lg flex items-center justify-center">
125
- <i class="fas fa-copy mr-2"></i> Copier la réponse
126
  </button>
127
  </div>
128
  </div>
 
17
  <!-- Anime.js -->
18
  <script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.1/anime.min.js" defer></script>
19
  <!-- MathJax -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js" defer></script>
21
  <style>
22
+ :root {
23
+ --primary-color: #008cba;
24
+ --background-color: #f0f8ff;
25
+ --animation-timing: 0.3s;
26
+ }
27
+
28
+ body {
29
+ margin: 0;
30
+ font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
31
+ background-color: var(--background-color);
32
+ min-height: 100vh;
33
+ padding: 20px;
34
+ box-sizing: border-box;
35
+ overflow-x: hidden;
36
+ }
37
+
38
+ .navbar {
39
+ background-color: var(--primary-color);
40
+ color: white;
41
+ padding: 15px;
42
+ width: 100%;
43
+ text-align: center;
44
+ font-size: 24px;
45
+ font-weight: bold;
46
+ position: fixed;
47
+ top: 0;
48
+ left: 0;
49
+ z-index: 1000;
50
+ box-shadow: 0 2px 10px rgba(0,0,0,0.1);
51
+ animation: slideDown 0.5s ease-out;
52
+ }
53
+
54
+ .container {
55
+ margin-top: 80px;
56
+ max-width: 800px;
57
+ background-color: white;
58
+ border-radius: 8px;
59
+ box-shadow: 0 2px 10px rgba(0,0,0,0.1);
60
+ padding: 20px;
61
+ animation: fadeInScale 0.5s forwards;
62
+ }
63
+
64
+ .button {
65
+ background-color: var(--primary-color);
66
+ color: white;
67
+ padding: 15px;
68
+ border: none;
69
+ border-radius: 8px;
70
+ font-size: 16px;
71
+ text-align: center;
72
+ cursor: pointer;
73
+ position: relative;
74
+ overflow: hidden;
75
+ transform: translateZ(0);
76
+ will-change: transform;
77
+ transition: all var(--animation-timing) ease;
78
+ }
79
+
80
+ .button:hover {
81
+ transform: scale(1.05) translateY(-2px);
82
+ box-shadow: 0 10px 20px rgba(0,0,0,0.2);
83
+ }
84
+
85
+ .button i {
86
+ margin-right: 10px;
87
+ transition: transform var(--animation-timing) ease;
88
+ }
89
+
90
+ .input-field {
91
+ width: 100%;
92
+ padding: 12px;
93
+ border: 2px solid var(--primary-color);
94
+ border-radius: 8px;
95
+ margin-bottom: 15px;
96
+ transition: all var(--animation-timing) ease;
97
+ }
98
+
99
+ .input-field:focus {
100
  outline: none;
101
+ box-shadow: 0 0 0 3px rgba(0,140,186,0.2);
102
  }
103
+
104
  #response {
105
+ background-color: #f8f9fa;
106
+ border-radius: 8px;
107
+ padding: 15px;
108
+ margin-top: 20px;
109
+ animation: fadeIn 0.5s ease-out;
110
+ }
111
+
112
+ #loader {
113
+ display: flex;
114
+ justify-content: center;
115
+ align-items: center;
116
+ margin: 20px 0;
117
+ }
118
+
119
+ @keyframes float {
120
+ 0%, 100% { transform: translateY(0); }
121
+ 50% { transform: translateY(-10px); }
122
+ }
123
+
124
+ @keyframes fadeInScale {
125
+ 0% {
126
+ opacity: 0;
127
+ transform: scale(0.5);
128
+ }
129
+ 100% {
130
+ opacity: 1;
131
+ transform: scale(1);
132
+ }
133
+ }
134
+
135
+ @keyframes slideDown {
136
+ from { transform: translateY(-100%); }
137
+ to { transform: translateY(0); }
138
+ }
139
+
140
+ @keyframes fadeIn {
141
+ from { opacity: 0; }
142
+ to { opacity: 1; }
143
+ }
144
+
145
+ .url-item {
146
+ background-color: #f0f8ff;
147
+ padding: 10px;
148
+ border-radius: 6px;
149
+ margin-bottom: 8px;
150
+ display: flex;
151
+ align-items: center;
152
+ animation: fadeIn 0.3s ease-out;
153
  }
154
  </style>
155
  </head>
156
+ <body>
157
+ <div class="navbar">Mariam AI</div>
158
+
159
+ <div class="container mx-auto">
160
  <!-- En-tête -->
161
  <div class="flex flex-col md:flex-row md:justify-between items-start md:items-center mb-6 space-y-4 md:space-y-0">
162
  <h1 class="text-3xl font-bold text-gray-800">Poser une question générale</h1>
163
+ <button onclick="showInfo()" class="button">
164
+ <i class="fas fa-info-circle"></i> Info
165
  </button>
166
  </div>
167
 
168
  <!-- Zone de question -->
169
  <div class="mb-6">
170
  <label for="questionInput" class="block mb-2 text-lg font-medium text-gray-700">Votre question :</label>
171
+ <textarea id="questionInput" class="input-field" rows="4" placeholder="Entrez votre question ici..."></textarea>
172
  </div>
173
 
174
  <!-- Zone d'ajout d'URLs -->
175
  <div class="mb-6">
176
  <label for="urlInput" class="block mb-2 text-lg font-medium text-gray-700">URLs (optionnel) :</label>
177
  <div class="flex">
178
+ <input type="text" id="urlInput" class="input-field" placeholder="Entrez une URL" />
179
+ <button onclick="addUrl()" class="button ml-2">
180
+ <i class="fas fa-plus"></i> Ajouter
181
  </button>
182
  </div>
183
  <div id="urlList" class="mt-2 space-y-2"></div>
 
186
  <!-- Zone d'ajout de fichiers -->
187
  <div class="mb-6">
188
  <label for="fileUpload" class="block mb-2 text-lg font-medium text-gray-700">Fichiers (optionnel) :</label>
189
+ <input type="file" id="fileUpload" class="input-field" multiple />
190
  </div>
191
 
192
  <!-- Bouton de soumission -->
193
+ <button onclick="submitQuestion()" class="button w-full">
194
+ <i class="fas fa-paper-plane"></i> Soumettre
195
  </button>
196
 
197
  <!-- Loader -->
198
+ <div id="loader" class="hidden">
199
+ <div class="animate-spin rounded-full h-12 w-12 border-t-4 border-b-4 border-blue-500"></div>
200
+ <p class="ml-2 text-gray-600">Chargement en cours...</p>
 
 
201
  </div>
202
 
203
  <!-- Affichage de la réponse -->
204
+ <div id="response" class="hidden"></div>
205
 
206
  <!-- Bouton pour copier la réponse -->
207
  <div id="copyResponseContainer" class="hidden mt-4">
208
+ <button onclick="copyResponse()" class="button w-full">
209
+ <i class="fas fa-copy"></i> Copier la réponse
210
  </button>
211
  </div>
212
  </div>