Skip to content

Commit 995f1ac

Browse files
authored
Merge pull request #345 from dataforgoodfr/feat/donation-video
feat: add video donation
2 parents 9af722c + 41455c2 commit 995f1ac

File tree

4 files changed

+12
-14
lines changed

4 files changed

+12
-14
lines changed

frontend/src/app/[locale]/donations/donation.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,19 +69,21 @@ export default function DonationsPage({ data }: DonationProps) {
6969
iframe={<div className='p-4 [&>iframe]:rounded-2xl' ref={donationSectionRef}>
7070
<a href="https://soutenir.dataforgood.fr/native-/#iraiser_native"></a>
7171
</div>}
72-
image={data.banner_video?.url}
7372
background="purple"
7473
className="my-lg"
7574
internalClassName='min-h-[850px]'
7675
/>
7776

78-
<EditoCard contentClassName=" md:max-w-[80%] md:mx-auto" className="my-lg">
77+
<div className="container-lg mx-auto flex flex-col lg:flex-row items-center gap-12">
78+
{data.banner_video?.url && <div className="shadow-lg bg-building w-full lg:max-w-60 rotate-[-2deg]" dangerouslySetInnerHTML={{ __html: data.banner_video?.url ?? '' }} />}
7979

80-
<div className="prose prose--big leading-tight text-[1.5rem] text-left font-tertiary" dangerouslySetInnerHTML={{ __html: data.introduction_text ?? '' }} />
81-
<div className="flex justify-center mt-sm">
82-
<DonationButton />
83-
</div>
84-
</EditoCard>
80+
<EditoCard contentClassName="flex-1 md:max-w-[80%] md:mx-auto" className="my-lg">
81+
<div className="prose prose--big leading-tight text-[1.5rem] text-left font-tertiary" dangerouslySetInnerHTML={{ __html: data.introduction_text ?? '' }} />
82+
<div className="flex justify-center mt-sm">
83+
<DonationButton />
84+
</div>
85+
</EditoCard>
86+
</div>
8587

8688
<div className="bg-violet-light py-lg">
8789
<TalksBlock

frontend/src/components/molecules/LargeTextImageDonation/LargeTextImageDonation.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
import clsx from 'clsx';
2-
import Image from 'next/image';
3-
import { Button, Title, TitleProps } from '@/components';
2+
import { Title, TitleProps } from '@/components';
43

54
export type LargeTextImageDonationProps = {
65
id?: string;
76
title?: string;
87
titleLevel?: TitleProps['level'];
98
content?: React.ReactNode;
109
iframe?: React.ReactNode;
11-
image?: string;
1210
citation?: string;
1311
citationAuthor?: string;
1412
citationAuthorImage?: string;
@@ -23,7 +21,6 @@ const LargeTextImageDonation: React.FC<LargeTextImageDonationProps> = ({
2321
titleLevel = 2,
2422
content,
2523
iframe,
26-
image,
2724
citation,
2825
citationAuthor,
2926
citationAuthorImage,
@@ -42,7 +39,6 @@ const LargeTextImageDonation: React.FC<LargeTextImageDonationProps> = ({
4239
className={clsx(
4340
'overflow-hidden grid grid-cols-1 grid-rows-[200px_1fr] md:grid-cols-2 md:grid-rows-1 h-full',
4441
`text-white bg-[url("/images/donation-background.jpg")]`,
45-
// `text-white bg-[url("/images/bg-donation.jpg")]`,
4642
internalClassName,
4743
)}
4844
>

frontend/src/components/molecules/TalkCard/TalkCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const TalkCard: React.FC<TalkCardProps> = ({
4141
imagePosition === 'right' && 'sm:order-2',
4242
)}>
4343
<div className={clsx(
44-
'relative inline-flex before:absolute before:content-[""] before:bg-black before:-z-1 before:w-full before:h-full before:top-3 before:left-3',
44+
'relative flex before:absolute before:content-[""] before:bg-black before:-z-1 before:w-full before:h-full before:top-3 before:left-3',
4545
imagePosition === 'right' ? 'rotate-3' : '-rotate-3',
4646
)}>
4747
<Image

frontend/src/components/molecules/ThematicsCard/ThematicsCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const ThematicsCard: React.FC<ThematicsCardProps> = ({
4343
<Image
4444
src={image}
4545
alt=""
46-
className="absolute m-auto left-0 right-0 top-0 pb-lg justify-center h-fit -z-30 object-cover"
46+
className="absolute m-auto left-0 right-0 top-0 bottom-0 lg:bottom-auto pb-lg justify-center h-full lg:h-fit -z-30 object-contain lg:object-cover"
4747
loading="lazy"
4848
width="301"
4949
height="401"

0 commit comments

Comments
 (0)