bunige-pagedjs-template/style.css

174 lines
4.4 KiB
CSS
Raw Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

@media print {
body {
font-family: "TheSansOsF", "Open Sans", Arial, Helvetica, sans-serif;
/* Définit les deux variable de compteur nécessaires */
counter-reset: figureNumber toc;
}
/* Définit que string(date) contient la date indiquée dans le frontmatter
* de la source markdown */
.date {
string-set: date content(text);
display: none; /* Pourquoi? Pour ne pas afficher la date sous le titre? */
}
/* Définit que running(licenceBlock) contient le block licence */
#licence {
position: running(licenceBlock);
}
@page {
size: A4;
margin: 25mm;
bleed: 6mm;
@bottom-center {
content: counter(page);
}
}
@page:left {
margin-left: 25mm;
margin-right: 15mm;
}
@page:right {
margin-left: 15mm;
margin-right: 25mm;
}
@page:first {
@top-right {
content: "";
background-image: url("./static/bibliotheque-logo.svg");
background-position: right;
background-repeat: no-repeat;
background-size: 25%;
}
@bottom-left{
content: element(licenceBlock);
font-size: small;
}
@bottom-center {
content: none;
}
@bottom-right {
content: string(date);
font-size: small;
}
}
/* Attention, il faut adapter au nombre effectif de pages! *
* Cette règle n'affiche pas de numré de page à la dernière page */
@page:nth(5) {
@bottom-center {
content: none;
}
}
h2 {
color: #d80669;
text-decoration: underline;
}
/* Ajouter ou supprimer les ID de titre pour un saut de page */
#principes-généraux,
#bibliographie,
.footnotes {
break-before: page;
}
#title-block-header {
/* Concerne le bloc titre sur la page de titre */
text-align: center;
margin: 4em 0;
}
.authors {
display: flex;
justify-content: center;
}
.author {
margin: 0;
padding: 0 1em;
}
pre {
font-family:'Courier New', Courier, monospace;
font-size: 90%;
background-color: #f2f1f1;
border: 2px solid #d80669;
border-radius: .5em;
margin: 1em;
padding: .5em 1em;
/* Évite que les blocs de code ne soient séparés sur 2 pages */
break-inside: avoid;
}
code {
font-family:'Courier New', Courier, monospace;
font-size: 90%;
background-color: #f2f1f1;
padding: 2px;
border-radius: 5px;
}
/* La règle suivante ne fonctionne pas.
* Elle est censée surprimer une indentation ajoutée par pandoc
* pour les block de code */
pre > code.sourceCode > span {
padding-left: 0 !important;
}
.footnotes::before {
content: "Notes";
color: #d80669;
font-size: 120%;
font-weight: bold;
}
.footnote-ref {
text-decoration: none;
}
figure {
display: flex;
flex-direction: column;
border: 2px solid #d80669;
border-radius: .5em;
padding: .5em;
}
figure img {
max-width: 85%;
margin: 0 auto;
}
figcaption {
text-align: center;
font-size: 90%;
counter-increment: figureNumber;
padding-top: .5em;
}
figcaption::before {
content: "Figure " counter(figureNumber) ": ";
}
blockquote {
font-style: italic;
}
blockquote em {
font-style: normal;
}
div.csl-entry {
padding: .5em;
}
.logo {
display: inline-flex;
width: 60%;
margin: 2em auto 1em auto;
}
.logo img {
max-width: 50%;
padding: .5em;
}
/* Les 4 règles suivantes mettent en forme la table des matières:*
* Suppression des liste à puce, numérotation des chapitres et affichage du
* numéro de page. */
#TOC ul {
list-style: none;
counter-reset: toc;
padding-left: 1.5em;
}
#TOC li {
counter-increment: toc;
}
#TOC li::before {
content: counter(toc) ". ";
}
#TOC a::after {
content: target-counter(attr(href url), page);
position: absolute;
right: 0;
}
}