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

@@ -124,6 +124,8 @@ https://bo.orchestre-ile.com/api/pro-programmer?locale=fr-FR&populate[bios]=true
API Instruments API Instruments
https://bo.orchestre-ile.com/api/parc-instruments?locale=fr-FR&populate=illustration_instrument https://bo.orchestre-ile.com/api/parc-instruments?locale=fr-FR&populate=illustration_instrument
https://bo.orchestre-ile.com/api/home-partout-pour-tous?locale=fr-FR&populate[carte]=true&populate[carte][populate]=illustration=true
### Afficher les données récupérées ou les erreurs dans la console ### Afficher les données récupérées ou les erreurs dans la console
const { items: scolaires, pending, error } = useStrapi( const { items: scolaires, pending, error } = useStrapi(
endpoint, endpoint,

View File

@@ -17,7 +17,7 @@
{{ title }} {{ title }}
</DsHeading> </DsHeading>
<!-- Description --> <!-- Description -->
<DsText as="p" tone="default" :clamp="3" class="rounded-card__description"> <DsText as="p" tone="default" :clamp="6" class="rounded-card__description">
{{ description }} {{ description }}
</DsText> </DsText>
@@ -47,7 +47,7 @@
<style lang="scss"> <style lang="scss">
.rounded-card { .rounded-card {
padding: 16px; padding: 13px;
box-shadow: 0px -1px 20px rgba(0, 0, 0, 0.18); box-shadow: 0px -1px 20px rgba(0, 0, 0, 0.18);
.rounded-card__grid { .rounded-card__grid {
@@ -64,7 +64,7 @@
padding-top: 13px; padding-top: 13px;
padding-bottom: 10px; padding-bottom: 10px;
background: white; background: white;
max-width: 85%; max-width: 93%;
justify-self: center; justify-self: center;
position: relative; position: relative;
margin-top: -7px; margin-top: -7px;

View File

@@ -48,7 +48,7 @@
<!-- Sans couleur rouge par dessus --> <!-- Sans couleur rouge par dessus -->
<SectionContent tone="" pad="" class="theme_ppt--content"> <SectionContent tone="" pad="" class="theme_ppt--content">
<SectionTitle tone="invert" pad="xs"> <SectionTitle tone="invert" pad="xs">
LA MUSIQUE PARTOUT ET POUR TOUS {{ homePartoutPourTousTitle }}
</SectionTitle> </SectionTitle>
<SectionContent pad="xs" class="theme_ppt--description"> <SectionContent pad="xs" class="theme_ppt--description">
<DsText tone="invert" size="lg" class="theme_ppt--txt" > <DsText tone="invert" size="lg" class="theme_ppt--txt" >
@@ -69,8 +69,8 @@
class="theme_ppt" class="theme_ppt"
:style="themePptCardsBgStyle" :style="themePptCardsBgStyle"
> >
<RoundedCardBlocTextList > <RoundedCardList >
<RoundedCardBlocText <RoundedCard
v-for="ppt_card in cards_ppt" v-for="ppt_card in cards_ppt"
:key="ppt_card.id" :key="ppt_card.id"
:id="ppt_card.id" :id="ppt_card.id"
@@ -79,8 +79,8 @@
:title="ppt_card.title" :title="ppt_card.title"
:description="ppt_card.description" :description="ppt_card.description"
:url="ppt_card.url" :url="ppt_card.url"
></RoundedCardBlocText> ></RoundedCard>
</RoundedCardBlocTextList> </RoundedCardList>
</SectionContent> </SectionContent>
</PageSection> </PageSection>
@@ -244,24 +244,63 @@
// DONNÉES POUR LES CARTES PARTOUT ET POUR TOUS // 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', locale: "fr-FR",
imgSrc: '/contenus/actu1_1.jpg', populate: {
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', carte: {
title: "La nouvelle saison est !", illustration: true,
description: ``, },
url:"https://www.orchestre-ile.com/concerts/saison?saison=2026/2027", },
}, limit: 1,
{ }
id: '1', )
imgSrc: '/contenus/insta_ondif_1.jpg',
imgAlt: 'le titre du post', const homePartoutPourTousContent = computed(() => homePartoutPourTous.value?.[0] || null)
title: "6€ la place dès 3 concerts pour les - de 28 ans",
description: `à la Philharmonie de Paris - Cité de la musique`, const homePartoutPourTousTitle = computed(() =>
url:"https://ondif.shop.secutix.com/selection/subscription?productId=10229737867151", 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" class="theme_ppt"
:style="themePptCardsBgStyle" :style="themePptCardsBgStyle"
> >
<RoundedCardBlocTextList > <RoundedCardList >
<RoundedCardBlocText <RoundedCard
v-for="ppt_card in cards_ppt" v-for="ppt_card in cards_ppt"
:key="ppt_card.id" :key="ppt_card.id"
:id="ppt_card.id" :id="ppt_card.id"
@@ -52,8 +52,8 @@
:title="ppt_card.title" :title="ppt_card.title"
:description="ppt_card.description" :description="ppt_card.description"
:url="ppt_card.url" :url="ppt_card.url"
></RoundedCardBlocText> ></RoundedCard>
</RoundedCardBlocTextList> </RoundedCardList>
</SectionContent> </SectionContent>
</PageSection> </PageSection>

View File

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

View File

@@ -21,6 +21,7 @@ const COLLECTION_MAP = {
"pro-programmer": "/api/pro-programmer", "pro-programmer": "/api/pro-programmer",
"parametres": "/api/parametres", "parametres": "/api/parametres",
instruments: "/api/parc-instruments", instruments: "/api/parc-instruments",
"home-partout-pour-tous": "/api/home-partout-pour-tous",
} }
export default defineEventHandler(async (event) => { export default defineEventHandler(async (event) => {