From 19b4f11fc9a46b6eeca6f879c8aa97bf3ee560ca Mon Sep 17 00:00:00 2001 From: ssbg04 Date: Sun, 18 Oct 2026 10:48:32 +0800 Subject: [PATCH] refactor(links,tech-stack): pure fontawesome svg icons and streamline links directory --- src/components/TechIcon.tsx | 168 ++++++++++++------------------------ src/pages/links.astro | 59 +------------ 2 files changed, 56 insertions(+), 171 deletions(-) diff --git a/src/components/TechIcon.tsx b/src/components/TechIcon.tsx index 910ab7d..d61b231 100644 --- a/src/components/TechIcon.tsx +++ b/src/components/TechIcon.tsx @@ -6,6 +6,7 @@ import { faPhp, faPython, faJs, + faSquareJs, faHtml5, faCss3Alt, faTailwindCss, @@ -23,7 +24,8 @@ import { faRust, faGolang, faFigma, - faWordpress + faWordpress, + faGoogle } from '@fortawesome/free-brands-svg-icons'; import { faDatabase, @@ -34,7 +36,9 @@ import { faCode, faCloud, faServer, - faNetworkWired + faNetworkWired, + faRocket, + faCubes } from '@fortawesome/free-solid-svg-icons'; interface TechIconProps { @@ -47,44 +51,33 @@ export default function TechIcon({ name, icon, className = 'w-5 h-5' }: TechIcon // Combine both name and Sanity icon string (e.g. "React" + "fa-brands fa-react") const n = `${name} ${icon || ''}`.toLowerCase().trim(); - // 1. Tailwind CSS (Official FontAwesome v7 brand icon) + // 1. Tailwind CSS if (n.includes('tailwind')) { return ; } - // 2. TypeScript (Specific check before JavaScript) + // 2. TypeScript & JavaScript if (n.includes('typescript') || n === 'ts') { - return ( - - - - ); + return ; + } + if (n.includes('js') || n.includes('javascript')) { + return ; } - // 3. React Native (Specific check before React) + // 3. React Native & React if (n.includes('react native')) { - return ( - - - - - - - - ); + return ; } - - // 4. React (FontAwesome brand icon) if (n.includes('react')) { return ; } - // 5. Node.js (FontAwesome brand icon) + // 4. Node.js if (n.includes('node')) { return ; } - // 6. PHP & Laravel (FontAwesome brand icons) + // 5. PHP & Laravel if (n.includes('laravel')) { return ; } @@ -92,17 +85,17 @@ export default function TechIcon({ name, icon, className = 'w-5 h-5' }: TechIcon return ; } - // 7. Python (FontAwesome brand icon) + // 6. Python if (n.includes('python')) { return ; } - // 8. Docker (FontAwesome brand icon) + // 7. Docker if (n.includes('docker')) { return ; } - // 9. Git / GitHub (FontAwesome brand icons) + // 8. Git & GitHub if (n.includes('github')) { return ; } @@ -110,17 +103,17 @@ export default function TechIcon({ name, icon, className = 'w-5 h-5' }: TechIcon return ; } - // 10. Linux (FontAwesome brand icon) + // 9. Linux if (n.includes('linux')) { return ; } - // 11. Java (FontAwesome brand icon) + // 10. Java if (n.includes('java')) { return ; } - // 12. Rust & Go (FontAwesome brand icons) + // 11. Rust & Go if (n.includes('rust')) { return ; } @@ -128,7 +121,7 @@ export default function TechIcon({ name, icon, className = 'w-5 h-5' }: TechIcon return ; } - // 13. Figma & WordPress (FontAwesome brand icons) + // 12. Figma & WordPress if (n.includes('figma')) { return ; } @@ -136,7 +129,7 @@ export default function TechIcon({ name, icon, className = 'w-5 h-5' }: TechIcon return ; } - // 14. Vue & Angular (FontAwesome brand icons) + // 13. Vue & Angular if (n.includes('vue')) { return ; } @@ -144,7 +137,15 @@ export default function TechIcon({ name, icon, className = 'w-5 h-5' }: TechIcon return ; } - // 15. Bootstrap & Sass (FontAwesome brand icons) + // 14. HTML5 & CSS3 + if (n.includes('html')) { + return ; + } + if (n.includes('css')) { + return ; + } + + // 15. Bootstrap & Sass if (n.includes('bootstrap')) { return ; } @@ -152,52 +153,49 @@ export default function TechIcon({ name, icon, className = 'w-5 h-5' }: TechIcon return ; } - // 16. AWS (FontAwesome brand icon) + // 16. Cloud Providers & DevOps Platforms if (n.includes('aws')) { return ; } - - // 17. HTML / HTML5 (FontAwesome brand icon) - if (n.includes('html')) { - return ; + if (n.includes('google cloud') || n.includes('gcp') || n.includes('google')) { + return ; + } + if (n.includes('vercel')) { + return ; + } + if (n.includes('netlify')) { + return ; + } + if (n.includes('render')) { + return ; } - // 18. CSS / CSS3 (FontAwesome brand icon) - if (n.includes('css')) { - return ; + // 17. Database (MySQL, PostgreSQL, SQLite, Mongo, SQL) + if (n.includes('sql') || n.includes('database') || n.includes('postgres') || n.includes('sqlite') || n.includes('mongo')) { + return ; } - // 19. JavaScript (FontAwesome brand icon) - if (n.includes('js') || n.includes('javascript')) { - return ; - } - - // 20. Flutter / Mobile (FontAwesome solid icon) + // 18. Flutter & Mobile if (n.includes('flutter') || n.includes('mobile')) { return ; } - // 21. Database / MySQL / SQL (FontAwesome solid icon) - if (n.includes('mysql') || n.includes('sql') || n.includes('database') || n.includes('mongo')) { - return ; - } - - // 22. Security / Cyber / Shield (FontAwesome solid icon) + // 19. Cybersecurity & Shield if (n.includes('secur') || n.includes('cyber') || n.includes('shield')) { return ; } - // 23. Terminal / CLI / Bash (FontAwesome solid icon) + // 20. Terminal / CLI / Bash if (n.includes('terminal') || n.includes('bash') || n.includes('cli')) { return ; } - // 24. AI / ML / Bot (FontAwesome solid icon) + // 21. AI & Bots if (n.includes('ai') || n.includes('ml') || n.includes('bot')) { return ; } - // 25. Server & Networking (FontAwesome solid icons) + // 22. Server & Networking if (n.includes('server')) { return ; } @@ -205,67 +203,11 @@ export default function TechIcon({ name, icon, className = 'w-5 h-5' }: TechIcon return ; } - // 26. Vercel (Official brand vector) - if (n.includes('vercel')) { - return ( - - - - ); - } - - // 27. Netlify (Official brand vector) - if (n.includes('netlify')) { - return ( - - - - ); - } - - // 28. Render (Official brand vector) - if (n.includes('render')) { - return ( - - - - ); - } - - // 29. Google Cloud / GCP (Official brand vector) - if (n.includes('google cloud') || n.includes('gcp') || n.includes('google cloud console')) { - return ( - - - - ); - } - - // 30. PostgreSQL / Postgres (Official brand vector) - if (n.includes('postgres') || n.includes('postgresql')) { - return ( - - - - ); - } - - // 31. SQLite (Official brand vector) - if (n.includes('sqlite')) { - return ( - - - - - - ); - } - - // 32. Generic Cloud (FontAwesome solid icon) + // 23. Generic Cloud if (n.includes('cloud')) { return ; } - // Default: Code (FontAwesome solid icon) + // Default: Code return ; } diff --git a/src/pages/links.astro b/src/pages/links.astro index 7250d3a..e0c9497 100644 --- a/src/pages/links.astro +++ b/src/pages/links.astro @@ -16,10 +16,6 @@ const links = allLinks.length > 0 { platform: 'Facebook', url: 'https://facebook.com', icon: 'facebook', order: 5 }, ]; -const resumeUrl = settings.resumeFile && settings.resumeFile !== '#' ? settings.resumeFile : '/CV-Cris-Charles-Garcia.pdf'; -const downloadUrl = resumeUrl.includes('cdn.sanity.io') - ? `${resumeUrl}${resumeUrl.includes('?') ? '&' : '?'}dl=CV-Cris-Charles-Garcia.pdf` - : resumeUrl; const profileAvatar = settings.heroImage || settings.logoImage || '/logo.png'; const formatDisplayUrl = (url: string) => { @@ -98,7 +94,7 @@ const getIconSvg = (platform: string) => { {settings.isAvailable !== false && ( - + @@ -134,33 +130,6 @@ const getIconSvg = (platform: string) => {

{settings.valueProposition || 'Direct links to my official profiles, repositories, and credentials.'}

- - {/* Quick CV Actions */} - {/* Right Column: Social Links List */} @@ -190,32 +159,6 @@ const getIconSvg = (platform: string) => { ))} - {/* Main Portfolio Destination Card */} - -
-
- - - -
-
- - Main Portfolio - - - Explore full case studies & skills - -
-
- - - → - -
- {/* Minimal Footer Stamp */}

© {new Date().getFullYear()} {settings.fullName} • Official Directory