diff options
| author | Dawid Rycerz <dawid@rycerz.xyz> | 2025-07-03 10:56:21 +0300 |
|---|---|---|
| committer | Dawid Rycerz <dawid@rycerz.xyz> | 2025-07-03 10:56:21 +0300 |
| commit | 456cf011b36de91c9936994b1fa45703adcd309b (patch) | |
| tree | 8e60daf998f731ac50d100fa490eaecae1168042 /src/components/SocialList.astro | |
Initial fork of chrismwilliams/astro-theme-cactus theme
Diffstat (limited to 'src/components/SocialList.astro')
| -rw-r--r-- | src/components/SocialList.astro | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/components/SocialList.astro b/src/components/SocialList.astro new file mode 100644 index 0000000..00e7f97 --- /dev/null +++ b/src/components/SocialList.astro @@ -0,0 +1,42 @@ +--- +import { Icon } from "astro-icon/components"; + +/** + Uses https://www.astroicon.dev/getting-started/ + Find icons via guide: https://www.astroicon.dev/guides/customization/#open-source-icon-sets + Only installed pack is: @iconify-json/mdi +*/ +const socialLinks: { + friendlyName: string; + isWebmention?: boolean; + link: string; + name: string; +}[] = [ + { + friendlyName: "Github", + link: "https://github.com/chrismwilliams/astro-cactus", + name: "mdi:github", + }, +]; +--- + +<div class="flex flex-wrap items-end gap-x-2"> + <p>Find me on</p> + <ul class="flex flex-1 items-center gap-x-2 sm:flex-initial"> + { + socialLinks.map(({ friendlyName, isWebmention, link, name }) => ( + <li class="flex"> + <a + class="hover:text-link inline-block" + href={link} + rel={`noreferrer ${isWebmention ? "me authn" : ""}`} + target="_blank" + > + <Icon aria-hidden="true" class="h-8 w-8" focusable="false" name={name} /> + <span class="sr-only">{friendlyName}</span> + </a> + </li> + )) + } + </ul> +</div> |
