src/components/page/SocialList.astro 675 B raw
1
---
2
import { getSocial } from "@/data/constants";
3
4
const items = ["email", "rss", "github", "atproto"].map(
5
	(key) => getSocial(key)!,
6
);
7
---
8
9
<div class="flex flex-wrap items-center gap-x-4 sm:items-center">
10
	<p class="pb-2">Find me on</p>
11
	<ul class="flex flex-1 items-center gap-x-4 sm:flex-initial">
12
		{
13
			items.map((link) => (
14
				<li>
15
					<a
16
						class="inline-block p-2 sm:hover:text-link"
17
						href={link.href}
18
						target={link.external ? "_blank" : undefined}
19
						rel={link.external ? "noopener noreferrer" : undefined}
20
					>
21
						<Fragment set:html={link.icon} />
22
						<span class="sr-only">{link.name}</span>
23
					</a>
24
				</li>
25
			))
26
		}
27
	</ul>
28
</div>