diff --git a/app/[locale]/page.tsx b/app/[locale]/page.tsx index 83debc5..e8ead70 100644 --- a/app/[locale]/page.tsx +++ b/app/[locale]/page.tsx @@ -5,13 +5,13 @@ import TimelineSection from "@/components/sections/AboutSection"; import { getAllProjects } from "@/lib/projects/get-projects"; -type Props = { +type props = { params: Promise<{ locale: string; }>; }; -export default async function Home({ params }: Props) { +export default async function Home({ params }: props) { const { locale } = await params; const projects = getAllProjects(); diff --git a/app/[locale]/works/[slug]/page.tsx b/app/[locale]/works/[slug]/page.tsx index 8020fd8..eceb269 100644 --- a/app/[locale]/works/[slug]/page.tsx +++ b/app/[locale]/works/[slug]/page.tsx @@ -1,13 +1,13 @@ import { notFound } from "next/navigation"; import { MDXRemote } from "next-mdx-remote/rsc"; import { getAllProjects, getProjectBySlug, getProjectSlugs } from "@/lib/projects/get-projects"; -import { mdxComponents } from "@/components/mdx/mdx-components"; +import { mdxComponents } from "@/components/mdx/mdxComponents"; import { ProjectHero } from "@/components/sections/ProjectHero"; import { ProjectMeta } from "@/components/sections/ProjectMeta"; import { ProjectTechnologies } from "@/components/sections/ProjectTechnologies"; import { OtherProjects } from "@/components/sections/OtherProjects"; -type Props = { +type props = { params: Promise<{ locale: string; slug: string; @@ -21,7 +21,7 @@ export function generateStaticParams() { ]); } -export default async function ProjectPage({ params }: Props) { +export default async function ProjectPage({ params }: props) { const { locale, slug } = await params; const project = getProjectBySlug(slug); @@ -39,17 +39,17 @@ export default async function ProjectPage({ params }: Props) { })); return ( -
-
+
+
-
+
diff --git a/components/mdx/mdx-components.tsx b/components/mdx/mdxComponents.tsx similarity index 75% rename from components/mdx/mdx-components.tsx rename to components/mdx/mdxComponents.tsx index bbc407c..5ae1185 100644 --- a/components/mdx/mdx-components.tsx +++ b/components/mdx/mdxComponents.tsx @@ -3,7 +3,7 @@ import { ProjectPreviewGrid } from "@/components/mdx/ProjectPreviewGrid"; import { ProjectVisitButton } from "@/components/mdx/ProjectVisitButton"; export const mdxComponents = { - ProjectsColumns: ProjectsColumns, - ProjectPreviewGrid, - ProjectVisitButton, + ProjectsColumns: ProjectsColumns, + ProjectPreviewGrid, + ProjectVisitButton, }; \ No newline at end of file diff --git a/components/sections/OtherProjects.tsx b/components/sections/OtherProjects.tsx index d1d77c6..e0809d0 100644 --- a/components/sections/OtherProjects.tsx +++ b/components/sections/OtherProjects.tsx @@ -1,6 +1,6 @@ import Link from "next/link"; -type Props = { +type props = { locale: string; projects: { slug: string; @@ -9,7 +9,7 @@ type Props = { }[]; }; -export function OtherProjects({ locale, projects }: Props) { +export function OtherProjects({ locale, projects }: props) { if (!projects.length) return null; return ( diff --git a/components/sections/ProjectHero.tsx b/components/sections/ProjectHero.tsx index 141f3f7..6b64da9 100644 --- a/components/sections/ProjectHero.tsx +++ b/components/sections/ProjectHero.tsx @@ -1,32 +1,36 @@ import Link from "next/link"; -type Props = { +import { GoArrowLeft } from "react-icons/go"; + +type props = { title: string; - subtitle: string; - year: number; + description: string; + dateLabel: string; locale: string; }; -export function ProjectHero({ title, subtitle, year, locale }: Props) { +export function ProjectHero({ title, description, dateLabel, locale }: props) { return ( -
- - ← Retour aux projets - +
+
+ + Retour aux projets + -
-

{title}

-

{subtitle}

+
+

{title}

+

{description}

-
- - {year} - +
+ + {dateLabel} + +
-
-
+
+
); } \ No newline at end of file diff --git a/components/sections/ProjectMeta.tsx b/components/sections/ProjectMeta.tsx index e251188..4f616de 100644 --- a/components/sections/ProjectMeta.tsx +++ b/components/sections/ProjectMeta.tsx @@ -1,5 +1,5 @@ -type Props = { - year: number; +type props = { + dateLabel: string; category: string; roles: string[]; client: string; @@ -20,10 +20,10 @@ function Item({ ); } -export function ProjectMeta({ year, category, roles, client }: Props) { +export function ProjectMeta({ dateLabel, category, roles, client }: props) { return (
- {year} + {dateLabel} {category}
diff --git a/components/sections/ProjectTechnologies.tsx b/components/sections/ProjectTechnologies.tsx index 88728ae..ba0526b 100644 --- a/components/sections/ProjectTechnologies.tsx +++ b/components/sections/ProjectTechnologies.tsx @@ -1,8 +1,8 @@ -type Props = { +type props = { technologies: string[]; }; -export function ProjectTechnologies({ technologies }: Props) { +export function ProjectTechnologies({ technologies }: props) { return (

Technologies

@@ -11,7 +11,7 @@ export function ProjectTechnologies({ technologies }: Props) { {technologies.map((tech) => ( {tech} diff --git a/components/sections/WorksSection.tsx b/components/sections/WorksSection.tsx index 8c31226..a4ff01c 100644 --- a/components/sections/WorksSection.tsx +++ b/components/sections/WorksSection.tsx @@ -1,12 +1,12 @@ import { Project } from "@/lib/projects/types"; import { ProjectCard } from "../ui/ProjectCard"; -type Props = { +type props = { projects: Project[]; locale: string; }; -export default function WorksSection({ projects, locale }: Props) { +export default function WorksSection({ projects, locale }: props) { return (

Travaux

diff --git a/components/ui/ProjectCard.tsx b/components/ui/ProjectCard.tsx index 12e38a0..a4ce3d3 100644 --- a/components/ui/ProjectCard.tsx +++ b/components/ui/ProjectCard.tsx @@ -2,30 +2,29 @@ import Link from "next/link"; import { GoArrowRight } from "react-icons/go"; import { Project } from "@/lib/projects/types"; -type Props = { +type props = { project: Project; locale: string; isTheLast?: boolean; }; -export const ProjectCard = ({ - project, - locale, - isTheLast = false, -}: Props) => { +export const ProjectCard = ({ project, locale, isTheLast = false }: props) => { + return (
+ + {/* Date label */}
- {project.dateLabel ?? project.year} + {project.dateLabel}
+ {/* Left image */}
{project.preview1 ? ( - // eslint-disable-next-line @next/next/no-img-element {project.title} + {/* Right content */}
{project.category}
@@ -47,7 +47,7 @@ export const ProjectCard = ({
-
{project.description ?? project.subtitle}
+
{project.description}

READ

diff --git a/content/projects/EverEastSolutions.mdx b/content/projects/EverEastSolutions.mdx index 9d9487b..ac8253d 100644 --- a/content/projects/EverEastSolutions.mdx +++ b/content/projects/EverEastSolutions.mdx @@ -1,7 +1,6 @@ --- title: "EverEast Solutions" -subtitle: "Maître d'oeuvre du web" -year: 2026 +priority: 1 dateLabel: "2026 - auj." category: "Application web" client: "EverEast Solutions" diff --git a/lib/projects/get-projects.ts b/lib/projects/get-projects.ts index 08d8685..dd80a93 100644 --- a/lib/projects/get-projects.ts +++ b/lib/projects/get-projects.ts @@ -38,5 +38,5 @@ export function getAllProjects(): Project[] { return getProjectSlugs() .map((slug) => getProjectBySlug(slug)) .filter((project): project is Project => project !== null) - .sort((a, b) => b.year - a.year); + .sort((a, b) => b.priority - a.priority); } diff --git a/lib/projects/types.ts b/lib/projects/types.ts index 04f3d1e..6e06cd6 100644 --- a/lib/projects/types.ts +++ b/lib/projects/types.ts @@ -1,7 +1,6 @@ export type ProjectFrontmatter = { title: string; - subtitle: string; - year: number; + priority: number; category: string; client: string; roles: string[];