ajout de exergue dans les pages statiques, correction de l'affichage des images verticales dans les diapos et des légendes, correction de l'affichage de pages sans image de couverture (vignette)

This commit is contained in:
Valentin 2024-10-11 17:26:08 +02:00
parent 95fc315ef0
commit 66d43ad373
3 changed files with 11 additions and 4 deletions

View File

@ -239,7 +239,6 @@ export const useContentStore = defineStore('content', {
if (partiesFetch) { if (partiesFetch) {
this.page.parties = []; this.page.parties = [];
for (let partie of partiesFetch) { for (let partie of partiesFetch) {
const partieType = partie.type.replace(/^paragraph--/, ""); const partieType = partie.type.replace(/^paragraph--/, "");
let partieContent = { let partieContent = {
@ -263,6 +262,9 @@ export const useContentStore = defineStore('content', {
} }
} }
break; break;
case 'exergue':
partieContent.exergue = partie.attributes.field_texte_exergue.value;
break;
case 'video': case 'video':
partieContent.videos = []; partieContent.videos = [];
for (let video of partie.attributes.field_videos) { for (let video of partie.attributes.field_videos) {

View File

@ -1,7 +1,7 @@
<template> <template>
<header> <header :style="content.vignette ? '' : { marginTop: '20vh' }">
<div class="cover"> <div class="cover">
<img :src="content.vignette.url" :alt="content.vignette.alt"> <img v-if="content.vignette" :src="content.vignette.url" :alt="content.vignette.alt">
</div> </div>
<div v-if="content.dates" class="cartouche" :style="{ backgroundColor: couleur }"> <div v-if="content.dates" class="cartouche" :style="{ backgroundColor: couleur }">
<p>Étape n°{{content.etape_number}}</p> <p>Étape n°{{content.etape_number}}</p>

View File

@ -87,10 +87,15 @@ swiper-slide figure:not(.popup-figure) {
padding-bottom: 3rem; padding-bottom: 3rem;
} }
swiper-slide figure:not(.popup-figure) figcaption {
text-align: center;
}
swiper-slide img:not(.popup-img) { /* cf main.scss */ swiper-slide img:not(.popup-img) { /* cf main.scss */
max-height: 35vh; max-height: 35vh;
cursor: pointer; cursor: pointer;
transition: transform 0.3s ease-out; transition: transform 0.3s ease-out;
object-fit: contain !important;
&:hover { &:hover {
transform: scale(1.01); transform: scale(1.01);
} }