Add image URL to project data and display image in Projects component

This commit is contained in:
aferrer committed 2025-10-31 22:52:52 +00:00
1 parent 4a4ce6e2f2
commit e266f96416
3 files changed
+5

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

+4
View File
@@ -13,6 +13,7 @@ interface ProjectProps {
title: string; title: string;
description: string; description: string;
tags: ProjectTag[]; tags: ProjectTag[];
imageUrl: string;
liveUrl?: string; liveUrl?: string;
repoUrl: string; repoUrl: string;
} }
@@ -25,6 +26,9 @@ interface ProjectProps {
{ {
projects.map((project: ProjectProps) => ( projects.map((project: ProjectProps) => (
<div class="section-card overflow-hidden md:flex"> <div class="section-card overflow-hidden md:flex">
{project.imageUrl && (
<img src={project.imageUrl} alt={project.title} class="hidden md:block md:w-48 object-cover" />
)}
<div class="p-8 flex-1"> <div class="p-8 flex-1">
<h4 class="text-xl font-bold text-white mb-2"> <h4 class="text-xl font-bold text-white mb-2">
{project.title} {project.title}
+1
View File
@@ -71,6 +71,7 @@ export const projects = [
{ name: "React", icon: "react" }, { name: "React", icon: "react" },
{ name: "Tailwind CSS", icon: "tailwind" }, { name: "Tailwind CSS", icon: "tailwind" },
], ],
imageUrl: "/hamitalia.webp",
liveUrl: "https://hamitalia.com", liveUrl: "https://hamitalia.com",
repoUrl: null, repoUrl: null,
}, },