ajout du bouton et du champs dans le panel pour télécharger le pdf

This commit is contained in:
antonin gallon 2025-12-04 15:15:40 +01:00
parent a9d24a43a9
commit 8c8295b677
6 changed files with 33 additions and 1 deletions

View file

@ -64,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;
}

View file

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

View file

@ -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

View file

@ -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

View file

@ -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>

View file

@ -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>