Add donation component

This commit is contained in:
Brayd 2024-01-04 17:25:22 +01:00
parent 6f6a3196c3
commit a07f3e60ac
Signed by: brayd
SSH Key Fingerprint: SHA256:qfebJ1zYUipSSbdcVk/qygkt0xr4VSzCKk7LXw6DGe0
1 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,42 @@
---
import { Icon } from "astro-icon";
/**
Uses https://github.com/natemoo-re/astro-icon#readme
Find icons @ https://icones.js.org/
*/
const donateLinks: Array<{
name: string;
friendlyName: string;
link: string;
isWebmention?: boolean;
}> = [
{
name: "liberapay",
friendlyName: "Liberapay",
link: "https://liberapay.com/Braydofficial",
isWebmention: true,
},
];
---
<div class="flex flex-wrap items-end gap-x-4">
<p style="margin-top: 30px;">Unterstütze mich</p>
<ul class="flex flex-1 items-center gap-x-2 sm:flex-initial">
{
donateLinks.map(({ link, name, friendlyName, isWebmention }) => (
<li class="flex">
<a
class="inline-block p-1 sm:hover:text-link"
href={link}
target="_blank"
rel={`noopener noreferrer ${isWebmention ? "me authn" : ""}`}
>
<Icon class="h-6 w-6" name={name} aria-hidden="true" focusable="false" />
<span class="sr-only">{friendlyName}</span>
</a>
</li>
))
}
</ul>
</div>