adding freelance section in home page and freelance page route
This commit is contained in:
@@ -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 (
|
||||||
|
<div ref={sectionRef} className="w-full flex justify-center items-center">
|
||||||
|
<div
|
||||||
|
className="w-2/3 reveal flex flex-col items-start gap-6 p-8 rounded-2xl border border-brand-brown/8 bg-white/40 transition-all duration-300 cursor-default"
|
||||||
|
style={{ transitionDelay: `120ms` }}
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
<h3 className="font-serif text-brand-brown text-left leading-[1.1] text-[clamp(1.4rem,2.2vw,1.65rem)] mb-4">
|
||||||
|
{t("title")}
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<p className="font-sans text-sm text-left text-brand-brown/60 leading-relaxed">
|
||||||
|
{t("text")}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="w-full flex flex-row justify-end">
|
||||||
|
<Link href={`/${locale}/freelance`} className="group flex items-center gap-2 font-sans text-xs uppercase tracking-[0.18em] text-brand-brown border-b border-brand-brown/30 pb-0.5 hover:border-brand-brown transition-colors duration-200">
|
||||||
|
{t("cta")}
|
||||||
|
<svg
|
||||||
|
className="w-3.5 h-3.5 group-hover:translate-x-1.5 transition-transform duration-200"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
aria-hidden="true"
|
||||||
|
>
|
||||||
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={1.5} d="M17 8l4 4m0 0l-4 4m4-4H3" />
|
||||||
|
</svg>
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
export default function FreelancePage() {
|
||||||
|
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@ import HeroSection from "@/app/[locale]/_components/HeroSection";
|
|||||||
import WorksSection from "@/app/[locale]/_components/WorksSection";
|
import WorksSection from "@/app/[locale]/_components/WorksSection";
|
||||||
import ApproachSection from "@/app/[locale]/_components/AppoachSection";
|
import ApproachSection from "@/app/[locale]/_components/AppoachSection";
|
||||||
import TimelineSection from "@/app/[locale]/_components/AboutSection";
|
import TimelineSection from "@/app/[locale]/_components/AboutSection";
|
||||||
|
import FreelanceSection from "@/app/[locale]/_components/FreelanceSection";
|
||||||
|
|
||||||
import { getAllProjects } from "@/lib/projects/get-projects";
|
import { getAllProjects } from "@/lib/projects/get-projects";
|
||||||
|
|
||||||
@@ -20,6 +21,7 @@ export default async function Home({ params }: props) {
|
|||||||
<HeroSection />
|
<HeroSection />
|
||||||
<div className="px-8 md:px-14 lg:px-20">
|
<div className="px-8 md:px-14 lg:px-20">
|
||||||
<WorksSection projects={projects} locale={locale} />
|
<WorksSection projects={projects} locale={locale} />
|
||||||
|
<FreelanceSection locale={locale} />
|
||||||
<ApproachSection />
|
<ApproachSection />
|
||||||
<TimelineSection />
|
<TimelineSection />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -19,6 +19,11 @@
|
|||||||
"projectCard": {
|
"projectCard": {
|
||||||
"cta": "Read more"
|
"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": {
|
"approach": {
|
||||||
"sectionLabel": "Approach",
|
"sectionLabel": "Approach",
|
||||||
"feature1": {
|
"feature1": {
|
||||||
|
|||||||
@@ -19,6 +19,11 @@
|
|||||||
"projectCard": {
|
"projectCard": {
|
||||||
"cta": "Lire plus"
|
"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": {
|
"approach": {
|
||||||
"sectionLabel": "Approche",
|
"sectionLabel": "Approche",
|
||||||
"feature1": {
|
"feature1": {
|
||||||
|
|||||||
Reference in New Issue
Block a user