From eec1ee1d898f4a6364c5554683b32c6f3d555eb6 Mon Sep 17 00:00:00 2001 From: Alam Guardin Date: Mon, 2 Sep 2024 21:52:01 -0500 Subject: refactor: add remixicons for more variety in icons --- package-lock.json | 15 +++++++++++---- package.json | 5 +++-- src/components/Link.astro | 26 +++++++------------------- src/data/user.json | 14 +++++++------- src/layouts/Layout.astro | 5 ----- 5 files changed, 28 insertions(+), 37 deletions(-) diff --git a/package-lock.json b/package-lock.json index c283be1..56c532d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,8 @@ "name": "astrolink", "version": "0.0.1", "dependencies": { - "astro": "^4.13.1" + "astro": "^4.13.1", + "remixicon": "^4.3.0" } }, "node_modules/@ampproject/remapping": { @@ -4076,9 +4077,9 @@ "license": "MIT" }, "node_modules/micromatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", - "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "license": "MIT", "dependencies": { "braces": "^3.0.3", @@ -4646,6 +4647,12 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/remixicon": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/remixicon/-/remixicon-4.3.0.tgz", + "integrity": "sha512-jRYQ37dTFSkJtvcxwTUAkIiXkYRvA9EDvVuXPNrmt2xf/VS//CRgFtsX2TAFBoQOhh9SDh7l6La4Xu12snEyxg==", + "license": "Apache-2.0" + }, "node_modules/restore-cursor": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz", diff --git a/package.json b/package.json index 2237374..894416c 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.13.1" + "astro": "^4.13.1", + "remixicon": "^4.3.0" } -} \ No newline at end of file +} diff --git a/src/components/Link.astro b/src/components/Link.astro index d5a9fa7..4ffb04b 100644 --- a/src/components/Link.astro +++ b/src/components/Link.astro @@ -1,14 +1,5 @@ --- -import { componentIsHTMLElement } from "astro/runtime/server/render/dom.js"; -import Dribbble from "./icons/Dribbble.astro"; -import Facebook from "./icons/Facebook.astro"; -import Instagram from "./icons/Instagram.astro"; -import Linkedin from "./icons/Linkedin.astro"; -import Shop from "./icons/Shop.astro"; -import Twitch from "./icons/Twitch.astro"; -import Url from "./icons/Url.astro"; -import XTwitter from "./icons/X-twitter.astro"; -import Youtube from "./icons/Youtube.astro"; +import 'remixicon/fonts/remixicon.css' interface Props { icon: string; @@ -22,15 +13,7 @@ const { icon, title, description, url } = Astro.props; - {icon === 'dribble' && } - {icon === 'facebook' && } - {icon === 'instagram' && } - {icon === 'linkedin' && } - {icon === 'shop' && } - {icon === 'twitch' && } - {icon === 'url' && } - {icon === 'xtwitter' && } - {icon === 'youtube' && } +