Docfile commited on
Commit
aeefc7a
·
verified ·
1 Parent(s): d979f73

Update templates/philosophie.html

Browse files
Files changed (1) hide show
  1. templates/philosophie.html +290 -107
templates/philosophie.html CHANGED
@@ -1,6 +1,3 @@
1
-
2
-
3
-
4
  <!DOCTYPE html>
5
  <html lang="fr">
6
  <head>
@@ -13,68 +10,103 @@
13
 
14
  <link rel="preconnect" href="https://fonts.googleapis.com">
15
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
16
- <link href="https://fonts.googleapis.com/css2?family=Kalam&family=Lato:wght@400;700&display=swap" rel="stylesheet">
17
 
18
  <style>
19
  :root {
20
- --primary-color: #4f46e5; /* Indigo */
21
- --primary-hover: #4338ca;
22
- --text-color: #374151; /* Gris foncé */
23
- --background-color: #f8f9fa;
24
- --border-color: #e5e7eb;
 
 
 
 
 
 
 
 
 
 
 
 
25
  }
26
 
27
  body {
28
- font-family: 'Lato', sans-serif;
29
- background-color: var(--background-color);
30
  margin: 0;
31
- padding: 2rem;
32
- color: var(--text-color);
 
 
33
  -webkit-font-smoothing: antialiased;
34
  -moz-osx-font-smoothing: grayscale;
 
35
  }
36
 
37
  .container {
38
- max-width: 960px;
39
  margin: 0 auto;
40
- /* Suppression du style "frame": background, padding, border-radius, box-shadow */
41
  }
42
 
43
  h1 {
 
 
44
  text-align: center;
45
- color: #111827;
46
- margin-bottom: 0.5em;
 
 
 
 
47
  }
48
 
49
  .type-indicator {
50
  text-align: center;
51
- color: #6b7280;
52
- font-size: 1.1em;
53
- margin-bottom: 2em;
54
- font-weight: bold;
 
 
 
 
 
 
 
 
 
 
 
55
  }
56
 
57
  .form-group {
58
- margin-bottom: 20px;
59
  }
60
 
61
  label {
62
- display: block;
63
- margin-bottom: 8px;
64
- font-weight: 700;
65
- color: #4b5563;
 
 
66
  }
67
 
68
  textarea, .form-select {
69
  width: 100%;
70
- padding: 15px;
71
- border-radius: 8px;
72
- border: 1px solid var(--border-color);
73
- min-height: 58px;
74
- font-size: 16px;
75
  line-height: 1.6;
76
- transition: border-color 0.3s, box-shadow 0.3s;
77
- background-color: #fff;
 
 
78
  -webkit-appearance: none;
79
  -moz-appearance: none;
80
  appearance: none;
@@ -82,81 +114,149 @@
82
  }
83
 
84
  .form-select {
85
- background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
86
- background-position: right 0.75rem center;
87
  background-repeat: no-repeat;
88
- background-size: 1.5em 1.5em;
89
- padding-right: 2.5rem;
 
90
  }
91
 
92
  textarea {
93
- min-height: 100px;
 
94
  }
95
 
96
  textarea:focus, .form-select:focus {
97
  outline: none;
98
  border-color: var(--primary-color);
99
- box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
 
100
  }
101
 
102
- button {
103
  display: block;
104
- box-sizing: border-box;
105
  width: 100%;
106
- padding: 16px;
107
- background-color: var(--primary-color);
108
  color: white;
109
  border: none;
110
- border-radius: 8px;
111
- font-size: 18px;
112
- font-weight: 700;
113
  cursor: pointer;
114
- transition: background-color 0.3s, transform 0.2s;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
115
  }
116
 
117
- button:hover:not(:disabled) {
118
- background-color: var(--primary-hover);
119
  transform: translateY(-2px);
 
120
  }
121
 
122
- button:disabled {
123
- background-color: #9ca3af;
 
 
 
 
 
 
 
 
124
  cursor: not-allowed;
 
 
125
  }
126
 
127
  .download-container {
128
- margin-top: 15px;
 
129
  }
 
130
  .secondary-button {
131
- background-color: #f3f4f6;
132
- color: #374151;
133
- border: 1px solid #d1d5db;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
134
  }
 
135
  .secondary-button:hover:not(:disabled) {
136
- background-color: #e5e7eb;
137
- border-color: #9ca3af;
 
 
 
138
  }
139
 
140
  .loader {
141
- display: block;
142
- border: 8px solid #f3f3f3;
143
- border-top: 8px solid var(--primary-color);
 
 
 
 
 
 
 
 
144
  border-radius: 50%;
145
- width: 50px;
146
- height: 50px;
147
- animation: spin 1s linear infinite;
148
- margin: 30px auto;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
149
  }
150
- @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
151
 
152
  .error {
153
- color: #ef4444;
154
- background-color: #fee2e2;
155
  text-align: center;
156
- margin-top: 20px;
157
- padding: 15px;
158
- border-radius: 8px;
159
- font-weight: bold;
 
160
  }
161
 
162
  /* Styles de la feuille de dissertation */
@@ -170,23 +270,103 @@
170
  background-size: 100% 40px;
171
  border-left: 3px solid #ffaaab;
172
  padding-left: 4em;
173
- margin: 40px 0 0; /* Ajustement pour le design plat */
174
  padding-top: 30px;
175
  padding-bottom: 40px;
176
  padding-right: 30px;
 
177
  -webkit-print-color-adjust: exact;
178
  print-color-adjust: exact;
179
  }
180
- .dissertation-paper h2 { font-size: 1.5em; text-align: center; margin-bottom: 1.5em; }
181
- .dissertation-paper h3 { font-size: 1.2em; margin-top: 3em; margin-bottom: 1.5em; text-transform: uppercase; text-decoration: underline; }
182
- .dissertation-paper .development-block { margin-top: 3em; }
183
- .dissertation-paper p { text-align: justify; margin: 0; padding: 0; }
184
- .dissertation-paper .prof { text-align: center; font-style: italic; margin-bottom: 2em; }
185
- .dissertation-paper .indented { text-indent: 3em; }
186
- .dissertation-paper .transition { margin-top: 2em; margin-bottom: 2em; font-style: italic; color: #4a6a9c; }
187
- .dissertation-paper, .dissertation-paper * { box-sizing: border-box; }
188
 
189
- .avoid-page-break { page-break-inside: avoid; break-inside: avoid; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
190
  </style>
191
  </head>
192
  <body>
@@ -194,33 +374,36 @@
194
  <h1>Assistant de Dissertation Philosophique</h1>
195
  <p class="type-indicator">Méthodologie : [[ dissertationTypeLabel ]]</p>
196
 
197
- <form @submit.prevent="generateDissertation">
198
- <div class="form-group">
199
- <label for="dissertation-type">Choisir la méthodologie</label>
200
- <select id="dissertation-type" v-model="dissertationType" class="form-select">
201
- <option value="type1">Type 1 </option>
202
- <option value="type2">Type 2 (citation)</option>
203
- </select>
204
- </div>
205
-
206
- <div class="form-group">
207
- <label for="course-context">Choisir un cours comme contexte (optionnel)</label>
208
- <select id="course-context" v-model="selectedCourse" class="form-select">
209
- <option value="">-- Aucun cours en contexte --</option>
210
- <option v-for="course in courses" :key="course.id" :value="course.id">
211
- [[ course.title ]]
212
- </option>
213
- </select>
214
- </div>
 
215
 
216
- <div class="form-group">
217
- <label for="question">Entrez votre sujet de dissertation</label>
218
- <textarea id="question" v-model="question" placeholder="Entrez votre sujet ou la citation à analyser ici..."></textarea>
219
- </div>
220
- <button type="submit" :disabled="isLoading">
221
- [[ isLoading ? 'Génération en cours...' : 'Générer la dissertation' ]]
222
- </button>
223
- </form>
 
 
224
 
225
  <div v-if="dissertation" class="download-container" data-html2canvas-ignore="true">
226
  <button class="secondary-button" @click="generatePDF">Télécharger la dissertation en PDF</button>
 
 
 
 
1
  <!DOCTYPE html>
2
  <html lang="fr">
3
  <head>
 
10
 
11
  <link rel="preconnect" href="https://fonts.googleapis.com">
12
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
13
+ <link href="https://fonts.googleapis.com/css2?family=Kalam&family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
14
 
15
  <style>
16
  :root {
17
+ --primary-color: #6366f1; /* Indigo moderne */
18
+ --primary-hover: #5b21b6;
19
+ --secondary-color: #8b5cf6; /* Violet */
20
+ --accent-color: #06b6d4; /* Cyan */
21
+ --text-primary: #0f172a; /* Slate-900 */
22
+ --text-secondary: #475569; /* Slate-600 */
23
+ --text-muted: #94a3b8; /* Slate-400 */
24
+ --background: #ffffff;
25
+ --surface: #f8fafc; /* Slate-50 */
26
+ --border: #e2e8f0; /* Slate-200 */
27
+ --border-focus: #cbd5e1; /* Slate-300 */
28
+ --success: #10b981; /* Emerald-500 */
29
+ --error: #ef4444; /* Red-500 */
30
+ }
31
+
32
+ * {
33
+ box-sizing: border-box;
34
  }
35
 
36
  body {
37
+ font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
38
+ background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
39
  margin: 0;
40
+ padding: 0;
41
+ color: var(--text-primary);
42
+ line-height: 1.6;
43
+ font-weight: 400;
44
  -webkit-font-smoothing: antialiased;
45
  -moz-osx-font-smoothing: grayscale;
46
+ min-height: 100vh;
47
  }
48
 
49
  .container {
50
+ max-width: 900px;
51
  margin: 0 auto;
52
+ padding: 3rem 2rem;
53
  }
54
 
55
  h1 {
56
+ font-size: 3.5rem;
57
+ font-weight: 700;
58
  text-align: center;
59
+ background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
60
+ -webkit-background-clip: text;
61
+ -webkit-text-fill-color: transparent;
62
+ background-clip: text;
63
+ margin: 0 0 1rem 0;
64
+ letter-spacing: -0.02em;
65
  }
66
 
67
  .type-indicator {
68
  text-align: center;
69
+ color: var(--text-muted);
70
+ font-size: 1.125rem;
71
+ font-weight: 500;
72
+ margin-bottom: 3rem;
73
+ letter-spacing: 0.05em;
74
+ text-transform: uppercase;
75
+ }
76
+
77
+ .form-container {
78
+ background: var(--background);
79
+ border-radius: 20px;
80
+ padding: 2.5rem;
81
+ margin-bottom: 2rem;
82
+ border: 1px solid var(--border);
83
+ backdrop-filter: blur(10px);
84
  }
85
 
86
  .form-group {
87
+ margin-bottom: 2rem;
88
  }
89
 
90
  label {
91
+ display: block;
92
+ margin-bottom: 0.75rem;
93
+ font-weight: 600;
94
+ color: var(--text-primary);
95
+ font-size: 0.95rem;
96
+ letter-spacing: 0.01em;
97
  }
98
 
99
  textarea, .form-select {
100
  width: 100%;
101
+ padding: 1rem 1.25rem;
102
+ border-radius: 12px;
103
+ border: 2px solid var(--border);
104
+ font-size: 1rem;
 
105
  line-height: 1.6;
106
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
107
+ background-color: var(--background);
108
+ color: var(--text-primary);
109
+ font-family: inherit;
110
  -webkit-appearance: none;
111
  -moz-appearance: none;
112
  appearance: none;
 
114
  }
115
 
116
  .form-select {
117
+ background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236366f1' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
118
+ background-position: right 1rem center;
119
  background-repeat: no-repeat;
120
+ background-size: 1.25rem 1.25rem;
121
+ padding-right: 3rem;
122
+ cursor: pointer;
123
  }
124
 
125
  textarea {
126
+ min-height: 120px;
127
+ resize: vertical;
128
  }
129
 
130
  textarea:focus, .form-select:focus {
131
  outline: none;
132
  border-color: var(--primary-color);
133
+ box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
134
+ transform: translateY(-1px);
135
  }
136
 
137
+ .primary-button {
138
  display: block;
 
139
  width: 100%;
140
+ padding: 1.25rem;
141
+ background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
142
  color: white;
143
  border: none;
144
+ border-radius: 12px;
145
+ font-size: 1.1rem;
146
+ font-weight: 600;
147
  cursor: pointer;
148
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
149
+ letter-spacing: 0.01em;
150
+ position: relative;
151
+ overflow: hidden;
152
+ }
153
+
154
+ .primary-button::before {
155
+ content: '';
156
+ position: absolute;
157
+ top: 0;
158
+ left: -100%;
159
+ width: 100%;
160
+ height: 100%;
161
+ background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
162
+ transition: left 0.5s;
163
  }
164
 
165
+ .primary-button:hover:not(:disabled) {
 
166
  transform: translateY(-2px);
167
+ box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
168
  }
169
 
170
+ .primary-button:hover:not(:disabled)::before {
171
+ left: 100%;
172
+ }
173
+
174
+ .primary-button:active {
175
+ transform: translateY(0);
176
+ }
177
+
178
+ .primary-button:disabled {
179
+ background: var(--text-muted);
180
  cursor: not-allowed;
181
+ transform: none;
182
+ box-shadow: none;
183
  }
184
 
185
  .download-container {
186
+ margin-top: 2rem;
187
+ text-align: center;
188
  }
189
+
190
  .secondary-button {
191
+ background: var(--surface);
192
+ color: var(--text-primary);
193
+ border: 2px solid var(--border);
194
+ border-radius: 12px;
195
+ padding: 1rem 2rem;
196
+ font-size: 1rem;
197
+ font-weight: 500;
198
+ cursor: pointer;
199
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
200
+ display: inline-flex;
201
+ align-items: center;
202
+ gap: 0.5rem;
203
+ }
204
+
205
+ .secondary-button::before {
206
+ content: '⬇';
207
+ font-size: 1.2rem;
208
  }
209
+
210
  .secondary-button:hover:not(:disabled) {
211
+ background: var(--background);
212
+ border-color: var(--primary-color);
213
+ color: var(--primary-color);
214
+ transform: translateY(-1px);
215
+ box-shadow: 0 5px 15px rgba(99, 102, 241, 0.15);
216
  }
217
 
218
  .loader {
219
+ width: 60px;
220
+ height: 60px;
221
+ margin: 3rem auto;
222
+ position: relative;
223
+ }
224
+
225
+ .loader::before {
226
+ content: '';
227
+ position: absolute;
228
+ width: 60px;
229
+ height: 60px;
230
  border-radius: 50%;
231
+ background: conic-gradient(var(--primary-color), var(--secondary-color), var(--accent-color), var(--primary-color));
232
+ animation: spin 1.5s linear infinite;
233
+ }
234
+
235
+ .loader::after {
236
+ content: '';
237
+ position: absolute;
238
+ top: 8px;
239
+ left: 8px;
240
+ width: 44px;
241
+ height: 44px;
242
+ border-radius: 50%;
243
+ background: var(--background);
244
+ }
245
+
246
+ @keyframes spin {
247
+ 0% { transform: rotate(0deg); }
248
+ 100% { transform: rotate(360deg); }
249
  }
 
250
 
251
  .error {
252
+ color: var(--error);
253
+ background: rgba(239, 68, 68, 0.1);
254
  text-align: center;
255
+ margin-top: 2rem;
256
+ padding: 1.25rem;
257
+ border-radius: 12px;
258
+ font-weight: 500;
259
+ border: 1px solid rgba(239, 68, 68, 0.2);
260
  }
261
 
262
  /* Styles de la feuille de dissertation */
 
270
  background-size: 100% 40px;
271
  border-left: 3px solid #ffaaab;
272
  padding-left: 4em;
273
+ margin: 2rem 0;
274
  padding-top: 30px;
275
  padding-bottom: 40px;
276
  padding-right: 30px;
277
+ border-radius: 0 12px 12px 0;
278
  -webkit-print-color-adjust: exact;
279
  print-color-adjust: exact;
280
  }
 
 
 
 
 
 
 
 
281
 
282
+ .dissertation-paper h2 {
283
+ font-size: 1.5em;
284
+ text-align: center;
285
+ margin-bottom: 1.5em;
286
+ color: #1a2a4c;
287
+ }
288
+
289
+ .dissertation-paper h3 {
290
+ font-size: 1.2em;
291
+ margin-top: 3em;
292
+ margin-bottom: 1.5em;
293
+ text-transform: uppercase;
294
+ text-decoration: underline;
295
+ color: #1a2a4c;
296
+ }
297
+
298
+ .dissertation-paper .development-block {
299
+ margin-top: 3em;
300
+ }
301
+
302
+ .dissertation-paper p {
303
+ text-align: justify;
304
+ margin: 0;
305
+ padding: 0;
306
+ }
307
+
308
+ .dissertation-paper .prof {
309
+ text-align: center;
310
+ font-style: italic;
311
+ margin-bottom: 2em;
312
+ }
313
+
314
+ .dissertation-paper .indented {
315
+ text-indent: 3em;
316
+ }
317
+
318
+ .dissertation-paper .transition {
319
+ margin-top: 2em;
320
+ margin-bottom: 2em;
321
+ font-style: italic;
322
+ color: #4a6a9c;
323
+ }
324
+
325
+ .dissertation-paper, .dissertation-paper * {
326
+ box-sizing: border-box;
327
+ }
328
+
329
+ .avoid-page-break {
330
+ page-break-inside: avoid;
331
+ break-inside: avoid;
332
+ }
333
+
334
+ /* Responsive design */
335
+ @media (max-width: 768px) {
336
+ .container {
337
+ padding: 2rem 1rem;
338
+ }
339
+
340
+ h1 {
341
+ font-size: 2.5rem;
342
+ }
343
+
344
+ .form-container {
345
+ padding: 1.5rem;
346
+ }
347
+
348
+ .dissertation-paper {
349
+ padding-left: 2em;
350
+ padding-right: 1rem;
351
+ font-size: 18px;
352
+ }
353
+ }
354
+
355
+ /* Animation d'entrée */
356
+ @keyframes fadeInUp {
357
+ from {
358
+ opacity: 0;
359
+ transform: translateY(30px);
360
+ }
361
+ to {
362
+ opacity: 1;
363
+ transform: translateY(0);
364
+ }
365
+ }
366
+
367
+ .container > * {
368
+ animation: fadeInUp 0.6s ease-out;
369
+ }
370
  </style>
371
  </head>
372
  <body>
 
374
  <h1>Assistant de Dissertation Philosophique</h1>
375
  <p class="type-indicator">Méthodologie : [[ dissertationTypeLabel ]]</p>
376
 
377
+ <div class="form-container">
378
+ <form @submit.prevent="generateDissertation">
379
+ <div class="form-group">
380
+ <label for="dissertation-type">Choisir la méthodologie</label>
381
+ <select id="dissertation-type" v-model="dissertationType" class="form-select">
382
+ <option value="type1">Type 1 </option>
383
+ <option value="type2">Type 2 (citation)</option>
384
+ </select>
385
+ </div>
386
+
387
+ <div class="form-group">
388
+ <label for="course-context">Choisir un cours comme contexte (optionnel)</label>
389
+ <select id="course-context" v-model="selectedCourse" class="form-select">
390
+ <option value="">-- Aucun cours en contexte --</option>
391
+ <option v-for="course in courses" :key="course.id" :value="course.id">
392
+ [[ course.title ]]
393
+ </option>
394
+ </select>
395
+ </div>
396
 
397
+ <div class="form-group">
398
+ <label for="question">Entrez votre sujet de dissertation</label>
399
+ <textarea id="question" v-model="question" placeholder="Entrez votre sujet ou la citation à analyser ici..."></textarea>
400
+ </div>
401
+
402
+ <button type="submit" class="primary-button" :disabled="isLoading">
403
+ [[ isLoading ? 'Génération en cours...' : 'Générer la dissertation' ]]
404
+ </button>
405
+ </form>
406
+ </div>
407
 
408
  <div v-if="dissertation" class="download-container" data-html2canvas-ignore="true">
409
  <button class="secondary-button" @click="generatePDF">Télécharger la dissertation en PDF</button>