demarches-normaliennes/app/assets/stylesheets/attestation.scss

182 lines
2.8 KiB
SCSS
Raw Normal View History

2023-11-14 17:46:52 +01:00
@font-face {
font-family: "Marianne";
src: url("marianne-regular.ttf");
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: "Marianne";
src: url("marianne-bold.ttf");
font-weight: bold;
font-style: normal;
}
@font-face {
font-family: "Marianne";
src: url("marianne-thin.ttf");
font-weight: 100; // weasy print n"accepte pas lighter
font-style: normal;
}
@page {
size: A4;
margin: 17mm 17mm 34mm; // add margin at the bottom to add address
@bottom-center {
font-size: 8pt;
content: counter(page) " / " counter(pages);
margin-top: 17mm;
white-space: nowrap;
2023-11-14 17:46:52 +01:00
}
@bottom-left {
content: element(footer);
}
}
#attestation {
@media screen {
.a4-container {
display: flex;
flex-direction: column;
justify-content: space-between; // This will push the footer down
max-width: 21cm;
min-height: 29.7cm;
padding: 17mm;
margin: 0 auto;
background: #FFFFFF;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); // Optional: for better visualization
position: relative;
}
2023-11-14 17:46:52 +01:00
}
font-family: Marianne;
header {
2023-11-14 17:46:52 +01:00
display: flex;
justify-content: space-between;
p {
margin: 0;
}
2023-11-14 17:46:52 +01:00
}
.official-layout & {
.direction {
margin-top: 5.25mm;
}
}
2023-11-14 17:46:52 +01:00
.bloc-marque {
margin-bottom: 14mm;
margin-right: 17mm; // 4x 4.25mm
2023-11-14 17:46:52 +01:00
}
.marianne {
height: 4.25mm;
margin-bottom: 1mm;
}
.intitule {
font-size: 12pt;
font-weight: bold;
margin: 0 0 1mm;
line-height: 12pt;
2023-11-14 17:46:52 +01:00
}
.devise {
height: 8.5mm;
margin: 0;
}
// weasyprint flexbox with img is broken
// so we're using old inline tricks
.logo-co-emetteur,
.direction {
display: inline-block;
vertical-align: top;
}
.logo-co-emetteur {
img {
max-height: 28mm;
margin-right: 5mm;
}
}
.direction {
margin: 5.25mm 0 23.3mm;
line-height: 14pt;
font-weight: bold;
}
.body-start {
margin-top: 12.6mm; // from masque traitement de texte
}
.main {
2023-11-14 17:46:52 +01:00
font-size: 10pt;
.header {
&:first-of-type {
font-size: 10pt;
}
&:last-of-type {
font-size: 8pt;
}
}
2023-11-14 17:46:52 +01:00
}
h1,
h2 {
// both titles have the same size
2023-11-14 17:46:52 +01:00
font-size: 12pt;
font-weight: bold;
}
h1 {
margin: 14mm 0 8mm;
2023-11-14 17:46:52 +01:00
}
h2 {
margin: 0;
2023-11-14 17:46:52 +01:00
}
h3 {
font-size: 10pt; // same as text
font-weight: bold;
2023-11-14 17:46:52 +01:00
}
li p {
margin: 0.25rem 0;
2023-11-14 17:46:52 +01:00
}
2023-12-22 14:23:10 +01:00
.signature {
text-align: right;
margin-top: 14mm;
margin-right: 25mm;
}
2023-12-22 14:23:10 +01:00
.signature,
.logo-free-layout {
2023-12-22 14:23:10 +01:00
img {
max-height: 50mm;
max-width: 50mm;
2023-12-22 14:23:10 +01:00
}
}
footer {
2023-11-14 17:46:52 +01:00
position: running(footer);
font-size: 7pt;
font-weight: 100;
white-space: nowrap;
@media screen {
position: absolute;
bottom: 0;
}
2023-11-14 17:46:52 +01:00
}
}