Skip to content

Commit 08b0137

Browse files
committed
Add email in social icons components
1 parent e2e0479 commit 08b0137

File tree

5 files changed

+53
-9
lines changed

5 files changed

+53
-9
lines changed

package-lock.json

Lines changed: 33 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
},
2525
"devDependencies": {
2626
"@iconify-json/fa6-brands": "^1.2.6",
27+
"@iconify-json/fa6-solid": "^1.2.4",
2728
"@types/basiclightbox": "^5.0.4"
2829
}
29-
}
30+
}

src/components/SocialData.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
const socialData: Array<{ link: string; icon: string, title: string }> = [
1+
const socialData: Array<{ link: string; icon: string, title: string, self_link?: boolean }> = [
2+
{
3+
title: "Email",
4+
link: "mailto:me@jesus.engineer",
5+
icon: "fa6-solid:envelope",
6+
self_link: true
7+
8+
},
29
{
310
title: "GitHub",
411
link: "http://github.com/jpcano",

src/components/SocialFooter.astro

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ import { Icon } from "astro-icon/components";
88
{
99
socialData.map((social) => (
1010
<li>
11-
<a href={social.link} target="”_blank”" aria-label={social.title}>
11+
<a
12+
href={social.link}
13+
target={social.self_link ? "_self" : "_blank"}
14+
aria-label={social.title}
15+
>
1216
<i aria-hidden="true">
1317
<Icon name={social.icon} title={social.title} />
1418
</i>

src/components/SocialTitle.astro

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ import { Icon } from "astro-icon/components";
77
<div>
88
{
99
socialData.map((social) => (
10-
<a href={social.link} target="”_blank”" aria-label={social.title}>
10+
<a
11+
href={social.link}
12+
target={social.self_link ? "_self" : "_blank"}
13+
aria-label={social.title}
14+
>
1115
<i aria-hidden="true">
1216
<Icon name={social.icon} title={social.title} />
1317
</i>

0 commit comments

Comments
 (0)