home partout et pour tous

This commit is contained in:
2026-04-27 11:44:49 +02:00
parent 208456f98e
commit 6c2be0ca71
7 changed files with 87 additions and 45 deletions

View File

@@ -48,7 +48,7 @@
<!-- Sans couleur rouge par dessus -->
<SectionContent tone="" pad="" class="theme_ppt--content">
<SectionTitle tone="invert" pad="xs">
LA MUSIQUE PARTOUT ET POUR TOUS
{{ homePartoutPourTousTitle }}
</SectionTitle>
<SectionContent pad="xs" class="theme_ppt--description">
<DsText tone="invert" size="lg" class="theme_ppt--txt" >
@@ -69,8 +69,8 @@
class="theme_ppt"
:style="themePptCardsBgStyle"
>
<RoundedCardBlocTextList >
<RoundedCardBlocText
<RoundedCardList >
<RoundedCard
v-for="ppt_card in cards_ppt"
:key="ppt_card.id"
:id="ppt_card.id"
@@ -79,8 +79,8 @@
:title="ppt_card.title"
:description="ppt_card.description"
:url="ppt_card.url"
></RoundedCardBlocText>
</RoundedCardBlocTextList>
></RoundedCard>
</RoundedCardList>
</SectionContent>
</PageSection>
@@ -244,24 +244,63 @@
// DONNÉES POUR LES CARTES PARTOUT ET POUR TOUS
//--------------------------------------------------------------------------
const cards_ppt = ref([
const { items: homePartoutPourTous } = useStrapi(
"/api/__strapi__/home-partout-pour-tous",
{
id: '1',
imgSrc: '/contenus/actu1_1.jpg',
imgAlt: 'Femme en mouvement tenant deux cymbales, lune devant elle et lautre derrière, sur fond de mur blanc, dans une posture dynamique évoquant la musique et le rythme',
title: "La nouvelle saison est !",
description: ``,
url:"https://www.orchestre-ile.com/concerts/saison?saison=2026/2027",
},
{
id: '1',
imgSrc: '/contenus/insta_ondif_1.jpg',
imgAlt: 'le titre du post',
title: "6€ la place dès 3 concerts pour les - de 28 ans",
description: `à la Philharmonie de Paris - Cité de la musique`,
url:"https://ondif.shop.secutix.com/selection/subscription?productId=10229737867151",
},
])
locale: "fr-FR",
populate: {
carte: {
illustration: true,
},
},
limit: 1,
}
)
const homePartoutPourTousContent = computed(() => homePartoutPourTous.value?.[0] || null)
const homePartoutPourTousTitle = computed(() =>
homePartoutPourTousContent.value?.titre || "LA MUSIQUE PARTOUT ET POUR TOUS"
)
const cards_ppt = computed(() => {
const cartes = homePartoutPourTousContent.value?.carte || []
const publishedCards = cartes.filter((carte) => carte.publication !== false)
return publishedCards.map((carte, index) => {
const image = getStrapiCardImage(carte)
return {
id: carte.id || String(index + 1),
imgSrc: image?.url || "",
imgAlt: image?.alternativeText || image?.caption || carte.titre || "",
title: carte.titre || "",
description: strapiBlocksToText(carte.description),
url: carte.url || "",
}
})
})
function getStrapiCardImage(carte) {
const image = carte.illustration || null
return Array.isArray(image) ? image[0] : image
}
function strapiBlocksToText(blocks) {
if (!blocks) return ""
if (typeof blocks === "string") return blocks
if (!Array.isArray(blocks)) return ""
return blocks
.map((block) =>
(block.children || [])
.map((child) => child.text || "")
.join("")
)
.filter(Boolean)
.join("\n")
}

View File

@@ -42,8 +42,8 @@
class="theme_ppt"
:style="themePptCardsBgStyle"
>
<RoundedCardBlocTextList >
<RoundedCardBlocText
<RoundedCardList >
<RoundedCard
v-for="ppt_card in cards_ppt"
:key="ppt_card.id"
:id="ppt_card.id"
@@ -52,8 +52,8 @@
:title="ppt_card.title"
:description="ppt_card.description"
:url="ppt_card.url"
></RoundedCardBlocText>
</RoundedCardBlocTextList>
></RoundedCard>
</RoundedCardList>
</SectionContent>
</PageSection>

View File

@@ -35,8 +35,8 @@
class="theme_ppt"
:style="themePptCardsBgStyle"
>
<RoundedCardBlocTextList >
<RoundedCardBlocText
<RoundedCardList >
<RoundedCard
v-for="card in cards_subvention"
:key="card.id"
:id="card.id"
@@ -46,8 +46,8 @@
:description="card.description"
:url="card.url"
ratio="square"
></RoundedCardBlocText>
</RoundedCardBlocTextList>
></RoundedCard>
</RoundedCardList>
</SectionContent>
</PageSection>
@@ -81,8 +81,8 @@
class="theme_ppt"
:style="themePptCardsBgStyle"
>
<RoundedCardBlocTextList >
<RoundedCardBlocText
<RoundedCardList >
<RoundedCard
v-for="card in cards_inst_ass"
:key="card.id"
:id="card.id"
@@ -92,8 +92,8 @@
:description="card.description"
:url="card.url"
ratio="5-4"
></RoundedCardBlocText>
</RoundedCardBlocTextList>
></RoundedCard>
</RoundedCardList>
</SectionContent>
</PageSection>
@@ -127,8 +127,8 @@
class="theme_ppt"
:style="themePptCardsBgStyle"
>
<RoundedCardBlocTextList >
<RoundedCardBlocText
<RoundedCardList >
<RoundedCard
v-for="card in cards_prives"
:key="card.id"
:id="card.id"
@@ -138,8 +138,8 @@
:description="card.description"
:url="card.url"
ratio="5-4"
></RoundedCardBlocText>
</RoundedCardBlocTextList>
></RoundedCard>
</RoundedCardList>
</SectionContent>
</PageSection>
@@ -170,8 +170,8 @@
class="theme_ppt"
:style="themePptCardsBgStyle"
>
<RoundedCardBlocTextList >
<RoundedCardBlocText
<RoundedCardList >
<RoundedCard
v-for="card in cards_ensei_sup"
:key="card.id"
:id="card.id"
@@ -181,8 +181,8 @@
:description="card.description"
:url="card.url"
ratio="5-4"
></RoundedCardBlocText>
</RoundedCardBlocTextList>
></RoundedCard>
</RoundedCardList>
</SectionContent>
</PageSection>