Docfile commited on
Commit
3ce173a
·
verified ·
1 Parent(s): 5064228

Update templates/philosophie.html

Browse files
Files changed (1) hide show
  1. templates/philosophie.html +61 -15
templates/philosophie.html CHANGED
@@ -1,3 +1,5 @@
 
 
1
  <!DOCTYPE html>
2
  <html lang="fr">
3
  <head>
@@ -52,21 +54,49 @@
52
  color: #6b7280;
53
  font-size: 1.1em;
54
  margin-bottom: 2em;
 
 
 
 
 
 
 
 
 
 
 
 
55
  }
56
 
57
- textarea {
58
  width: 100%;
59
  padding: 15px;
60
  border-radius: 8px;
61
  border: 1px solid var(--border-color);
62
- min-height: 100px;
63
  margin-bottom: 15px;
64
  font-size: 16px;
65
  line-height: 1.6;
66
  transition: border-color 0.3s, box-shadow 0.3s;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  }
68
 
69
- textarea:focus {
70
  outline: none;
71
  border-color: var(--primary-color);
72
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
@@ -97,17 +127,16 @@
97
  cursor: not-allowed;
98
  }
99
 
100
- /* Style pour le bouton de téléchargement */
101
  .download-container {
102
  margin-top: 15px;
103
  }
104
  .secondary-button {
105
- background-color: #f3f4f6; /* Gris clair */
106
- color: #374151; /* Texte foncé */
107
- border: 1px solid #d1d5db; /* Bordure subtile */
108
  }
109
  .secondary-button:hover:not(:disabled) {
110
- background-color: #e5e7eb; /* Gris plus foncé au survol */
111
  border-color: #9ca3af;
112
  }
113
 
@@ -166,16 +195,25 @@
166
  <body>
167
  <div id="app" class="container">
168
  <h1>Assistant de Dissertation Philosophique</h1>
169
- <p class="type-indicator">Type 1</p>
170
 
171
  <form @submit.prevent="generateDissertation">
172
- <textarea v-model="question" placeholder="Entrez votre sujet de dissertation ici..."></textarea>
 
 
 
 
 
 
 
 
 
 
173
  <button type="submit" :disabled="isLoading">
174
  [[ isLoading ? 'Génération en cours...' : 'Générer la dissertation' ]]
175
  </button>
176
  </form>
177
 
178
- <!-- NOUVEL EMPLACEMENT DU BOUTON PDF -->
179
  <div v-if="dissertation" class="download-container" data-html2canvas-ignore="true">
180
  <button class="secondary-button" @click="generatePDF">Télécharger la dissertation en PDF</button>
181
  </div>
@@ -208,17 +246,23 @@
208
  </div>
209
 
210
  <script>
211
- const { createApp } = Vue;
212
 
213
  const app = createApp({
214
  data() {
215
  return {
216
  question: '',
 
217
  isLoading: false,
218
  errorMessage: null,
219
  dissertation: null
220
  }
221
  },
 
 
 
 
 
222
  methods: {
223
  async generateDissertation() {
224
  if (!this.question.trim()) {
@@ -232,7 +276,11 @@
232
  const response = await fetch('/api/generate_dissertation', {
233
  method: 'POST',
234
  headers: { 'Content-Type': 'application/json' },
235
- body: JSON.stringify({ question: this.question })
 
 
 
 
236
  });
237
  const data = await response.json();
238
  if (!response.ok) {
@@ -280,9 +328,7 @@
280
  }
281
  });
282
 
283
- // ⚠️ Changer les délimiteurs pour éviter le conflit avec Jinja2
284
  app.config.compilerOptions.delimiters = ['[[', ']]'];
285
-
286
  app.mount('#app');
287
  </script>
288
  </body>
 
1
+ --- START OF FILE philosophie (13).html ---
2
+
3
  <!DOCTYPE html>
4
  <html lang="fr">
5
  <head>
 
54
  color: #6b7280;
55
  font-size: 1.1em;
56
  margin-bottom: 2em;
57
+ font-weight: bold;
58
+ }
59
+
60
+ .form-group {
61
+ margin-bottom: 15px;
62
+ }
63
+
64
+ label {
65
+ display: block;
66
+ margin-bottom: 8px;
67
+ font-weight: 700;
68
+ color: #4b5563;
69
  }
70
 
71
+ textarea, .form-select {
72
  width: 100%;
73
  padding: 15px;
74
  border-radius: 8px;
75
  border: 1px solid var(--border-color);
76
+ min-height: 58px; /* Hauteur standard pour select */
77
  margin-bottom: 15px;
78
  font-size: 16px;
79
  line-height: 1.6;
80
  transition: border-color 0.3s, box-shadow 0.3s;
81
+ background-color: #fff;
82
+ -webkit-appearance: none;
83
+ -moz-appearance: none;
84
+ appearance: none;
85
+ }
86
+
87
+ .form-select {
88
+ 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");
89
+ background-position: right 0.75rem center;
90
+ background-repeat: no-repeat;
91
+ background-size: 1.5em 1.5em;
92
+ padding-right: 2.5rem;
93
+ }
94
+
95
+ textarea {
96
+ min-height: 100px;
97
  }
98
 
99
+ textarea:focus, .form-select:focus {
100
  outline: none;
101
  border-color: var(--primary-color);
102
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
 
127
  cursor: not-allowed;
128
  }
129
 
 
130
  .download-container {
131
  margin-top: 15px;
132
  }
133
  .secondary-button {
134
+ background-color: #f3f4f6;
135
+ color: #374151;
136
+ border: 1px solid #d1d5db;
137
  }
138
  .secondary-button:hover:not(:disabled) {
139
+ background-color: #e5e7eb;
140
  border-color: #9ca3af;
141
  }
142
 
 
195
  <body>
196
  <div id="app" class="container">
197
  <h1>Assistant de Dissertation Philosophique</h1>
198
+ <p class="type-indicator">Méthodologie : [[ dissertationTypeLabel ]]</p>
199
 
200
  <form @submit.prevent="generateDissertation">
201
+ <div class="form-group">
202
+ <label for="dissertation-type">Choisir la méthodologie</label>
203
+ <select id="dissertation-type" v-model="dissertationType" class="form-select">
204
+ <option value="type1">Type 1 (Problématique en deux questions)</option>
205
+ <option value="type2">Type 2 (Introduction autour d'une citation)</option>
206
+ </select>
207
+ </div>
208
+ <div class="form-group">
209
+ <label for="question">Entrez votre sujet de dissertation</label>
210
+ <textarea id="question" v-model="question" placeholder="Entrez votre sujet ou la citation à analyser ici..."></textarea>
211
+ </div>
212
  <button type="submit" :disabled="isLoading">
213
  [[ isLoading ? 'Génération en cours...' : 'Générer la dissertation' ]]
214
  </button>
215
  </form>
216
 
 
217
  <div v-if="dissertation" class="download-container" data-html2canvas-ignore="true">
218
  <button class="secondary-button" @click="generatePDF">Télécharger la dissertation en PDF</button>
219
  </div>
 
246
  </div>
247
 
248
  <script>
249
+ const { createApp, computed } = Vue;
250
 
251
  const app = createApp({
252
  data() {
253
  return {
254
  question: '',
255
+ dissertationType: 'type1', // Nouvelle donnée pour le type
256
  isLoading: false,
257
  errorMessage: null,
258
  dissertation: null
259
  }
260
  },
261
+ computed: {
262
+ dissertationTypeLabel() {
263
+ return this.dissertationType === 'type1' ? 'Type 1' : 'Type 2';
264
+ }
265
+ },
266
  methods: {
267
  async generateDissertation() {
268
  if (!this.question.trim()) {
 
276
  const response = await fetch('/api/generate_dissertation', {
277
  method: 'POST',
278
  headers: { 'Content-Type': 'application/json' },
279
+ // Envoi du sujet ET du type
280
+ body: JSON.stringify({
281
+ question: this.question,
282
+ type: this.dissertationType
283
+ })
284
  });
285
  const data = await response.json();
286
  if (!response.ok) {
 
328
  }
329
  });
330
 
 
331
  app.config.compilerOptions.delimiters = ['[[', ']]'];
 
332
  app.mount('#app');
333
  </script>
334
  </body>