diff --git a/app/[locale]/_components/FreelanceSection.tsx b/app/[locale]/_components/FreelanceSection.tsx new file mode 100644 index 0000000..f2e1dde --- /dev/null +++ b/app/[locale]/_components/FreelanceSection.tsx @@ -0,0 +1,70 @@ +'use client'; + +import { useEffect, useRef } from "react"; +import Link from "next/link"; +import { useTranslations } from "next-intl"; + +type props = { + locale: string; +}; + +export default function FreelanceSection({ locale }: props) { + const t = useTranslations('homePageFreelanceSection'); + const sectionRef = useRef(null); + + useEffect(() => { + const section = sectionRef.current; + if (!section) return; + + const observer = new IntersectionObserver( + (entries) => { + entries.forEach((entry) => { + if (entry.isIntersecting) { + entry.target.querySelectorAll('.reveal').forEach((el, i) => { + setTimeout(() => el.classList.add('visible'), i * 120); + }); + observer.unobserve(entry.target); + } + }); + }, + { threshold: 0.1 } + ); + + observer.observe(section); + return () => observer.disconnect(); + }, []); + + return ( +
+
+
+

+ {t("title")} +

+ +

+ {t("text")} +

+
+ +
+ + {t("cta")} + + +
+
+
+ ); +} \ No newline at end of file diff --git a/app/[locale]/freelance/page.tsx b/app/[locale]/freelance/page.tsx new file mode 100644 index 0000000..fe78a9d --- /dev/null +++ b/app/[locale]/freelance/page.tsx @@ -0,0 +1,11 @@ +'use client'; + +export default function FreelancePage() { + + + return ( +
+ +
+ ); +} \ No newline at end of file diff --git a/app/[locale]/page.tsx b/app/[locale]/page.tsx index f385e68..2f623b4 100644 --- a/app/[locale]/page.tsx +++ b/app/[locale]/page.tsx @@ -2,6 +2,7 @@ import HeroSection from "@/app/[locale]/_components/HeroSection"; import WorksSection from "@/app/[locale]/_components/WorksSection"; import ApproachSection from "@/app/[locale]/_components/AppoachSection"; import TimelineSection from "@/app/[locale]/_components/AboutSection"; +import FreelanceSection from "@/app/[locale]/_components/FreelanceSection"; import { getAllProjects } from "@/lib/projects/get-projects"; @@ -20,6 +21,7 @@ export default async function Home({ params }: props) {
+
diff --git a/messages/en.json b/messages/en.json index 6a7f64c..44de445 100644 --- a/messages/en.json +++ b/messages/en.json @@ -19,6 +19,11 @@ "projectCard": { "cta": "Read more" }, + "homePageFreelanceSection": { + "title": "You have a project you want to bring to life?", + "text": "I design custom web applications, business software, and professional websites that are user-friendly, reliable, and scalable.", + "cta": "Learn more about my freelance services" + }, "approach": { "sectionLabel": "Approach", "feature1": { diff --git a/messages/fr.json b/messages/fr.json index 052b04c..15e2ef1 100644 --- a/messages/fr.json +++ b/messages/fr.json @@ -19,6 +19,11 @@ "projectCard": { "cta": "Lire plus" }, + "homePageFreelanceSection": { + "title": "Vous avez un projet à concrétiser ?", + "text": "Je concoit des applications web, logiciels métier et sites profressionnels sûr mesure, pensés pour être ergonomique, fiable et évolutif.", + "cta": "Découvrir mon offre freelance" + }, "approach": { "sectionLabel": "Approche", "feature1": {