From a2830a0dd6f634147456406c7855881ff298078e Mon Sep 17 00:00:00 2001 From: Ariel Costas Guerrero Date: Thu, 5 Jun 2025 20:03:27 +0200 Subject: Refresh portfolio design and fonts --- src/components/PortfolioProject.astro | 84 ++++++++++++++++++++ src/components/TechnologyBadge.astro | 143 ++++++++++++++++++++++++++++++++++ 2 files changed, 227 insertions(+) create mode 100644 src/components/PortfolioProject.astro create mode 100644 src/components/TechnologyBadge.astro (limited to 'src/components') diff --git a/src/components/PortfolioProject.astro b/src/components/PortfolioProject.astro new file mode 100644 index 0000000..b3483e9 --- /dev/null +++ b/src/components/PortfolioProject.astro @@ -0,0 +1,84 @@ +--- +import { Icon } from "astro-icon/components"; +import TechnologyBadge from "./TechnologyBadge.astro"; + +interface Props { + title: string; + summary: string; + tags: string[]; + + detailsLink?: string; + githubLink?: string; + onlineLink?: string; +} + +const { title, summary, tags, detailsLink, githubLink, onlineLink } = + Astro.props; +--- + +
+

{title}

+ +

{summary}

+ +
+ {detailsLink && + + Detalles + } + + {githubLink && + + GitHub + } + + {onlineLink && + + En lĂ­nea + } +
+ +
+ {tags.map(tag => ( + + ))} +
+
+ + diff --git a/src/components/TechnologyBadge.astro b/src/components/TechnologyBadge.astro new file mode 100644 index 0000000..83d0d40 --- /dev/null +++ b/src/components/TechnologyBadge.astro @@ -0,0 +1,143 @@ +--- +import Icon from "node_modules/astro-icon/components/Icon.astro"; + +interface Technology { + name: string; + colour: string; + text?: "light" | "dark"; + icon?: string; +} + +export const technologies: { [key: string]: Technology } = { + java: { + name: "Java", + colour: "#e76f00", + icon: "coffee" + }, + dotnet: { + name: ".NET", + colour: "#512bd4", + icon: "brand-c-sharp", + }, + go: { + name: "Go", + colour: "#00add8", + icon: "brand-golang", + }, + mysql: { + name: "MySQL", + colour: "#3a75b0", + icon: "brand-mysql", + }, + php: { + name: "PHP", + colour: "#8892be", + icon: "brand-php", + }, + python: { + name: "Python", + colour: "#306998", + }, + typescript: { + name: "TypeScript", + colour: "#007acc", + icon: "brand-typescript", + }, + azure: { + name: "Azure", + colour: "#0089d6", + icon: "brand-azure", + }, + ubuntu: { + name: "Ubuntu", + colour: "#E95420", + icon: "brand-ubuntu", + }, + windows: { + name: "Windows", + colour: "#0078d6", + icon: "brand-windows", + }, + astro: { + name: "Astro", + colour: "#3d50f5", + icon: "brand-astro", + }, + wordpress: { + name: "WordPress", + colour: "#21759b", + icon: "brand-wordpress", + }, + github: { + name: "GitHub", + colour: "#181717", + text: "light", + icon: "brand-github", + }, + web: { + name: "Web", + colour: "#f7df1e", + text: "dark", + icon: "world", + }, +}; + +interface Props { + // tech must be name of the key of one of the technologies + code: string; + + size?: "small" | "large"; +} + +const { code, size } = Astro.props; +if (!(code in technologies)) { + throw new Error(`Technology code "${code}" is not defined in technologies.`); +} +const tech = technologies[code] as Technology; +--- + + + { + tech.icon && ( + + ) + } + {tech.name} + + + -- cgit v1.3