Skip to content

Commit 86f5eab

Browse files
committed
Refactor social platform imports and create a new socialPlatforms library
1 parent a3cdf39 commit 86f5eab

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/components/Footer.astro

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
import Social from "./Social.astro";
33
import License from "./License.astro";
4-
import { SocialPlatform } from "../data/socialPlatforms";
4+
import { SocialPlatform } from "../lib/socialPlatforms";
55
import { Icon } from "astro-icon/components";
66
---
77

src/components/Social.astro

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
import { Icon } from "astro-icon/components";
3-
import type { SocialPlatform } from "../data/socialPlatforms";
3+
import type { SocialPlatform } from "../lib/socialPlatforms";
44
55
interface Props {
66
platform: SocialPlatform;
@@ -13,7 +13,7 @@ const socialPlatforms = {
1313
bluesky: {
1414
url: `https://bsky.app/profile/${username}`,
1515
title: "Bluesky",
16-
icon: "mdi:bird",
16+
icon: "logos:bluesky",
1717
color:
1818
"bg-sky-100 dark:bg-sky-900/40 text-sky-800 dark:text-sky-300 hover:bg-sky-200 dark:hover:bg-sky-800/60 hover:text-sky-900 dark:hover:text-sky-200",
1919
},
@@ -27,21 +27,21 @@ const socialPlatforms = {
2727
github: {
2828
url: `https://github.com/${username}`,
2929
title: "GitHub",
30-
icon: "mdi:github",
30+
icon: "logos:github-icon",
3131
color:
3232
"bg-gray-100 dark:bg-gray-800/40 text-gray-800 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-700/60 hover:text-gray-900 dark:hover:text-gray-200",
3333
},
3434
linkedin: {
3535
url: `https://linkedin.com/in/${username}`,
3636
title: "LinkedIn",
37-
icon: "mdi:linkedin",
37+
icon: "logos:linkedin-icon",
3838
color:
3939
"bg-blue-100 dark:bg-blue-900/40 text-blue-800 dark:text-blue-300 hover:bg-blue-200 dark:hover:bg-blue-800/60 hover:text-blue-900 dark:hover:text-blue-200",
4040
},
4141
youtube: {
4242
url: `https://youtube.com/@${username}`,
4343
title: "YouTube",
44-
icon: "mdi:youtube",
44+
icon: "logos:youtube-icon",
4545
color:
4646
"bg-red-100 dark:bg-red-900/40 text-red-800 dark:text-red-300 hover:bg-red-200 dark:hover:bg-red-800/60 hover:text-red-900 dark:hover:text-red-200",
4747
},
File renamed without changes.

0 commit comments

Comments
 (0)