diff --git a/site/blueprints/files/cover.yml b/site/blueprints/files/cover.yml new file mode 100644 index 0000000..ca64d64 --- /dev/null +++ b/site/blueprints/files/cover.yml @@ -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 diff --git a/site/blueprints/pages/investigation-summary.yml b/site/blueprints/pages/investigation-summary.yml index d3daa5a..c062b0b 100644 --- a/site/blueprints/pages/investigation-summary.yml +++ b/site/blueprints/pages/investigation-summary.yml @@ -33,6 +33,8 @@ tabs: min: 1 layout: cards size: full + uploads: + template: cover image: ratio: 12/7 cover: true diff --git a/site/snippets/blocks/heading.php b/site/snippets/blocks/heading.php new file mode 100644 index 0000000..f2d61fd --- /dev/null +++ b/site/snippets/blocks/heading.php @@ -0,0 +1,4 @@ +level()->or('h2'); +?> +<>text() ?>> diff --git a/site/snippets/blocks/image.php b/site/snippets/blocks/image.php new file mode 100644 index 0000000..ec2beee --- /dev/null +++ b/site/snippets/blocks/image.php @@ -0,0 +1,8 @@ +image()->toFile()): ?> +
+ <?= $block->alt()->or($image->alt()) ?> + caption()->isNotEmpty()): ?> +
caption() ?>
+ +
+ diff --git a/site/snippets/blocks/text.php b/site/snippets/blocks/text.php new file mode 100644 index 0000000..c0078c3 --- /dev/null +++ b/site/snippets/blocks/text.php @@ -0,0 +1 @@ +text() ?> diff --git a/site/templates/investigation-summary.php b/site/templates/investigation-summary.php index 72cdec1..f8b5e09 100644 --- a/site/templates/investigation-summary.php +++ b/site/templates/investigation-summary.php @@ -14,17 +14,19 @@ cover()->toFile()): ?> -
caption() ?>
+ caption()->isNotEmpty()): ?> +
caption() ?>
+