Spaces:
Sleeping
Sleeping
Update templates/dissertation_pdf.html
Browse files6 unmodified lines78910111213141516174 unmodified lines222324252627282924303132335 unmodified lines39404136424344454641474849501 unmodified line525354495055565758594 unmodified lines646566616768697071726768697374757677781 unmodified line808182777879808384858687888990918992939293949495979899100101102969798991001011081091021031046 unmodified lines <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 avec WeasyPrint. * Utilisation d'unités absolues (px) pour les marges verticales * afin d'assurer un rendu cohérent et compact. */ body { font-family: 'Inter', sans-serif; margin: 0;4 unmodified lines font-size: 20px; color: #1a2a4c; background-color: #fdfaf4; /* L'interligne peut rester relatif, c'est généralement bien gé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-left: 4em; /* Le padding horizontal en 'em' est OK */ padding-top: 30px; padding-bottom: 40px; padding-right: 30px;5 unmodified lines font-size: 1.5em; text-align: center; margin-top: 0; margin-bottom: 30px; margin-bottom: 30px; /* MODIFIÉ: Unité absolue */ color: #1a2a4c; } .dissertation-paper h3 { font-size: 1.2em; /* RÈGLE: 2 sauts de ligne avant la Conclusion */ /* MODIFIÉ: Remplacé 3em par 40px pour un espacement contrôlé */ margin-top: 40px; margin-bottom: 30px; text-transform: uppercase;1 unmodified line color: #1a2a4c; } .dissertation-paper .development-block { /* RÈGLE: Espace par défaut avant un bloc de développement. */ /* Sera annulé pour la première partie. */ /* MODIFIÉ: Remplacé 3em par 40px. C'est le changement crucial */ /* pour l'espace entre l'introduction et la première partie. */ margin-top: 40px; } .dissertation-paper p {4 unmodified lines .dissertation-paper .prof { text-align: center; font-style: italic; margin-bottom: 40px; margin-bottom: 40px; /* MODIFIÉ: Unité absolue */ } .dissertation-paper .indented { text-indent: 3em; } .dissertation-paper .transition { /* RÈGLE: Un saut avant et un saut après la transition */ margin-top: 25px; margin-bottom: 25px; /* MODIFIÉ: Remplacé 2em par 35px pour la transition */ margin-top: 35px; margin-bottom: 35px; font-style: italic; color: #4a6a9c; }1 unmodified line page-break-inside: avoid; break-inside: avoid; } /* Classe utilitaire pour annuler la marge supérieure */ .no-top-margin { margin-top: 0 !important; } </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> <!-- RÈGLE: 2 sauts de ligne après l'intro (géré par le margin-top du premier h3) --> <p class="indented">{{ dissertation.introduction }}</p>
<!-- Titre du développement, avec un espace de 2 lignes avant --> <h3>Développement</h3>
{% for partie in dissertation.parties %} <div class="avoid-page-break"> <!-- LOGIQUE JINJA2: - Si c'est la PREMIÈRE partie, on ajoute la classe 'no-top-margin' pour coller au titre "Développement". - Pour les autres parties, on laisse le margin-top par défaut s'appliquer. --> <div class="development-block {% if loop.first %}no-top-margin{% endif %}"> <div class="development-block"> <p class="indented">{{ partie.chapeau }}</p> {% for arg in partie.arguments %} <p class="indented">{{ arg.paragraphe_argumentatif }}</p> {% endfor %} </div>
<!-- La transition est affichée après le bloc de développement --> {% if partie.transition %} <p class="indented transition">{{ partie.transition }}</p> {% endif %}templates/dissertation_pdf.html+17-25