Skip to content
Open
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
2 changes: 1 addition & 1 deletion frontend/src/app/[locale]/_partials/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { FaBluesky, FaInstagram, FaLinkedin, FaMastodon } from 'react-icons/fa6';
import { Button, SocialLink } from '@/components/atoms';
import { usePathLocale } from '@/hooks/usePathLocale';
import { NewsletterForm } from '@/components';

Check warning on line 9 in frontend/src/app/[locale]/_partials/footer.tsx

View workflow job for this annotation

GitHub Actions / frontend-quality

'NewsletterForm' is defined but never used

Check warning on line 9 in frontend/src/app/[locale]/_partials/footer.tsx

View workflow job for this annotation

GitHub Actions / frontend-quality

'NewsletterForm' is defined but never used

const Footer = () => {
const t = useTranslations('layout.footer');
Expand Down Expand Up @@ -54,7 +54,7 @@
src="/images/dataforgood.svg"
alt={t('title')}
width={212}
height={48}
height={44}
className="object-contain"
/>
</Link>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/[locale]/_partials/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ const Header = () => {
src="/images/dataforgood.svg"
alt={t('header.title')}
width={230}
height={43}
height={48}
className="w-[176px] lg:w-[230px] object-contain"
/>
</Link>
Expand Down
18 changes: 9 additions & 9 deletions frontend/src/app/[locale]/positions/_partials/Animations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function Animation({ animationData, handleSkipClick }: {
<motion.div className="bg-fixed bg-[url('/images/bg-paper.jpg')] bg-repeat-y bg-cover fixed top-0 left-0 right-0 bottom-0" style={{ opacity: useTransform(scrollYProgress, [0.95, 1], [1, 0]) }} />
<Link href="#manifesto" onClick={(e) => { e.preventDefault(); handleSkipClick(); }} className="absolute z-1 top-[calc(100dvh-40px)] right-[40px] text-grey-text flex flex-col items-center hover:text-black">
{t('skipLink')}
<Image src="/icons/skip-arrow.svg" alt="" width={16} height={16} />
<Image src="/icons/skip-arrow.svg" alt="" width={16} height={11} />
</Link>

{/* Screen 1 */}
Expand All @@ -47,8 +47,8 @@ export default function Animation({ animationData, handleSkipClick }: {
{/* Screen 2 */}
<motion.div className="fixed top-0 left-0 right-0 bottom-0 flex justify-center items-center" style={{ opacity: useTransform(scrollYProgress, [0, 0.05, 0.1, 0.95, 1], [0, 0, 1, 1, 0]) }}>
<Image
src={animationData.images.length > 0 && animationData.images[0].image.url || ""}
alt={animationData.images.length > 0 && animationData.images[0].image.altText || ""}
src={animationData.images[0]?.image.url || "/images/default-image.svg"}
alt={animationData.images[0]?.image.altText || ""}
width={1250}
height={1089}
className='absolute top-[7.5vh] h-[85vh] object-contain'
Expand All @@ -64,8 +64,8 @@ export default function Animation({ animationData, handleSkipClick }: {
{/* Screen 3 */}
<motion.div className="fixed top-0 left-0 right-0 bottom-0 flex justify-center items-center" style={{ opacity: useTransform(scrollYProgress, [0, 0.25, 0.3, 0.95, 1], [0, 0, 1, 1, 0]) }}>
<Image
src={animationData.images.length > 1 && animationData.images[1].image.url || ""}
alt={animationData.images.length > 1 && animationData.images[1].image.altText || ""}
src={animationData.images[1]?.image.url || "/images/default-image.svg"}
alt={animationData.images[1]?.image.altText || ""}
width={1250}
height={1089}
className='absolute top-[7.5vh] h-[85vh] object-contain'
Expand All @@ -81,8 +81,8 @@ export default function Animation({ animationData, handleSkipClick }: {
{/* Screen 4 */}
<motion.div className="fixed top-0 left-0 right-0 bottom-0 flex justify-center items-center" style={{ opacity: useTransform(scrollYProgress, [0, 0.45, 0.5, 0.95, 1], [0, 0, 1, 1, 0]) }}>
<Image
src={animationData.images.length > 1 && animationData.images[2].image.url || ""}
alt={animationData.images.length > 1 && animationData.images[2].image.altText || ""}
src={animationData.images[2]?.image.url || "/images/default-image.svg"}
alt={animationData.images[2]?.image.altText || ""}
width={1250}
height={1089}
className='absolute top-[7.5vh] h-[85vh] object-contain'
Expand All @@ -98,8 +98,8 @@ export default function Animation({ animationData, handleSkipClick }: {
{/* Screen 5 */}
<motion.div className={clsx("fixed top-0 left-0 right-0 bottom-0 flex justify-center items-center")} style={{ opacity: useTransform(scrollYProgress, [0, 0.65, 0.7, 0.95, 1], [0, 0, 1, 1, 0]) }}>
<Image
src={animationData.images.length > 1 && animationData.images[3].image.url || ""}
alt={animationData.images.length > 1 && animationData.images[3].image.altText || ""}
src={animationData.images[3]?.image.url || "/images/default-image.svg"}
alt={animationData.images[3]?.image.altText || ""}
width={1250}
height={1089}
className='absolute top-[7.5vh] h-[85vh] object-contain'
Expand Down
15 changes: 11 additions & 4 deletions frontend/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import clsx from 'clsx';
import Script from 'next/script';
import { DM_Mono } from 'next/font/google';

const dmMono = DM_Mono({
Expand Down Expand Up @@ -29,13 +30,19 @@ export default function RootLayout({
return (
<html lang="fr" data-scroll-behavior="smooth">
<head>
<script
{/* `next/script` et non des balises `<script>` nues : React avertit
qu'un script rendu par un composant n'est jamais execute cote client.
`afterInteractive` et non `beforeInteractive` : charge trop tot, le
script iRaiser detourne `console.error` et casse le flux RSC de Next
(`enqueueModel is not a function`), ce qui fait echouer les
navigations cote client. */}
<Script
src="https://soutenir.dataforgood.fr/libs.iraiser.eu/libs/payment/frame/1.6/IRaiserFrame.js"
defer
strategy="afterInteractive"
/>
<script
<Script
src="https://plausible.services.dataforgood.fr/js/script.file-downloads.hash.outbound-links.js"
defer
strategy="afterInteractive"
data-domain="dataforgood.fr"
/>
</head>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/atoms/Pagination/Pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const Pagination = ({
setCurrentPage(currentPage - 1)
}
}}>
<Image src={color === 'white' ? '/images/arrow-left.svg' : '/images/arrow-left-black.svg'} alt={t('pagination.left')} width={212} height={48} loading="lazy" className="relative left-0 object-contain max-h-full max-w-full" />
<Image src={color === 'white' ? '/images/arrow-left.svg' : '/images/arrow-left-black.svg'} alt={t('pagination.left')} width={212} height={22} loading="lazy" className="relative left-0 object-contain max-h-full max-w-full" />
</div>
<div className={clsx('flex flex-row gap-xs font-black', color === 'white' ? 'text-white' : 'text-black')}>
{Array.from(Array(pageCount).keys()).map((number, index) => (
Expand All @@ -47,7 +47,7 @@ const Pagination = ({
setCurrentPage(currentPage + 1)
}
}}>
<Image src={color === 'white' ? '/images/arrow-right.svg' : '/images/arrow-right-black.svg'} alt={t('pagination.right')} width={212} height={48} loading="lazy" className="relative right-0 object-contain max-h-full max-w-full" />
<Image src={color === 'white' ? '/images/arrow-right.svg' : '/images/arrow-right-black.svg'} alt={t('pagination.right')} width={212} height={22} loading="lazy" className="relative right-0 object-contain max-h-full max-w-full" />
</div>

</div>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/atoms/Title/Title.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const Title = ({
return (
<HeadingTag className={classes} {...props}>
{children}
{hasSeparator && <Image loading="lazy" src="/images/separate.svg" alt="" width={200} height={10} className="mt-xs w-full h-2.5" />}
{hasSeparator && <Image loading="lazy" src="/images/separate.svg" alt="" width={1322} height={7} className="mt-xs w-full h-2.5" />}
</HeadingTag>
);
};
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/components/molecules/BaseCard/BaseCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ const BaseCard: React.FC<BaseCardProps> = ({
subInfos,
className,
isBlank = false,
...props
}) => {
if (!title || !link) {
return null;
Expand All @@ -38,7 +37,6 @@ const BaseCard: React.FC<BaseCardProps> = ({
rel={isBlank ? 'noreferrer' : undefined}
href={link}
aria-label={title}
{...props}
>
<div className="relative flex flex-col z-1 bg-white h-full">
<div className="flex flex-col justify-between flex-1 min-h-64 px-6 py-7 gap-y-2">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ const ThematicHeroBlock: React.FC<ThematicHeroBlockProps> = ({
{...props}
>
<div className="col-start-1 row-start-1">
<Image src={image} alt="" width={1000} height={400} className="object-contain h-full w-full" />
{/* Pas de banniere dans le CMS : ne rien rendre plutot qu'une image
au `src` vide, que React signale et que le navigateur resout sur
l'URL de la page. Meme convention que `EditoCard`. */}
{image && <Image src={image} alt="" width={1000} height={400} preload className="object-contain h-full w-full" />}
</div>
<div className="col-start-1 row-start-1 flex items-center justify-center">
<TiltedTitle variant="big" className={clsx(titleClassName, "drop-shadow-3 drop-shadow-black")} colors={colorsClass[colors]}>{title}</TiltedTitle>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/ui/carousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ const CarouselPrevious = React.forwardRef<
{...props}
>
<span className="relative flex items-center justify-center bg-building h-12 w-12">
<Image src="/images/carousel-previous.svg" alt={t('previous')} width={14} height={14} />
<Image src="/images/carousel-previous.svg" alt={t('previous')} width={14} height={24} />
</span>
</Button>
)
Expand Down Expand Up @@ -246,7 +246,7 @@ const CarouselNext = React.forwardRef<
{...props}
>
<span className="relative flex items-center justify-center bg-building h-12 w-12">
<Image src="/images/carousel-next.svg" alt={t('next')} width={14} height={14} />
<Image src="/images/carousel-next.svg" alt={t('next')} width={14} height={24} />
</span>
</Button>
)
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/formatters/thematics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export function transformPartners(
return partners?.map(partner => ({
name: partner.name,
description: partner.description,
image: partner.logo,
image: partner.logo?.url,
link: partner.website_link,
})) ?? [];
}
Expand Down
Loading