feat: use animated emojis from fluent
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user