From 789ab25c7238e7e6fd5fa8ad0cb87939ac4e9069 Mon Sep 17 00:00:00 2001 From: Asis Ferrer Date: Fri, 31 Oct 2025 16:25:18 +0000 Subject: [PATCH] Refactor Projects component to use structured tags with icons and add link icon SVG --- src/components/Projects.astro | 34 ++++++++++++++++++++++------------ src/data/index.ts | 6 +++++- src/icons/link.svg | 6 ++++++ 3 files changed, 33 insertions(+), 13 deletions(-) create mode 100644 src/icons/link.svg diff --git a/src/components/Projects.astro b/src/components/Projects.astro index b499b1c..f255c15 100644 --- a/src/components/Projects.astro +++ b/src/components/Projects.astro @@ -1,12 +1,18 @@ --- +import { Icon } from "astro-icon/components"; import Section from "./ui/Section.astro"; const { projects } = Astro.props; -interface project { +interface ProjectTag { + name: string; + icon?: string; +} + +interface ProjectProps { title: string; description: string; - tags: string[]; + tags: ProjectTag[]; liveUrl?: string; repoUrl: string; } @@ -17,7 +23,7 @@ interface project {
{ - projects.map((project: project) => ( + projects.map((project: ProjectProps) => (

@@ -25,13 +31,15 @@ interface project {

{project.description}

- {project.tags.map((tag) => ( - - {tag} + {project.tags.map((tag: ProjectTag) => ( + + ))} -
-
{project.liveUrl && ( - - URL Live )} +
+