feat: use animated emojis from fluent

This commit is contained in:
2023-08-09 15:20:14 +02:00
parent 95525406d1
commit 5e64edef7f
23 changed files with 53 additions and 17 deletions

View File

@@ -2,16 +2,28 @@ import { isYoutubeLink } from "@lib/string.ts";
import { IconBrandYoutube } from "@components/icons.tsx";
export function Card(
{ link, title, image }: { link?: string; title?: string; image?: string },
{ link, title, image, backgroundSize = 100 }: {
backgroundSize?: number;
link?: string;
title?: string;
image?: string;
},
) {
const backgroundStyle = {
backgroundImage: `url(${image})`,
backgroundSize: "cover",
};
if (backgroundSize !== 100) {
backgroundStyle["backgroundSize"] = `${backgroundSize}%`;
backgroundStyle["backgroundRepeat"] = "no-repeat";
backgroundStyle["backgroundPosition"] = "center";
}
return (
<a
href={link}
style={{
backgroundImage: `url(${image})`,
backgroundSize: "cover",
//background: "#2B2930",
}}
style={backgroundStyle}
class="text-white rounded-3xl shadow-md p-4 relative overflow-hidden
lg:w-56 lg:h-56
sm:w-48 sm:h-48