Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
**node_modules/
.DS_Store
.pi/extensions/emdash-hook.ts
.factory/settings.json
10 changes: 10 additions & 0 deletions backend/src/api/project/content-types/project/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,16 @@
}
}
},
"video": {
"type": "component",
"repeatable": false,
"component": "video.video-embed",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"related_projects": {
"type": "relation",
"relation": "oneToMany",
Expand Down
22 changes: 22 additions & 0 deletions backend/src/components/video/video-embed.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"collectionName": "components_video_video_embeds",
"info": {
"displayName": "video_embed",
"icon": "play",
"description": ""
},
"options": {},
"attributes": {
"url": {
"type": "string"
},
"orientation": {
"type": "enumeration",
"enum": [
"paysage",
"portrait"
],
"default": "paysage"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
},
"x-generation-date": "2026-06-10T10:21:11.749Z"
"x-generation-date": "2026-06-29T16:26:56.132Z"
},
"x-strapi-config": {
"plugins": [
Expand Down Expand Up @@ -13437,6 +13437,9 @@
"demo_video_embed": {
"type": "string"
},
"video": {
"$ref": "#/components/schemas/VideoVideoEmbedComponent"
},
"related_projects": {
"type": "array",
"items": {
Expand Down Expand Up @@ -16059,6 +16062,24 @@
}
}
},
"VideoVideoEmbedComponent": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"url": {
"type": "string"
},
"orientation": {
"type": "string",
"enum": [
"paysage",
"portrait"
]
}
}
},
"KpiKpiComponent": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -17442,6 +17463,9 @@
"demo_video_embed": {
"type": "string"
},
"video": {
"$ref": "#/components/schemas/VideoVideoEmbedComponent"
},
"related_projects": {
"type": "array",
"items": {
Expand Down Expand Up @@ -20964,6 +20988,9 @@
"demo_video_embed": {
"type": "string"
},
"video": {
"$ref": "#/components/schemas/VideoVideoEmbedComponent"
},
"related_projects": {
"type": "array",
"items": {
Expand Down Expand Up @@ -23958,6 +23985,9 @@
"demo_video_embed": {
"type": "string"
},
"video": {
"$ref": "#/components/schemas/VideoVideoEmbedComponent"
},
"related_projects": {
"type": "array",
"items": {
Expand Down Expand Up @@ -26711,6 +26741,9 @@
"demo_video_embed": {
"type": "string"
},
"video": {
"$ref": "#/components/schemas/VideoVideoEmbedComponent"
},
"related_projects": {
"type": "array",
"items": {
Expand Down Expand Up @@ -32376,6 +32409,9 @@
"demo_video_embed": {
"type": "string"
},
"video": {
"$ref": "#/components/schemas/VideoVideoEmbedComponent"
},
"related_projects": {
"type": "array",
"items": {
Expand Down Expand Up @@ -35221,6 +35257,9 @@
"demo_video_embed": {
"type": "string"
},
"video": {
"$ref": "#/components/schemas/VideoVideoEmbedComponent"
},
"related_projects": {
"type": "array",
"items": {
Expand Down Expand Up @@ -40364,6 +40403,9 @@
"demo_video_embed": {
"type": "string"
},
"video": {
"$ref": "#/components/schemas/VideoVideoEmbedComponent"
},
"related_projects": {
"type": "array",
"items": {
Expand Down Expand Up @@ -43312,6 +43354,9 @@
"demo_video_embed": {
"type": "string"
},
"video": {
"$ref": "#/components/schemas/VideoVideoEmbedComponent"
},
"related_projects": {
"type": "array",
"items": {
Expand Down Expand Up @@ -47581,6 +47626,9 @@
"demo_video_embed": {
"type": "string"
},
"video": {
"$ref": "#/components/schemas/VideoVideoEmbedComponent"
},
"related_projects": {
"type": "array",
"items": {
Expand Down Expand Up @@ -49852,6 +49900,9 @@
"demo_video_embed": {
"type": "string"
},
"video": {
"$ref": "#/components/schemas/VideoVideoEmbedComponent"
},
"related_projects": {
"type": "array",
"items": {
Expand Down Expand Up @@ -51259,6 +51310,9 @@
"demo_video_embed": {
"type": "string"
},
"video": {
"$ref": "#/components/schemas/VideoVideoEmbedComponent"
},
"related_projects": {
"type": "array",
"items": {
Expand Down Expand Up @@ -53343,6 +53397,9 @@
"demo_video_embed": {
"type": "string"
},
"video": {
"$ref": "#/components/schemas/VideoVideoEmbedComponent"
},
"related_projects": {
"type": "array",
"items": {
Expand Down Expand Up @@ -54432,6 +54489,9 @@
"demo_video_embed": {
"type": "string"
},
"video": {
"$ref": "#/components/schemas/VideoVideoEmbedComponent"
},
"related_projects": {
"type": "array",
"items": {
Expand Down Expand Up @@ -57779,6 +57839,9 @@
"demo_video_embed": {
"type": "string"
},
"video": {
"$ref": "#/components/schemas/VideoVideoEmbedComponent"
},
"related_projects": {
"type": "array",
"items": {
Expand Down Expand Up @@ -61290,6 +61353,9 @@
"demo_video_embed": {
"type": "string"
},
"video": {
"$ref": "#/components/schemas/VideoVideoEmbedComponent"
},
"related_projects": {
"type": "array",
"items": {
Expand Down Expand Up @@ -64613,6 +64679,9 @@
"demo_video_embed": {
"type": "string"
},
"video": {
"$ref": "#/components/schemas/VideoVideoEmbedComponent"
},
"related_projects": {
"type": "array",
"items": {
Expand Down Expand Up @@ -67442,6 +67511,9 @@
"demo_video_embed": {
"type": "string"
},
"video": {
"$ref": "#/components/schemas/VideoVideoEmbedComponent"
},
"related_projects": {
"type": "array",
"items": {
Expand Down Expand Up @@ -71210,6 +71282,9 @@
"demo_video_embed": {
"type": "string"
},
"video": {
"$ref": "#/components/schemas/VideoVideoEmbedComponent"
},
"related_projects": {
"type": "array",
"items": {
Expand Down Expand Up @@ -74973,6 +75048,9 @@
"demo_video_embed": {
"type": "string"
},
"video": {
"$ref": "#/components/schemas/VideoVideoEmbedComponent"
},
"related_projects": {
"type": "array",
"items": {
Expand Down
15 changes: 15 additions & 0 deletions backend/types/generated/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,20 @@ export interface TestimonialTestimonial extends Struct.ComponentSchema {
};
}

export interface VideoVideoEmbed extends Struct.ComponentSchema {
collectionName: 'components_video_video_embeds';
info: {
description: '';
displayName: 'video_embed';
icon: 'play';
};
attributes: {
orientation: Schema.Attribute.Enumeration<['paysage', 'portrait']> &
Schema.Attribute.DefaultTo<'paysage'>;
url: Schema.Attribute.String;
};
}

declare module '@strapi/strapi' {
export module Public {
export interface ComponentSchemas {
Expand All @@ -179,6 +193,7 @@ declare module '@strapi/strapi' {
'kpi.kpi-with-cta': KpiKpiWithCta;
'seo-meta.seo-meta': SeoMetaSeoMeta;
'testimonial.testimonial': TestimonialTestimonial;
'video.video-embed': VideoVideoEmbed;
}
}
}
6 changes: 6 additions & 0 deletions backend/types/generated/contentTypes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1505,6 +1505,12 @@ export interface ApiProjectProject extends Struct.CollectionTypeSchema {
localized: true;
};
}>;
video: Schema.Attribute.Component<'video.video-embed', false> &
Schema.Attribute.SetPluginOptions<{
i18n: {
localized: true;
};
}>;
volunteers: Schema.Attribute.Relation<
'manyToMany',
'api::volunteer.volunteer'
Expand Down
8 changes: 3 additions & 5 deletions frontend/src/app/[locale]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { hasLocale, NextIntlClientProvider } from 'next-intl';
import { getTranslations } from 'next-intl/server';
import { DM_Mono } from 'next/font/google';
import { notFound } from 'next/navigation';
import Script from 'next/script';
import { routing } from '@/i18n/routing';
import Footer from './_partials/footer';
import Header from './_partials/header';
Expand Down Expand Up @@ -71,14 +70,13 @@ export default async function RootLayout({
return (
<html lang={locale} className="scroll-smooth">
<head>
<Script
<script
src="https://soutenir.dataforgood.fr/libs.iraiser.eu/libs/payment/frame/1.6/IRaiserFrame.js"
strategy="beforeInteractive"
defer
/>
<Script
<script
src="https://plausible.services.dataforgood.fr/js/script.file-downloads.hash.outbound-links.js"
defer={true}
defer
data-domain="dataforgood.fr"
/>
</head>
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/app/[locale]/projects/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ async function fetchProjectPageData(slug: string) {
},
seasons: {
populate: '*'
},
video: {
populate: '*'
}
},
},
Expand Down
16 changes: 12 additions & 4 deletions frontend/src/app/[locale]/projects/[slug]/projectDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,18 @@ export default function ProjectDetailPage({ project }: ProjectPageProps) {
className='my-lg'
/>

{project.demo_video && <BannerVideo
video={project.demo_video_embed}
className='my-lg'
/>}
{project.video?.url ? (
<BannerVideo
url={project.video.url}
format={project.video.orientation as 'paysage' | 'portrait'}
className='my-lg'
/>
) : project.demo_video_embed ? (
<BannerVideo
video={project.demo_video_embed}
className='my-lg'
/>
) : null}

{presentationContent.length > 0 && <Banner
content={presentationContent}
Expand Down
Loading
Loading