Skip to content

Commit 8a28bba

Browse files
authored
Merge branch 'main' into feat-page-projet-ajout-module-vid-o-z55ap
2 parents 3cd8601 + 9bc5892 commit 8a28bba

19 files changed

Lines changed: 3748 additions & 47 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
**node_modules/
22
.DS_Store
33
.factory/settings.json
4+
.pi/extensions/emdash-hook.ts

backend/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,16 @@
3636
"react-router-dom": "^6.0.0",
3737
"sharp": "^0.34.4",
3838
"strapi-plugin-multi-select": "^2.1.1",
39-
"strapi-v5-redirects": "^1.0.4",
4039
"strapi-plugin-tagsinput": "^2.0.2",
4140
"strapi-provider-email-brevo": "^1.0.4",
41+
"strapi-v5-redirects": "^1.0.4",
4242
"styled-components": "^6.0.0"
4343
},
4444
"strapi": {
4545
"uuid": "23578308-9b2f-4525-aca3-db1c4f9e3b2d"
4646
},
4747
"devDependencies": {
48-
"@types/qs": "^6.9.16"
48+
"@types/qs": "^6.9.16",
49+
"baseline-browser-mapping": "^2.10.23"
4950
}
5051
}

backend/src/api/press-release/content-types/press-release/schema.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,33 @@
9797
"type": "relation",
9898
"relation": "oneToMany",
9999
"target": "api::tag.tag"
100+
},
101+
"press_release_type": {
102+
"type": "enumeration",
103+
"pluginOptions": {
104+
"i18n": {
105+
"localized": true
106+
}
107+
},
108+
"enum": [
109+
"link",
110+
"file"
111+
]
112+
},
113+
"article_file": {
114+
"type": "media",
115+
"pluginOptions": {
116+
"i18n": {
117+
"localized": true
118+
}
119+
},
120+
"multiple": false,
121+
"allowedTypes": [
122+
"images",
123+
"files",
124+
"videos",
125+
"audios"
126+
]
100127
}
101128
}
102129
}

backend/src/extensions/documentation/documentation/1.0.0/full_documentation.json

Lines changed: 2603 additions & 1 deletion
Large diffs are not rendered by default.

backend/types/generated/contentTypes.d.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1190,6 +1190,14 @@ export interface ApiPressReleasePressRelease
11901190
};
11911191
};
11921192
attributes: {
1193+
article_file: Schema.Attribute.Media<
1194+
'images' | 'files' | 'videos' | 'audios'
1195+
> &
1196+
Schema.Attribute.SetPluginOptions<{
1197+
i18n: {
1198+
localized: true;
1199+
};
1200+
}>;
11931201
article_link: Schema.Attribute.String &
11941202
Schema.Attribute.SetPluginOptions<{
11951203
i18n: {
@@ -1228,6 +1236,12 @@ export interface ApiPressReleasePressRelease
12281236
localized: true;
12291237
};
12301238
}>;
1239+
press_release_type: Schema.Attribute.Enumeration<['link', 'file']> &
1240+
Schema.Attribute.SetPluginOptions<{
1241+
i18n: {
1242+
localized: true;
1243+
};
1244+
}>;
12311245
published_date: Schema.Attribute.Date &
12321246
Schema.Attribute.SetPluginOptions<{
12331247
i18n: {

frontend/messages/fr/layout.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@
5656
},
5757
"social": {
5858
"bluesky": "Bluesky",
59-
"linkedin": "LinkedIn"
59+
"linkedin": "LinkedIn",
60+
"instagram": "Instagram",
61+
"mastodon": "Mastodon"
6062
}
6163
}
6264
},

frontend/src/app/[locale]/_partials/footer.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { useTranslations } from 'next-intl';
44
import Image from 'next/image';
55
import Link from 'next/link';
6-
import { FaBluesky, FaLinkedin } from 'react-icons/fa6';
6+
import { FaBluesky, FaInstagram, FaLinkedin, FaMastodon } from 'react-icons/fa6';
77
import { Button, SocialLink } from '@/components/atoms';
88
import { usePathLocale } from '@/hooks/usePathLocale';
99
import { NewsletterForm } from '@/components';
@@ -14,13 +14,21 @@ const Footer = () => {
1414

1515
const socialLinks: Record<string, { href: string; icon: React.ReactNode }> = {
1616
bluesky: {
17-
href: 'https://bsky.app/profile/dataforgood.fr',
17+
href: 'https://bsky.app/profile/dataforgoodfr.bsky.social',
1818
icon: <FaBluesky />,
1919
},
2020
linkedin: {
21-
href: 'https://www.linkedin.com/company/dataforgoodfr/',
21+
href: 'https://www.linkedin.com/company/dataforgood/',
2222
icon: <FaLinkedin />,
2323
},
24+
instagram: {
25+
href: 'https://www.instagram.com/dataforgoodfr/',
26+
icon: <FaInstagram />,
27+
},
28+
mastodon: {
29+
href: 'https://piaille.fr/@dataforgood',
30+
icon: <FaMastodon />,
31+
},
2432
};
2533

2634
const communityNav: Record<string, string> = {

frontend/src/app/[locale]/about/about.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@ function transformTestimonials(
2626
}
2727

2828
function transformFunders(funders: NonNullable<AboutPageData['funders']>) {
29-
return funders.map(partner => ({
30-
id: partner.id,
31-
name: partner.name,
32-
image: partner.logo?.url,
33-
link: partner.website_link ?? 'https://www.dataforgood.fr',
29+
return funders.map(funder => ({
30+
id: funder.id,
31+
name: funder.name,
32+
description: funder.description,
33+
image: funder.logo?.url,
34+
link: funder.website_link ?? 'https://www.dataforgood.fr',
3435
}));
3536
}
3637

frontend/src/app/[locale]/blog/blog.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { Title, BaseCardsBlock, Pagination, SearchInput } from '@/components';
66
import { BlogsPageMeta, BlogsPageData } from './page';
77
import { usePagination } from '@/hooks/usePagination';
88
import { useState, useEffect } from 'react';
9+
import { getPressReleaseLink } from '@/lib/utils';
910

1011

1112
function transformBlogsData(resources: NonNullable<BlogsPageData>) {
@@ -19,7 +20,7 @@ function transformBlogsData(resources: NonNullable<BlogsPageData>) {
1920
rawDate: resource.published_date,
2021
date: new Date(resource.published_date).toLocaleString(undefined, {dateStyle: 'medium'}),
2122
image: element.thumbnail?.url ?? "/images/dataforgood.svg",
22-
link: isBlog ? `/blog/${element.slug}` : element.article_link,
23+
link: isBlog ? `/blog/${element.slug}` : getPressReleaseLink(element as { press_release_type: string; article_link: string; article_file: {url: string;}}),
2324
subInfos: element.tags ? element.tags.map(tag => tag.name) : [],
2425
tags: [new Date(element.published_date).toLocaleDateString(undefined, {dateStyle: 'long'}), element.media_name],
2526
isBlank: true,

frontend/src/app/[locale]/blog/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export default async function Page({
5757
searchParams: { [key: string]: string | string[] | undefined };
5858
}) {
5959
const page = typeof searchParams.page === 'string' ? Number(searchParams.page) : 1;
60-
const pageSize = 8;
60+
const pageSize = 12;
6161
const response = await fetchBlogsPageData(page, pageSize);
6262

6363
if (!response?.data || !response?.data.meta?.pagination) {

0 commit comments

Comments
 (0)