Compare commits

...

2 commits

7 changed files with 57 additions and 15 deletions

View file

@ -46,18 +46,4 @@ body.full-width #main-content {
column-gap: var(--unit--horizontal); column-gap: var(--unit--horizontal);
margin-bottom: calc(var(--unit--vertical) * 2); margin-bottom: calc(var(--unit--vertical) * 2);
} }
}
@media print{
.grid .column {
grid-column: span 1;
}
[data-template="grid"] .grid {
column-gap: 20px;
grid-template-columns: repeat(2, 1fr);
}
.blocks, .column {
page-break-inside: auto; /* autoriser la coupe si nécessaire */
}
} }

View file

@ -1,11 +1,35 @@
@media print { @media print {
/* Hide header / footer infos. */ /* Hide header / footer infos. */
:root{
--font-size-m: calc(var(--font-size-s) * 1.4) !important;
}
*:not(.page-cover) p, *:not(.page-cover) li, *:not(.page-cover) button, *:not(.page-cover) .fs-m{
font-size: var(--font-size-m);
line-height: 1.2;
}
* { * {
-webkit-print-color-adjust: exact; -webkit-print-color-adjust: exact;
print-color-adjust: exact; print-color-adjust: exact;
} }
[data-template="linear"] #main-content{
padding-right: calc(var(--unit--horizontal) * 2) ;
}
[data-template="grid"] .grid .column {
grid-column: span 1;
}
[data-template="grid"] .grid {
column-gap: 20px;
grid-template-columns: repeat(2, 1fr);
}
[data-template="grid"] .blocks, .column {
page-break-inside: auto; /* autoriser la coupe si nécessaire */
}
@page { @page {
/*variable pas supporter dans les marges...*/ /*variable pas supporter dans les marges...*/
/* /*
@ -40,7 +64,7 @@
} }
.panel, nav, .main-edito-btn, .theme-toggler, .page-cover .links, .panel, nav, .main-edito-btn, .theme-toggler, .page-cover .links,
[data-template="home"] .title-wrapper button.open-nav, #nav-overlay{ [data-template="home"] .title-wrapper button.open-nav, #nav-overlay, .only-screen{
display: none !important; display: none !important;
} }

View file

@ -0,0 +1,2 @@
accept:
extension: pdf

View file

@ -15,6 +15,14 @@ tabs:
label: Corps label: Corps
type: fields type: fields
fields: fields:
pdfVersion:
label: version pdf
help: glisser ici le fichier pdf généré avec `ctrl + p` depuis la page du site
type: files
multiple: false
image: false
uploads: pdfVersion-file
width: 1/3
fullWidth: fullWidth:
label: Pleine largeur label: Pleine largeur
type: toggle type: toggle

View file

@ -15,6 +15,14 @@ tabs:
label: Corps label: Corps
type: fields type: fields
fields: fields:
pdfVersion:
label: version pdf
help: glisser ici le fichier pdf généré avec `ctrl + p` depuis la page du site
type: files
multiple: false
image: false
uploads: pdfVersion-file
width: 1/3
subtitle: subtitle:
label: Sous-titre label: Sous-titre
type: writer type: writer

View file

@ -15,6 +15,13 @@
/ <a / <a
href="/categories/<?= $page->category() ?>"><?= $page->category() ?></a> href="/categories/<?= $page->category() ?>"><?= $page->category() ?></a>
</p> </p>
<?php if ($document = $page->pdfVersion()->toFile()): ?>
<p class="only-screen">
<a href="<?= $document->url() ?>" target= "_blank">
télécharger le pdf
</a>
</p>
<?php endif ?>
<p class="only-print"> <p class="only-print">
<span class="light">imprimé le </span><span><?= \Kirby\Toolkit\Date::today()->format('d/m/Y'); ?></span><br> <span class="light">imprimé le </span><span><?= \Kirby\Toolkit\Date::today()->format('d/m/Y'); ?></span><br>
<span class="light url"><?= $page->url() ?></span> <span class="light url"><?= $page->url() ?></span>

View file

@ -20,6 +20,13 @@
/ <a href="/categories/<?= Str::slug($page->category()) ?>" / <a href="/categories/<?= Str::slug($page->category()) ?>"
title="voir les textes de la catégorie <?= $page->category() ?>"><?= $page->category() ?></a> title="voir les textes de la catégorie <?= $page->category() ?>"><?= $page->category() ?></a>
</p> </p>
<?php if ($document = $page->pdfVersion()->toFile()): ?>
<p class="only-screen">
<a href="<?= $document->url() ?>" target= "_blank">
télécharger le pdf
</a>
</p>
<?php endif ?>
<p class="only-print"> <p class="only-print">
<span class="light">imprimé le </span><span><?= \Kirby\Toolkit\Date::today()->format('d/m/Y'); ?></span><br> <span class="light">imprimé le </span><span><?= \Kirby\Toolkit\Date::today()->format('d/m/Y'); ?></span><br>
<span class="light url"><?= $page->url() ?></span> <span class="light url"><?= $page->url() ?></span>