Spaces:
Sleeping
Sleeping
Update templates/philosophie.html
Browse files- templates/philosophie.html +25 -33
templates/philosophie.html
CHANGED
@@ -74,6 +74,7 @@
|
|
74 |
|
75 |
button {
|
76 |
display: block;
|
|
|
77 |
width: 100%;
|
78 |
padding: 16px;
|
79 |
background-color: var(--primary-color);
|
@@ -95,6 +96,20 @@
|
|
95 |
background-color: #9ca3af;
|
96 |
cursor: not-allowed;
|
97 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
|
99 |
.loader {
|
100 |
display: block;
|
@@ -124,12 +139,12 @@
|
|
124 |
font-size: 20px;
|
125 |
color: #1a2a4c;
|
126 |
background-color: #fdfaf4;
|
127 |
-
line-height: 2;
|
128 |
background-image: linear-gradient(transparent 97%, #d8e2ee 98%);
|
129 |
-
background-size: 100% 40px;
|
130 |
border-left: 3px solid #ffaaab;
|
131 |
padding-left: 4em;
|
132 |
-
margin: 40px -40px -40px -40px;
|
133 |
padding-top: 30px;
|
134 |
padding-bottom: 40px;
|
135 |
padding-right: 30px;
|
@@ -145,28 +160,6 @@
|
|
145 |
.dissertation-paper .transition { margin-top: 2em; margin-bottom: 2em; font-style: italic; color: #4a6a9c; }
|
146 |
.dissertation-paper, .dissertation-paper * { box-sizing: border-box; }
|
147 |
|
148 |
-
.pdf-button-container {
|
149 |
-
display: flex;
|
150 |
-
justify-content: flex-end;
|
151 |
-
margin-bottom: 2em;
|
152 |
-
padding-right: 1em; /* Petit décalage pour ne pas coller au bord */
|
153 |
-
}
|
154 |
-
|
155 |
-
.pdf-button {
|
156 |
-
font-family: 'Lato', sans-serif;
|
157 |
-
font-size: 14px;
|
158 |
-
font-weight: 600;
|
159 |
-
padding: 10px 20px;
|
160 |
-
width: auto;
|
161 |
-
background-color: #e9ecef;
|
162 |
-
color: var(--text-color);
|
163 |
-
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
|
164 |
-
}
|
165 |
-
.pdf-button:hover:not(:disabled) {
|
166 |
-
background-color: #ced4da;
|
167 |
-
transform: translateY(-1px);
|
168 |
-
}
|
169 |
-
|
170 |
.avoid-page-break { page-break-inside: avoid; break-inside: avoid; }
|
171 |
</style>
|
172 |
</head>
|
@@ -182,18 +175,17 @@
|
|
182 |
</button>
|
183 |
</form>
|
184 |
|
|
|
|
|
|
|
|
|
|
|
185 |
<div v-if="isLoading" class="loader"></div>
|
186 |
<p v-if="errorMessage" class="error">[[ errorMessage ]]</p>
|
187 |
|
188 |
<div v-if="dissertation" id="dissertation-content" class="dissertation-paper">
|
189 |
|
190 |
<h2>Sujet : [[ dissertation.sujet ]]</h2>
|
191 |
-
|
192 |
-
<!-- Bouton PDF déplacé en haut -->
|
193 |
-
<div class="pdf-button-container" data-html2canvas-ignore="true">
|
194 |
-
<button class="pdf-button" @click="generatePDF">Télécharger en PDF</button>
|
195 |
-
</div>
|
196 |
-
|
197 |
<p class="prof">Prof : [[ dissertation.prof ]]</p>
|
198 |
|
199 |
<h3>Introduction</h3>
|
@@ -267,14 +259,14 @@
|
|
267 |
window.scrollTo(0, 0);
|
268 |
|
269 |
const options = {
|
270 |
-
margin: [15, 15, 15, 15],
|
271 |
filename: 'dissertation-philosophie.pdf',
|
272 |
image: { type: 'jpeg', quality: 0.98 },
|
273 |
html2canvas: {
|
274 |
scale: 2,
|
275 |
useCORS: true,
|
276 |
logging: true,
|
277 |
-
backgroundColor: null,
|
278 |
},
|
279 |
jsPDF: { unit: 'mm', format: 'a4', orientation: 'portrait' }
|
280 |
};
|
|
|
74 |
|
75 |
button {
|
76 |
display: block;
|
77 |
+
box-sizing: border-box;
|
78 |
width: 100%;
|
79 |
padding: 16px;
|
80 |
background-color: var(--primary-color);
|
|
|
96 |
background-color: #9ca3af;
|
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 |
|
114 |
.loader {
|
115 |
display: block;
|
|
|
139 |
font-size: 20px;
|
140 |
color: #1a2a4c;
|
141 |
background-color: #fdfaf4;
|
142 |
+
line-height: 2;
|
143 |
background-image: linear-gradient(transparent 97%, #d8e2ee 98%);
|
144 |
+
background-size: 100% 40px;
|
145 |
border-left: 3px solid #ffaaab;
|
146 |
padding-left: 4em;
|
147 |
+
margin: 40px -40px -40px -40px;
|
148 |
padding-top: 30px;
|
149 |
padding-bottom: 40px;
|
150 |
padding-right: 30px;
|
|
|
160 |
.dissertation-paper .transition { margin-top: 2em; margin-bottom: 2em; font-style: italic; color: #4a6a9c; }
|
161 |
.dissertation-paper, .dissertation-paper * { box-sizing: border-box; }
|
162 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
.avoid-page-break { page-break-inside: avoid; break-inside: avoid; }
|
164 |
</style>
|
165 |
</head>
|
|
|
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>
|
182 |
+
|
183 |
<div v-if="isLoading" class="loader"></div>
|
184 |
<p v-if="errorMessage" class="error">[[ errorMessage ]]</p>
|
185 |
|
186 |
<div v-if="dissertation" id="dissertation-content" class="dissertation-paper">
|
187 |
|
188 |
<h2>Sujet : [[ dissertation.sujet ]]</h2>
|
|
|
|
|
|
|
|
|
|
|
|
|
189 |
<p class="prof">Prof : [[ dissertation.prof ]]</p>
|
190 |
|
191 |
<h3>Introduction</h3>
|
|
|
259 |
window.scrollTo(0, 0);
|
260 |
|
261 |
const options = {
|
262 |
+
margin: [15, 15, 15, 15],
|
263 |
filename: 'dissertation-philosophie.pdf',
|
264 |
image: { type: 'jpeg', quality: 0.98 },
|
265 |
html2canvas: {
|
266 |
scale: 2,
|
267 |
useCORS: true,
|
268 |
logging: true,
|
269 |
+
backgroundColor: null,
|
270 |
},
|
271 |
jsPDF: { unit: 'mm', format: 'a4', orientation: 'portrait' }
|
272 |
};
|