Flasksite / templates /dissertation_pdf.html
Docfile's picture
Update templates/dissertation_pdf.html
dcf0012 verified
raw
history blame
3.77 kB
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>Dissertation de Philosophie</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Kalam&family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<style>
/*
* Styles pour la génération du PDF de la dissertation.
* Les marges et interlignes ont été ajustés pour un rendu plus compact.
*/
body {
font-family: 'Inter', sans-serif;
margin: 0;
padding: 0;
}
.dissertation-paper {
font-family: 'Kalam', cursive;
font-size: 20px;
color: #1a2a4c;
background-color: #fdfaf4;
/* MODIFIÉ: Interligne réduit pour un texte moins aéré */
line-height: 1.8;
background-image: linear-gradient(transparent 97%, #d8e2ee 98%);
background-size: 100% 40px;
border-left: 3px solid #ffaaab;
padding-left: 4em;
padding-top: 30px;
padding-bottom: 40px;
padding-right: 30px;
box-sizing: border-box;
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
.dissertation-paper h2 {
font-size: 1.5em;
text-align: center;
margin-top: 0;
margin-bottom: 1.5em;
color: #1a2a4c;
}
.dissertation-paper h3 {
font-size: 1.2em;
/* MODIFIÉ: Marge supérieure des titres de section réduite */
margin-top: 2em;
margin-bottom: 1.5em;
text-transform: uppercase;
text-decoration: underline;
color: #1a2a4c;
}
.dissertation-paper .development-block {
/* MODIFIÉ: Marge supérieure des blocs de développement réduite */
margin-top: 2em;
}
.dissertation-paper p {
text-align: justify;
margin: 0;
padding: 0;
}
.dissertation-paper .prof {
text-align: center;
font-style: italic;
margin-bottom: 2em;
}
.dissertation-paper .indented {
text-indent: 3em;
}
.dissertation-paper .transition {
/* MODIFIÉ: Espacement de la transition ajusté */
margin-top: 1.5em;
margin-bottom: 1.5em;
font-style: italic;
color: #4a6a9c;
}
.avoid-page-break {
page-break-inside: avoid;
break-inside: avoid;
}
</style>
</head>
<body>
<div class="dissertation-paper">
<!-- Utilisation de la syntaxe Jinja2 pour insérer les données dynamiques -->
<h2>Sujet : {{ dissertation.sujet }}</h2>
<p class="prof">Prof : {{ dissertation.prof }}</p>
<h3>Introduction</h3>
<p class="indented">{{ dissertation.introduction }}</p>
{% for partie in dissertation.parties %}
<div class="avoid-page-break">
<div class="development-block">
<p class="indented">{{ partie.chapeau }}</p>
{% for arg in partie.arguments %}
<p class="indented">{{ arg.paragraphe_argumentatif }}</p>
{% endfor %}
</div>
{% if partie.transition %}
<p class="indented transition">{{ partie.transition }}</p>
{% endif %}
</div>
{% endfor %}
<h3>Conclusion</h3>
<p class="indented">{{ dissertation.conclusion }}</p>
</div>
</body>
</html>