Skip to content

Commit 7f3a161

Browse files
refactor: replace Lucide icons with SVGs in social media component for improved performance and accessibility
1 parent 5fb557c commit 7f3a161

1 file changed

Lines changed: 21 additions & 9 deletions

File tree

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
<script lang="ts">
2-
import { Bird, Briefcase, GitBranch } from "@lucide/svelte";
2+
const iconClass = "h-[1.35rem] w-[1.35rem]";
33
</script>
44

55
<ul class="mx-auto flex gap-2 md:mx-0" itemprop="sameAs">
66
<li>
77
<a
8-
title="Github"
8+
title="GitHub"
99
target="_blank"
1010
rel="noreferrer"
1111
href="https://github.com/Michael-Liendo"
12-
aria-label="Github"
12+
aria-label="GitHub"
1313
class="flex h-11 w-11 items-center justify-center rounded-xl border border-border bg-surface-elevated text-ink shadow-sm transition hover:border-accent/40 hover:bg-accent-muted/80 hover:text-ink hover:shadow-soft"
1414
>
15-
<GitBranch class="h-[1.35rem] w-[1.35rem]" />
15+
<svg class={iconClass} viewBox="0 0 24 24" aria-hidden="true" fill="currentColor">
16+
<path
17+
d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"
18+
/>
19+
</svg>
1620
</a>
1721
</li>
1822
<li>
@@ -24,19 +28,27 @@ import { Bird, Briefcase, GitBranch } from "@lucide/svelte";
2428
aria-label="LinkedIn"
2529
class="flex h-11 w-11 items-center justify-center rounded-xl border border-border bg-surface-elevated text-[#0A66C2] shadow-sm transition hover:border-[#0A66C2]/35 hover:bg-[#0A66C2]/10 hover:shadow-soft"
2630
>
27-
<Briefcase class="h-[1.35rem] w-[1.35rem]" />
31+
<svg class={iconClass} viewBox="0 0 24 24" aria-hidden="true" fill="currentColor">
32+
<path
33+
d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"
34+
/>
35+
</svg>
2836
</a>
2937
</li>
3038
<li>
3139
<a
32-
title="Twitter"
40+
title="X"
3341
target="_blank"
3442
rel="noreferrer"
3543
href="https://twitter.com/mykeliendo"
36-
aria-label="Twitter"
37-
class="flex h-11 w-11 items-center justify-center rounded-xl border border-border bg-surface-elevated text-[#1DA1F2] shadow-sm transition hover:border-[#1DA1F2]/35 hover:bg-[#1DA1F2]/10 hover:shadow-soft"
44+
aria-label="X (Twitter)"
45+
class="flex h-11 w-11 items-center justify-center rounded-xl border border-border bg-surface-elevated text-ink shadow-sm transition hover:border-accent/40 hover:bg-accent-muted/80 hover:shadow-soft"
3846
>
39-
<Bird class="h-[1.35rem] w-[1.35rem]" />
47+
<svg class={iconClass} viewBox="0 0 24 24" aria-hidden="true" fill="currentColor">
48+
<path
49+
d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"
50+
/>
51+
</svg>
4052
</a>
4153
</li>
4254
</ul>

0 commit comments

Comments
 (0)