Compare commits
2 commits
7829420c78
...
8c8295b677
| Author | SHA1 | Date | |
|---|---|---|---|
| 8c8295b677 | |||
| a9d24a43a9 |
7 changed files with 57 additions and 15 deletions
|
|
@ -46,18 +46,4 @@ body.full-width #main-content {
|
|||
column-gap: var(--unit--horizontal);
|
||||
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 */
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +1,35 @@
|
|||
@media print {
|
||||
/* 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;
|
||||
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 {
|
||||
/*variable pas supporter dans les marges...*/
|
||||
/*
|
||||
|
|
@ -40,7 +64,7 @@
|
|||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
|
|
|
|||
2
site/blueprints/files/pdfVersion-file.yml
Normal file
2
site/blueprints/files/pdfVersion-file.yml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
accept:
|
||||
extension: pdf
|
||||
|
|
@ -15,6 +15,14 @@ tabs:
|
|||
label: Corps
|
||||
type: 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:
|
||||
label: Pleine largeur
|
||||
type: toggle
|
||||
|
|
|
|||
|
|
@ -15,6 +15,14 @@ tabs:
|
|||
label: Corps
|
||||
type: 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:
|
||||
label: Sous-titre
|
||||
type: writer
|
||||
|
|
|
|||
|
|
@ -15,6 +15,13 @@
|
|||
/ <a
|
||||
href="/categories/<?= $page->category() ?>"><?= $page->category() ?></a>
|
||||
</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">
|
||||
<span class="light">imprimé le </span><span><?= \Kirby\Toolkit\Date::today()->format('d/m/Y'); ?></span><br>
|
||||
<span class="light url"><?= $page->url() ?></span>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,13 @@
|
|||
/ <a href="/categories/<?= Str::slug($page->category()) ?>"
|
||||
title="voir les textes de la catégorie <?= $page->category() ?>"><?= $page->category() ?></a>
|
||||
</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">
|
||||
<span class="light">imprimé le </span><span><?= \Kirby\Toolkit\Date::today()->format('d/m/Y'); ?></span><br>
|
||||
<span class="light url"><?= $page->url() ?></span>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue