import { isYoutubeLink } from "@lib/string.ts";
import { IconBrandYoutube } from "@components/icons.tsx";
import { GenericResource } from "@lib/types.ts";
import { SmallRating } from "@components/Rating.tsx";
import { Link } from "@islands/Link.tsx";
export function Card(
{
link,
rating,
title,
image,
thumbnail,
backgroundColor,
backgroundSize = 100,
}: {
backgroundSize?: number;
backgroundColor?: string;
thumbnail?: string;
link?: string;
title?: string;
image?: string;
rating?: number;
},
) {
const backgroundStyle: preact.JSX.CSSProperties = {
backgroundSize: "cover",
backgroundColor: backgroundColor,
};
if (backgroundSize !== 100) {
backgroundStyle["backgroundSize"] = `${backgroundSize}%`;
backgroundStyle["backgroundRepeat"] = "no-repeat";
backgroundStyle["backgroundPosition"] = "center";
}
return (
{true && (
)}