investigation-summary : ajout gestion légendes d'images
- Création du blueprint files/cover.yml avec champs alt et caption - Configuration uploads.template: cover pour association automatique - Amélioration affichage légende avec condition isNotEmpty() - Les métadonnées des images sont désormais éditables via le panel 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
b0a5bfc4c8
commit
4a18a61148
3 changed files with 21 additions and 5 deletions
12
site/blueprints/files/cover.yml
Normal file
12
site/blueprints/files/cover.yml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
title: Image de couverture
|
||||
|
||||
fields:
|
||||
alt:
|
||||
label: Texte alternatif
|
||||
type: text
|
||||
help: Description de l'image pour l'accessibilité
|
||||
caption:
|
||||
label: Légende
|
||||
type: textarea
|
||||
size: small
|
||||
help: Légende affichée sous l'image
|
||||
|
|
@ -33,6 +33,8 @@ tabs:
|
|||
min: 1
|
||||
layout: cards
|
||||
size: full
|
||||
uploads:
|
||||
template: cover
|
||||
image:
|
||||
ratio: 12/7
|
||||
cover: true
|
||||
|
|
|
|||
|
|
@ -14,17 +14,19 @@
|
|||
<?php endif; ?>
|
||||
</figure>
|
||||
<?php if ($cover = $page->cover()->toFile()): ?>
|
||||
<figcaption><?= $cover->caption() ?></figcaption>
|
||||
<?php if ($cover->caption()->isNotEmpty()): ?>
|
||||
<figcaption><?= $cover->caption() ?></figcaption>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div id="banner--page">
|
||||
<nav id="nav--page">
|
||||
<ul>
|
||||
<li><a href="#">Vidéo</a></li>
|
||||
<li><a href="#">Synthèse</a></li>
|
||||
<li><a href="#">Impacts</a></li>
|
||||
<li><a href="#">En lien</a></li>
|
||||
<li><a href="#hero">Vidéo</a></li>
|
||||
<li><a href="#section__synthese">Synthèse</a></li>
|
||||
<li><a href="#section__impacts">Impacts</a></li>
|
||||
<li><a href="#section__en-lien">En lien</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue